-rw-r--r-- | libopie/ofontselector.h | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/libopie/ofontselector.h b/libopie/ofontselector.h index b3aa862..a9c8a72 100644 --- a/libopie/ofontselector.h +++ b/libopie/ofontselector.h | |||
@@ -9,74 +9,69 @@ | |||
9 | - . .-<_> .<> Foundation; either version 2 of the License, | 9 | - . .-<_> .<> Foundation; either version 2 of the License, |
10 | ._= =} : or (at your option) any later version. | 10 | ._= =} : or (at your option) any later version. |
11 | .%`+i> _;_. | 11 | .%`+i> _;_. |
12 | .i_,=:_. -<s. This library is distributed in the hope that | 12 | .i_,=:_. -<s. This library is distributed in the hope that |
13 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 13 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
14 | : .. .:, . . . without even the implied warranty of | 14 | : .. .:, . . . without even the implied warranty of |
15 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 15 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
16 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 16 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
17 | ..}^=.= = ; Library General Public License for more | 17 | ..}^=.= = ; Library General Public License for more |
18 | ++= -. .` .: details. | 18 | ++= -. .` .: details. |
19 | : = ...= . :.=- | 19 | : = ...= . :.=- |
20 | -. .:....=;==+<; You should have received a copy of the GNU | 20 | -. .:....=;==+<; You should have received a copy of the GNU |
21 | -_. . . )=. = Library General Public License along with | 21 | -_. . . )=. = Library General Public License along with |
22 | -- :-=` this library; see the file COPYING.LIB. | 22 | -- :-=` this library; see the file COPYING.LIB. |
23 | If not, write to the Free Software Foundation, | 23 | If not, write to the Free Software Foundation, |
24 | Inc., 59 Temple Place - Suite 330, | 24 | Inc., 59 Temple Place - Suite 330, |
25 | Boston, MA 02111-1307, USA. | 25 | Boston, MA 02111-1307, USA. |
26 | 26 | ||
27 | */ | 27 | */ |
28 | 28 | ||
29 | #ifndef __OPIE_FONTSELECTOR_H__ | 29 | #ifndef __OPIE_FONTSELECTOR_H__ |
30 | #define __OPIE_FONTSELECTOR_H__ | 30 | #define __OPIE_FONTSELECTOR_H__ |
31 | 31 | ||
32 | #include <qwidget.h> | 32 | #include <qwidget.h> |
33 | #include <qpe/fontdatabase.h> | ||
34 | 33 | ||
35 | class QComboBox; | ||
36 | class QListBox; | 34 | class QListBox; |
37 | class QFont; | 35 | class OFontSelectorPrivate; |
36 | |||
38 | 37 | ||
39 | class OFontSelector : public QWidget | 38 | class OFontSelector : public QWidget |
40 | { | 39 | { |
41 | Q_OBJECT | 40 | Q_OBJECT |
42 | 41 | ||
43 | public: | 42 | public: |
44 | OFontSelector ( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); | 43 | OFontSelector ( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); |
45 | virtual ~OFontSelector ( ); | 44 | virtual ~OFontSelector ( ); |
46 | 45 | ||
47 | bool selectedFont ( QString &family, QString &style, int &size ); | 46 | bool selectedFont ( QString &family, QString &style, int &size ); |
48 | bool selectedFont ( QString &family, QString &style, int &size, QString &charset ); | 47 | bool selectedFont ( QString &family, QString &style, int &size, QString &charset ); |
49 | 48 | ||
50 | QFont selectedFont ( ); | 49 | QFont selectedFont ( ); |
51 | 50 | ||
52 | bool setSelectedFont ( const QFont & ); | 51 | bool setSelectedFont ( const QFont & ); |
53 | bool setSelectedFont ( const QString &family, const QString &style, int size, const QString &charset = 0 ); | 52 | bool setSelectedFont ( const QString &family, const QString &style, int size, const QString &charset = 0 ); |
54 | 53 | ||
55 | QString fontFamily ( ) const; | 54 | QString fontFamily ( ) const; |
56 | QString fontStyle ( ) const; | 55 | QString fontStyle ( ) const; |
57 | int fontSize ( ) const; | 56 | int fontSize ( ) const; |
58 | QString fontCharSet ( ) const; | 57 | QString fontCharSet ( ) const; |
59 | 58 | ||
60 | signals: | 59 | signals: |
61 | void fontSelected ( const QFont & ); | 60 | void fontSelected ( const QFont & ); |
62 | 61 | ||
63 | protected slots: | 62 | protected slots: |
64 | virtual void fontFamilyClicked ( int ); | 63 | virtual void fontFamilyClicked ( int ); |
65 | virtual void fontStyleClicked ( int ); | 64 | virtual void fontStyleClicked ( int ); |
66 | virtual void fontSizeClicked ( int ); | 65 | virtual void fontSizeClicked ( int ); |
67 | 66 | ||
68 | private: | 67 | private: |
69 | void loadFonts ( QListBox * ); | 68 | void loadFonts ( QListBox * ); |
70 | 69 | ||
71 | void changeFont ( ); | 70 | void changeFont ( ); |
72 | 71 | ||
73 | private: | 72 | private: |
74 | QListBox * m_font_family_list; | 73 | OFontSelectorPrivate *d; |
75 | QComboBox * m_font_style_list; | ||
76 | QComboBox * m_font_size_list; | ||
77 | |||
78 | FontDatabase m_fdb; | ||
79 | }; | 74 | }; |
80 | 75 | ||
81 | #endif | 76 | #endif |
82 | 77 | ||