Scribus
Open source desktop publishing at your fingertips
fontcombo.h
1 /*
2 For general Scribus (>=1.3.2) copyright and licensing information please refer
3 to the COPYING file provided with the program. Following this notice may exist
4 a copyright and/or license notice that predates the release of Scribus 1.3.2
5 for which a new license (GPL+exception) is in place.
6 */
7 /***************************************************************************
8  fontcombo.h - description
9  -------------------
10  begin : Die Jun 17 2003
11  copyright : (C) 2003 by Franz Schmid
12  email : Franz.Schmid@altmuehlnet.de
13  ***************************************************************************/
14 
15 /***************************************************************************
16  * *
17  * This program is free software; you can redistribute it and/or modify *
18  * it under the terms of the GNU General Public License as published by *
19  * the Free Software Foundation; either version 2 of the License, or *
20  * (at your option) any later version. *
21  * *
22  ***************************************************************************/
23 
24 #ifndef FONTCOMBO_H
25 #define FONTCOMBO_H
26 
27 #include <QWidget>
28 #include <QComboBox>
29 #include "scribusapi.h"
30 
31 class QEvent;
32 class QFont;
33 class QGridLayout;
34 class QPixmap;
35 class QLabel;
36 class ScribusDoc;
37 class PrefsManager;
38 
43 class SCRIBUS_API FontCombo : public QComboBox
44 {
45 public:
46  FontCombo(QWidget* pa);
47  ~FontCombo() {};
48 
49 
50 
51  void RebuildList(ScribusDoc *currentDoc, bool forAnnotation = false, bool forSubstitute = false);
52 private:
53  PrefsManager* prefsManager;
54  QPixmap ttfFont;
55  QPixmap otfFont;
56  QPixmap psFont;
57  QPixmap substFont;
58 };
59 
60 class SCRIBUS_API FontComboH : public QWidget
61 {
62 
63  Q_OBJECT
64 
65 public:
66  FontComboH(QWidget* parent, bool labels=false);
67  ~FontComboH() {};
68 
69  virtual void changeEvent(QEvent *e);
70 
71  QString currentFont();
72  void RebuildList(ScribusDoc *currentDoc, bool forAnnotation = false, bool forSubstitute = false);
73 
74 public slots:
75  void setCurrentFont(QString f);
76  void languageChange();
77 
78 signals:
79  void fontSelected(QString);
80 
81 protected slots:
82  void familySelected(int id);
83  void styleSelected(int id);
84 
85 protected:
86  QComboBox* fontFamily;
87  QComboBox* fontStyle;
88  QLabel *fontFaceLabel;
89  QLabel *fontStyleLabel;
90  PrefsManager* prefsManager;
91  ScribusDoc *currDoc;
92  bool isForAnnotation, isForSubstitute;
93  QPixmap ttfFont;
94  QPixmap otfFont;
95  QPixmap psFont;
96  QPixmap substFont;
97  QGridLayout* fontComboLayout;
98  bool showLabels;
99 };
100 
101 #endif
the Document Class
Definition: scribusdoc.h:90
Definition: fontcombo.h:60
Definition: fontcombo.h:43
Manage Scribus preferences here, and here alone Start to move the preferences out of scribus...
Definition: prefsmanager.h:43