summaryrefslogtreecommitdiff
path: root/libopie2/opieui/ofontselector.cpp
Unidiff
Diffstat (limited to 'libopie2/opieui/ofontselector.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opieui/ofontselector.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libopie2/opieui/ofontselector.cpp b/libopie2/opieui/ofontselector.cpp
index b19c26e..6763ee6 100644
--- a/libopie2/opieui/ofontselector.cpp
+++ b/libopie2/opieui/ofontselector.cpp
@@ -20,49 +20,49 @@
20++=   -.     .`     .: details. 20++=   -.     .`     .: details.
21 :     =  ...= . :.=- 21 :     =  ...= . :.=-
22 -.   .:....=;==+<; You should have received a copy of the GNU 22 -.   .:....=;==+<; You should have received a copy of the GNU
23  -_. . .   )=.  = Library General Public License along with 23  -_. . .   )=.  = Library General Public License along with
24    --        :-=` this library; see the file COPYING.LIB. 24    --        :-=` this library; see the file COPYING.LIB.
25 If not, write to the Free Software Foundation, 25 If not, write to the Free Software Foundation,
26 Inc., 59 Temple Place - Suite 330, 26 Inc., 59 Temple Place - Suite 330,
27 Boston, MA 02111-1307, USA. 27 Boston, MA 02111-1307, USA.
28*/ 28*/
29 29
30/* OPIE */ 30/* OPIE */
31#include <opie2/ofontselector.h> 31#include <opie2/ofontselector.h>
32#include <qpe/fontdatabase.h> 32#include <qpe/fontdatabase.h>
33 33
34/* QT */ 34/* QT */
35#include <qlayout.h> 35#include <qlayout.h>
36#include <qlistbox.h> 36#include <qlistbox.h>
37#include <qcombobox.h> 37#include <qcombobox.h>
38#include <qlabel.h> 38#include <qlabel.h>
39#include <qmultilineedit.h> 39#include <qmultilineedit.h>
40 40
41 41
42namespace Opie { 42namespace Opie {
43namespace Ui { 43namespace Ui {
44namespace Private { 44namespace Internal {
45 45
46class OFontSelectorPrivate 46class OFontSelectorPrivate
47{ 47{
48public: 48public:
49 QListBox * m_font_family_list; 49 QListBox * m_font_family_list;
50 QComboBox * m_font_style_list; 50 QComboBox * m_font_style_list;
51 QComboBox * m_font_size_list; 51 QComboBox * m_font_size_list;
52 QMultiLineEdit *m_preview; 52 QMultiLineEdit *m_preview;
53 53
54 bool m_pointbug : 1; 54 bool m_pointbug : 1;
55 55
56 FontDatabase m_fdb; 56 FontDatabase m_fdb;
57}; 57};
58 58
59class FontListItem : public QListBoxText 59class FontListItem : public QListBoxText
60{ 60{
61public: 61public:
62 FontListItem ( const QString &t, const QStringList &styles, const QValueList<int> &sizes ) : QListBoxText() 62 FontListItem ( const QString &t, const QStringList &styles, const QValueList<int> &sizes ) : QListBoxText()
63 { 63 {
64 m_name = t; 64 m_name = t;
65 m_styles = styles; 65 m_styles = styles;
66 m_sizes = sizes; 66 m_sizes = sizes;
67 67
68 QString str = t; 68 QString str = t;
@@ -75,49 +75,49 @@ public:
75 return m_name; 75 return m_name;
76 } 76 }
77 77
78 const QStringList &styles() const 78 const QStringList &styles() const
79 { 79 {
80 return m_styles; 80 return m_styles;
81 } 81 }
82 82
83 const QValueList<int> &sizes() const 83 const QValueList<int> &sizes() const
84 { 84 {
85 return m_sizes; 85 return m_sizes;
86 } 86 }
87 87
88private: 88private:
89 QStringList m_styles; 89 QStringList m_styles;
90 QValueList<int> m_sizes; 90 QValueList<int> m_sizes;
91 QString m_name; 91 QString m_name;
92}; 92};
93} 93}
94} 94}
95} 95}
96 96
97 97
98using namespace Opie::Ui; 98using namespace Opie::Ui;
99using namespace Opie::Ui::Private; 99using namespace Opie::Ui::Internal;
100 100
101static int findItemCB( QComboBox *box, const QString &str ) 101static int findItemCB( QComboBox *box, const QString &str )
102{ 102{
103 for ( int i = 0; i < box->count(); i++ ) 103 for ( int i = 0; i < box->count(); i++ )
104 { 104 {
105 if ( box->text ( i ) == str ) 105 if ( box->text ( i ) == str )
106 return i; 106 return i;
107 } 107 }
108 return -1; 108 return -1;
109} 109}
110 110
111/* static same as anon. namespace */ 111/* static same as anon. namespace */
112static int qt_version() 112static int qt_version()
113{ 113{
114 const char *qver = qVersion(); 114 const char *qver = qVersion();
115 115
116 return ( qver [0] - '0' ) * 100 + ( qver [2] - '0' ) * 10 + ( qver [4] - '0' ); 116 return ( qver [0] - '0' ) * 100 + ( qver [2] - '0' ) * 10 + ( qver [4] - '0' );
117} 117}
118 118
119/** 119/**
120 * Constructs the Selector object 120 * Constructs the Selector object
121 * @param withpreview If a font preview should be given 121 * @param withpreview If a font preview should be given
122 * @param parent The parent of the Font Selector 122 * @param parent The parent of the Font Selector
123 * @param name The name of the object 123 * @param name The name of the object