author | sandman <sandman> | 2002-09-23 22:43:28 (UTC) |
---|---|---|
committer | sandman <sandman> | 2002-09-23 22:43:28 (UTC) |
commit | 9360d74a24b3ecf1169ad63996adc897004bd73e (patch) (unidiff) | |
tree | 31687c656b8309ccee3fb5ad1334230b31e6c363 /libopie/ofontselector.h | |
parent | 44e815d58c7565eccab2bd585923e343b70ac0f3 (diff) | |
download | opie-9360d74a24b3ecf1169ad63996adc897004bd73e.zip opie-9360d74a24b3ecf1169ad63996adc897004bd73e.tar.gz opie-9360d74a24b3ecf1169ad63996adc897004bd73e.tar.bz2 |
new OFontSelector - used in Appearance and Launcher settings
-rw-r--r-- | libopie/ofontselector.h | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/libopie/ofontselector.h b/libopie/ofontselector.h new file mode 100644 index 0000000..9227e48 --- a/dev/null +++ b/libopie/ofontselector.h | |||
@@ -0,0 +1,79 @@ | |||
1 | /* | ||
2 | =. This file is part of the OPIE Project | ||
3 | .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> | ||
4 | .>+-= | ||
5 | _;:, .> :=|. This library is free software; you can | ||
6 | .> <`_, > . <= redistribute it and/or modify it under | ||
7 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | ||
8 | .="- .-=="i, .._ License as published by the Free Software | ||
9 | - . .-<_> .<> Foundation; either version 2 of the License, | ||
10 | ._= =} : or (at your option) any later version. | ||
11 | .%`+i> _;_. | ||
12 | .i_,=:_. -<s. This library is distributed in the hope that | ||
13 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
14 | : .. .:, . . . without even the implied warranty of | ||
15 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
16 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | ||
17 | ..}^=.= = ; Library General Public License for more | ||
18 | ++= -. .` .: details. | ||
19 | : = ...= . :.=- | ||
20 | -. .:....=;==+<; You should have received a copy of the GNU | ||
21 | -_. . . )=. = Library General Public License along with | ||
22 | -- :-=` this library; see the file COPYING.LIB. | ||
23 | If not, write to the Free Software Foundation, | ||
24 | Inc., 59 Temple Place - Suite 330, | ||
25 | Boston, MA 02111-1307, USA. | ||
26 | |||
27 | */ | ||
28 | |||
29 | #ifndef __OPIE_FONTSELECTOR_H__ | ||
30 | #define __OPIE_FONTSELECTOR_H__ | ||
31 | |||
32 | #include <qwidget.h> | ||
33 | #include <qpe/fontdatabase.h> | ||
34 | |||
35 | class QComboBox; | ||
36 | class QListBox; | ||
37 | class QFont; | ||
38 | |||
39 | class OFontSelector : public QWidget | ||
40 | { | ||
41 | Q_OBJECT | ||
42 | |||
43 | public: | ||
44 | OFontSelector ( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); | ||
45 | virtual ~OFontSelector ( ); | ||
46 | |||
47 | bool selectedFont ( QString &family, QString &style, int &size ); | ||
48 | bool selectedFont ( QString &family, QString &style, int &size, QString &charset ); | ||
49 | |||
50 | bool setSelectedFont ( const QString &family, const QString &style, int size, const QString &charset = 0 ); | ||
51 | |||
52 | QString fontFamily ( ) const; | ||
53 | QString fontStyle ( ) const; | ||
54 | int fontSize ( ) const; | ||
55 | QString fontCharSet ( ) const; | ||
56 | |||
57 | signals: | ||
58 | void fontSelected ( const QFont & ); | ||
59 | |||
60 | protected slots: | ||
61 | virtual void fontFamilyClicked ( int ); | ||
62 | virtual void fontStyleClicked ( int ); | ||
63 | virtual void fontSizeClicked ( int ); | ||
64 | |||
65 | private: | ||
66 | void loadFonts ( QListBox * ); | ||
67 | |||
68 | void changeFont ( ); | ||
69 | |||
70 | private: | ||
71 | QListBox * m_font_family_list; | ||
72 | QComboBox * m_font_style_list; | ||
73 | QComboBox * m_font_size_list; | ||
74 | |||
75 | FontDatabase m_fdb; | ||
76 | }; | ||
77 | |||
78 | #endif | ||
79 | |||