-rw-r--r-- | inputmethods/pickboard/pickboard.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/inputmethods/pickboard/pickboard.cpp b/inputmethods/pickboard/pickboard.cpp index 1611cb0..e5365ba 100644 --- a/inputmethods/pickboard/pickboard.cpp +++ b/inputmethods/pickboard/pickboard.cpp | |||
@@ -9,33 +9,33 @@ | |||
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | #include "pickboard.h" | 20 | #include "pickboard.h" |
21 | #include "pickboardpicks.h" | 21 | #include "pickboardpicks.h" |
22 | #include "pickboardcfg.h" | 22 | #include "pickboardcfg.h" |
23 | 23 | ||
24 | #include <qpe/global.h> | 24 | #include <qpe/global.h> |
25 | 25 | #include <qpe/config.h> | |
26 | #include <qpainter.h> | 26 | #include <qpainter.h> |
27 | #include <qlist.h> | 27 | #include <qlist.h> |
28 | #include <qbitmap.h> | 28 | #include <qbitmap.h> |
29 | #include <qlayout.h> | 29 | #include <qlayout.h> |
30 | #include <qvbox.h> | 30 | #include <qvbox.h> |
31 | #include <qdialog.h> | 31 | #include <qdialog.h> |
32 | #include <qscrollview.h> | 32 | #include <qscrollview.h> |
33 | #include <qpopupmenu.h> | 33 | #include <qpopupmenu.h> |
34 | #include <qhbuttongroup.h> | 34 | #include <qhbuttongroup.h> |
35 | #include <qpushbutton.h> | 35 | #include <qpushbutton.h> |
36 | #include <qmessagebox.h> | 36 | #include <qmessagebox.h> |
37 | #ifdef QWS | 37 | #ifdef QWS |
38 | #include <qwindowsystem_qws.h> | 38 | #include <qwindowsystem_qws.h> |
39 | #endif | 39 | #endif |
40 | 40 | ||
41 | /*! \class Pickboard | 41 | /*! \class Pickboard |
@@ -79,32 +79,37 @@ public: | |||
79 | menu->setSizePolicy(QSizePolicy(QSizePolicy::Minimum,QSizePolicy::Expanding)); | 79 | menu->setSizePolicy(QSizePolicy(QSizePolicy::Minimum,QSizePolicy::Expanding)); |
80 | menu->setPixmap(QPixmap((const char **)menu_xpm)); | 80 | menu->setPixmap(QPixmap((const char **)menu_xpm)); |
81 | QObject::connect(menu,SIGNAL(clicked()),picks,SLOT(doMenu())); | 81 | QObject::connect(menu,SIGNAL(clicked()),picks,SLOT(doMenu())); |
82 | QObject::connect(picks,SIGNAL(key(ushort,ushort,ushort,bool,bool)), | 82 | QObject::connect(picks,SIGNAL(key(ushort,ushort,ushort,bool,bool)), |
83 | parent,SIGNAL(key(ushort,ushort,ushort,bool,bool))); | 83 | parent,SIGNAL(key(ushort,ushort,ushort,bool,bool))); |
84 | } | 84 | } |
85 | 85 | ||
86 | PickboardPicks* picks; | 86 | PickboardPicks* picks; |
87 | QPushButton* menu; | 87 | QPushButton* menu; |
88 | }; | 88 | }; |
89 | 89 | ||
90 | Pickboard::Pickboard(QWidget* parent, const char* name, WFlags f) : | 90 | Pickboard::Pickboard(QWidget* parent, const char* name, WFlags f) : |
91 | QFrame(parent,name,f) | 91 | QFrame(parent,name,f) |
92 | { | 92 | { |
93 | (new QHBoxLayout(this))->setAutoAdd(TRUE); | 93 | (new QHBoxLayout(this))->setAutoAdd(TRUE); |
94 | d = new PickboardPrivate(this); | 94 | d = new PickboardPrivate(this); |
95 | // under Win32 we may not have smallsmooth font | 95 | |
96 | #ifndef Q_OS_WIN32 | 96 | // get the default font |
97 | setFont( QFont( "smallsmooth", 9 ) ); | 97 | Config *config = new Config( "qpe" ); |
98 | #endif | 98 | config->setGroup( "Appearance" ); |
99 | QString familyStr = config->readEntry( "FontFamily", "smallsmooth" ); | ||
100 | int fontSize = config->readNumEntry( "FontSize", 10 ); | ||
101 | delete config; | ||
102 | |||
103 | setFont( QFont( familyStr, fontSize ) ); | ||
99 | } | 104 | } |
100 | 105 | ||
101 | Pickboard::~Pickboard() | 106 | Pickboard::~Pickboard() |
102 | { | 107 | { |
103 | delete d; | 108 | delete d; |
104 | } | 109 | } |
105 | 110 | ||
106 | void Pickboard::resetState() | 111 | void Pickboard::resetState() |
107 | { | 112 | { |
108 | d->picks->resetState(); | 113 | d->picks->resetState(); |
109 | } | 114 | } |
110 | 115 | ||