summaryrefslogtreecommitdiff
path: root/library/qpeapplication.cpp
Unidiff
Diffstat (limited to 'library/qpeapplication.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--library/qpeapplication.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp
index df313ce..3efba20 100644
--- a/library/qpeapplication.cpp
+++ b/library/qpeapplication.cpp
@@ -1,186 +1,187 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of the Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
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#define QTOPIA_INTERNAL_LANGLIST 20#define QTOPIA_INTERNAL_LANGLIST
21#include <stdlib.h> 21#include <stdlib.h>
22#include <unistd.h> 22#include <unistd.h>
23#ifndef Q_OS_MACX 23#ifndef Q_OS_MACX
24#include <linux/limits.h> // needed for some toolchains (PATH_MAX) 24#include <linux/limits.h> // needed for some toolchains (PATH_MAX)
25#endif 25#endif
26#include <qfile.h> 26#include <qfile.h>
27#include <qqueue.h> 27#include <qqueue.h>
28#ifdef Q_WS_QWS 28#ifdef Q_WS_QWS
29#ifndef QT_NO_COP 29#ifndef QT_NO_COP
30#if QT_VERSION <= 231 30#if QT_VERSION <= 231
31#define private public 31#define private public
32#define sendLocally processEvent 32#define sendLocally processEvent
33#include "qcopenvelope_qws.h" 33#include "qcopenvelope_qws.h"
34#undef private 34#undef private
35#else 35#else
36#include "qcopenvelope_qws.h" 36#include "qcopenvelope_qws.h"
37#endif 37#endif
38#endif 38#endif
39#include <qwindowsystem_qws.h> 39#include <qwindowsystem_qws.h>
40#endif 40#endif
41#include <qtextstream.h> 41#include <qtextstream.h>
42#include <qpalette.h> 42#include <qpalette.h>
43#include <qbuffer.h> 43#include <qbuffer.h>
44#include <qptrdict.h> 44#include <qptrdict.h>
45#include <qregexp.h> 45#include <qregexp.h>
46#include <qdir.h> 46#include <qdir.h>
47#include <qlabel.h> 47#include <qlabel.h>
48#include <qdialog.h> 48#include <qdialog.h>
49#include <qdragobject.h> 49#include <qdragobject.h>
50#include <qtextcodec.h> 50#include <qtextcodec.h>
51#include <qevent.h> 51#include <qevent.h>
52#include <qtooltip.h> 52#include <qtooltip.h>
53#include <qsignal.h> 53#include <qsignal.h>
54#include <qmainwindow.h> 54#include <qmainwindow.h>
55#include <qwidgetlist.h> 55#include <qwidgetlist.h>
56#include <qpixmapcache.h> 56#include <qpixmapcache.h>
57 57
58#if defined(Q_WS_QWS) && !defined(QT_NO_COP) 58#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
59#define QTOPIA_INTERNAL_INITAPP 59#define QTOPIA_INTERNAL_INITAPP
60#include "qpeapplication.h" 60#include "qpeapplication.h"
61#include "qpestyle.h" 61#include "qpestyle.h"
62#include "styleinterface.h" 62#include "styleinterface.h"
63#if QT_VERSION >= 300 63#if QT_VERSION >= 300
64#include <qstylefactory.h> 64#include <qstylefactory.h>
65#else 65#else
66#include <qplatinumstyle.h> 66#include <qplatinumstyle.h>
67#include <qwindowsstyle.h> 67#include <qwindowsstyle.h>
68#include <qmotifstyle.h> 68#include <qmotifstyle.h>
69#include <qmotifplusstyle.h> 69#include <qmotifplusstyle.h>
70#include "lightstyle.h" 70#include "lightstyle.h"
71 71
72#include <qpe/qlibrary.h> 72#include <qpe/qlibrary.h>
73#endif 73#endif
74#include "global.h" 74#include "global.h"
75#include "resource.h" 75#include "resource.h"
76#if QT_VERSION <= 230 && defined(QT_NO_CODECS) 76#if QT_VERSION <= 230 && defined(QT_NO_CODECS)
77#include "qutfcodec.h" 77#include "qutfcodec.h"
78#endif 78#endif
79#include "config.h" 79#include "config.h"
80#include "network.h" 80#include "network.h"
81#ifdef QWS 81#ifdef QWS
82#include "fontmanager.h" 82#include "fontmanager.h"
83#include "fontdatabase.h" 83#include "fontdatabase.h"
84#endif 84#endif
85 85
86#include "alarmserver.h" 86#include "alarmserver.h"
87#include "applnk.h" 87#include "applnk.h"
88#include "qpemenubar.h" 88#include "qpemenubar.h"
89#include "textcodecinterface.h" 89#include "textcodecinterface.h"
90#include "imagecodecinterface.h" 90#include "imagecodecinterface.h"
91#include <qtopia/qpeglobal.h>
91 92
92#include <unistd.h> 93#include <unistd.h>
93#include <sys/file.h> 94#include <sys/file.h>
94#include <sys/ioctl.h> 95#include <sys/ioctl.h>
95#ifndef QT_NO_SOUND 96#ifndef QT_NO_SOUND
96#include <sys/soundcard.h> 97#include <sys/soundcard.h>
97#endif 98#endif
98#include "qt_override_p.h" 99#include "qt_override_p.h"
99 100
100#include <backend/rohfeedback.h> 101#include <backend/rohfeedback.h>
101 102
102 103
103static bool useBigPixmaps = 0; 104static bool useBigPixmaps = 0;
104 105
105class HackWidget : public QWidget 106class HackWidget : public QWidget
106{ 107{
107public: 108public:
108 bool needsOk() 109 bool needsOk()
109 { return (getWState() & WState_Reserved1 ); } 110 { return (getWState() & WState_Reserved1 ); }
110 111
111 QRect normalGeometry() 112 QRect normalGeometry()
112 { return topData()->normalGeometry; }; 113 { return topData()->normalGeometry; };
113}; 114};
114 115
115class QPEApplicationData 116class QPEApplicationData
116{ 117{
117public: 118public:
118 QPEApplicationData ( ) : 119 QPEApplicationData ( ) :
119 presstimer( 0 ), presswidget( 0 ), rightpressed( false ), kbgrabbed( false ), 120 presstimer( 0 ), presswidget( 0 ), rightpressed( false ), kbgrabbed( false ),
120 notbusysent( false ), preloaded( false ), forceshow( false ), nomaximize( false ), 121 notbusysent( false ), preloaded( false ), forceshow( false ), nomaximize( false ),
121 keep_running( true ), qcopQok( false ), 122 keep_running( true ), qcopQok( false ),
122 fontFamily( "Vera" ), fontSize( 10 ), smallIconSize( 14 ), 123 fontFamily( "Vera" ), fontSize( 10 ), smallIconSize( 14 ),
123 bigIconSize( 32 ), qpe_main_widget( 0 ) 124 bigIconSize( 32 ), qpe_main_widget( 0 )
124 { 125 {
125 Config cfg( "qpe" ); 126 Config cfg( "qpe" );
126 cfg.setGroup( "Appearance" ); 127 cfg.setGroup( "Appearance" );
127 useBigPixmaps = cfg.readBoolEntry( "useBigPixmaps", false ); 128 useBigPixmaps = cfg.readBoolEntry( "useBigPixmaps", false );
128 fontFamily = cfg.readEntry( "FontFamily", "Vera" ); 129 fontFamily = cfg.readEntry( "FontFamily", "Vera" );
129 fontSize = cfg.readNumEntry( "FontSize", 10 ); 130 fontSize = cfg.readNumEntry( "FontSize", 10 );
130 smallIconSize = cfg.readNumEntry( "SmallIconSize", 14 ); 131 smallIconSize = cfg.readNumEntry( "SmallIconSize", 14 );
131 bigIconSize = cfg.readNumEntry( "BigIconSize", 32 ); 132 bigIconSize = cfg.readNumEntry( "BigIconSize", 32 );
132#ifdef OPIE_WITHROHFEEDBACK 133#ifdef OPIE_WITHROHFEEDBACK
133 RoH = 0; 134 RoH = 0;
134#endif 135#endif
135 } 136 }
136 137
137 int presstimer; 138 int presstimer;
138 QWidget* presswidget; 139 QWidget* presswidget;
139 QPoint presspos; 140 QPoint presspos;
140#ifdef OPIE_WITHROHFEEDBACK 141#ifdef OPIE_WITHROHFEEDBACK
141 Opie::Internal::RoHFeedback *RoH; 142 Opie::Internal::RoHFeedback *RoH;
142#endif 143#endif
143 144
144 bool rightpressed : 1; 145 bool rightpressed : 1;
145 bool kbgrabbed : 1; 146 bool kbgrabbed : 1;
146 bool notbusysent : 1; 147 bool notbusysent : 1;
147 bool preloaded : 1; 148 bool preloaded : 1;
148 bool forceshow : 1; 149 bool forceshow : 1;
149 bool nomaximize : 1; 150 bool nomaximize : 1;
150 bool keep_running : 1; 151 bool keep_running : 1;
151 bool qcopQok : 1; 152 bool qcopQok : 1;
152 153
153 QCString fontFamily; 154 QCString fontFamily;
154 int fontSize; 155 int fontSize;
155 int smallIconSize; 156 int smallIconSize;
156 int bigIconSize; 157 int bigIconSize;
157 158
158 QStringList langs; 159 QStringList langs;
159 QString appName; 160 QString appName;
160 struct QCopRec 161 struct QCopRec
161 { 162 {
162 QCopRec( const QCString &ch, const QCString &msg, 163 QCopRec( const QCString &ch, const QCString &msg,
163 const QByteArray &d ) : 164 const QByteArray &d ) :
164 channel( ch ), message( msg ), data( d ) 165 channel( ch ), message( msg ), data( d )
165 { } 166 { }
166 167
167 QCString channel; 168 QCString channel;
168 QCString message; 169 QCString message;
169 QByteArray data; 170 QByteArray data;
170 }; 171 };
171 QWidget* qpe_main_widget; 172 QWidget* qpe_main_widget;
172 QGuardedPtr<QWidget> lastraised; 173 QGuardedPtr<QWidget> lastraised;
173 QQueue<QCopRec> qcopq; 174 QQueue<QCopRec> qcopq;
174 QString styleName; 175 QString styleName;
175 QString decorationName; 176 QString decorationName;
176 177
177 void enqueueQCop( const QCString &ch, const QCString &msg, 178 void enqueueQCop( const QCString &ch, const QCString &msg,
178 const QByteArray &data ) 179 const QByteArray &data )
179 { 180 {
180 qcopq.enqueue( new QCopRec( ch, msg, data ) ); 181 qcopq.enqueue( new QCopRec( ch, msg, data ) );
181 } 182 }
182 void sendQCopQ() 183 void sendQCopQ()
183 { 184 {
184 if (!qcopQok ) 185 if (!qcopQok )
185 return; 186 return;
186 187
@@ -1201,198 +1202,193 @@ QString QPEApplication::documentDir()
1201{ 1202{
1202 const char* base = getenv( "HOME"); 1203 const char* base = getenv( "HOME");
1203 if ( base ) 1204 if ( base )
1204 return QString( base ) + "/Documents"; 1205 return QString( base ) + "/Documents";
1205 1206
1206 return QString( "../Documents" ); 1207 return QString( "../Documents" );
1207} 1208}
1208 1209
1209static int deforient = -1; 1210static int deforient = -1;
1210 1211
1211/*! 1212/*!
1212 \internal 1213 \internal
1213*/ 1214*/
1214int QPEApplication::defaultRotation() 1215int QPEApplication::defaultRotation()
1215{ 1216{
1216 if ( deforient < 0 ) { 1217 if ( deforient < 0 ) {
1217 QString d = getenv( "QWS_DISPLAY" ); 1218 QString d = getenv( "QWS_DISPLAY" );
1218 if ( d.contains( "Rot90" ) ) { 1219 if ( d.contains( "Rot90" ) ) {
1219 deforient = 90; 1220 deforient = 90;
1220 } 1221 }
1221 else if ( d.contains( "Rot180" ) ) { 1222 else if ( d.contains( "Rot180" ) ) {
1222 deforient = 180; 1223 deforient = 180;
1223 } 1224 }
1224 else if ( d.contains( "Rot270" ) ) { 1225 else if ( d.contains( "Rot270" ) ) {
1225 deforient = 270; 1226 deforient = 270;
1226 } 1227 }
1227 else { 1228 else {
1228 deforient = 0; 1229 deforient = 0;
1229 } 1230 }
1230 } 1231 }
1231 return deforient; 1232 return deforient;
1232} 1233}
1233 1234
1234/*! 1235/*!
1235 \internal 1236 \internal
1236*/ 1237*/
1237void QPEApplication::setDefaultRotation( int r ) 1238void QPEApplication::setDefaultRotation( int r )
1238{ 1239{
1239 if ( qApp->type() == GuiServer ) { 1240 if ( qApp->type() == GuiServer ) {
1240 deforient = r; 1241 deforient = r;
1241 setenv( "QWS_DISPLAY", QString( "Transformed:Rot%1:0" ).arg( r ).latin1(), 1 ); 1242 setenv( "QWS_DISPLAY", QString( "Transformed:Rot%1:0" ).arg( r ).latin1(), 1 );
1242 Config config("qpe"); 1243 Config config("qpe");
1243 config.setGroup( "Rotation" ); 1244 config.setGroup( "Rotation" );
1244 config.writeEntry( "Rot", r ); 1245 config.writeEntry( "Rot", r );
1245 } 1246 }
1246 else { 1247 else {
1247#ifndef QT_NO_COP 1248#ifndef QT_NO_COP
1248 { QCopEnvelope e( "QPE/System", "setDefaultRotation(int)" ); 1249 { QCopEnvelope e( "QPE/System", "setDefaultRotation(int)" );
1249 e << r; 1250 e << r;
1250 } 1251 }
1251#endif 1252#endif
1252 1253
1253 } 1254 }
1254} 1255}
1255 1256
1256#include <qgfx_qws.h> 1257#include <qgfx_qws.h>
1257#include <qwindowsystem_qws.h> 1258#include <qwindowsystem_qws.h>
1258 1259
1259#if QT_VERSION > 236 1260#if QT_VERSION > 236
1260extern void qws_clearLoadedFonts(); 1261extern void qws_clearLoadedFonts();
1261#endif 1262#endif
1262 1263
1263void QPEApplication::setCurrentMode( int x, int y, int depth ) 1264void QPEApplication::setCurrentMode( int x, int y, int depth )
1264{ 1265{
1265 // Reset the caches 1266 // Reset the caches
1266#if QT_VERSION > 236 1267#if QT_VERSION > 236
1267 qws_clearLoadedFonts(); 1268 qws_clearLoadedFonts();
1268#endif 1269#endif
1269 QPixmapCache::clear(); 1270 QPixmapCache::clear();
1270 1271
1271 // Change the screen mode 1272 // Change the screen mode
1272 qt_screen->setMode(x, y, depth); 1273 qt_screen->setMode(x, y, depth);
1273 1274
1274 if ( qApp->type() == GuiServer ) { 1275 if ( qApp->type() == GuiServer ) {
1275#if QT_VERSION > 236 1276#if QT_VERSION > 236
1276 // Reconfigure the GuiServer 1277 // Reconfigure the GuiServer
1277 qwsServer->beginDisplayReconfigure(); 1278 qwsServer->beginDisplayReconfigure();
1278 qwsServer->endDisplayReconfigure(); 1279 qwsServer->endDisplayReconfigure();
1279#endif 1280#endif
1280 // Get all the running apps to reset 1281 // Get all the running apps to reset
1281 QCopEnvelope env( "QPE/System", "reset()" ); 1282 QCopEnvelope env( "QPE/System", "reset()" );
1282 } 1283 }
1283} 1284}
1284 1285
1285void QPEApplication::reset() { 1286void QPEApplication::reset() {
1286 // Reconnect to the screen 1287 // Reconnect to the screen
1287 qt_screen->disconnect(); 1288 qt_screen->disconnect();
1288 qt_screen->connect( QString::null ); 1289 qt_screen->connect( QString::null );
1289 1290
1290 // Redraw everything 1291 // Redraw everything
1291 applyStyle(); 1292 applyStyle();
1292} 1293}
1293 1294
1294#if (QT_VERSION < 238) && defined Q_OS_MACX 1295#if (QT_VERSION < 238) && defined Q_OS_MACX
1295bool qt_left_hand_scrollbars = false; 1296bool qt_left_hand_scrollbars = false;
1296#else 1297#else
1297#ifdef Q_OS_MACX 1298extern bool qt_left_hand_scrollbars QPE_WEAK_SYMBOL;
1298#define WEAK_SYMBOL __attribute__((weak_import))
1299#else
1300#define WEAK_SYMBOL __attribute__((weak))
1301#endif
1302extern bool qt_left_hand_scrollbars WEAK_SYMBOL;
1303#endif 1299#endif
1304 1300
1305/*! 1301/*!
1306 \internal 1302 \internal
1307*/ 1303*/
1308void QPEApplication::applyStyle() 1304void QPEApplication::applyStyle()
1309{ 1305{
1310 Config config( "qpe" ); 1306 Config config( "qpe" );
1311 config.setGroup( "Appearance" ); 1307 config.setGroup( "Appearance" );
1312 1308
1313#if QT_VERSION > 233 1309#if QT_VERSION > 233
1314#if !defined(OPIE_NO_OVERRIDE_QT) 1310#if !defined(OPIE_NO_OVERRIDE_QT)
1315 // don't block ourselves ... 1311 // don't block ourselves ...
1316 Opie::force_appearance = 0; 1312 Opie::force_appearance = 0;
1317 1313
1318 static QString appname = Opie::binaryName ( ); 1314 static QString appname = Opie::binaryName ( );
1319 1315
1320 QStringList ex = config. readListEntry ( "NoStyle", ';' ); 1316 QStringList ex = config. readListEntry ( "NoStyle", ';' );
1321 int nostyle = 0; 1317 int nostyle = 0;
1322 for ( QStringList::Iterator it = ex. begin ( ); it != ex. end ( ); ++it ) { 1318 for ( QStringList::Iterator it = ex. begin ( ); it != ex. end ( ); ++it ) {
1323 if ( QRegExp (( *it ). mid ( 1 ), false, true ). find ( appname, 0 ) >= 0 ) { 1319 if ( QRegExp (( *it ). mid ( 1 ), false, true ). find ( appname, 0 ) >= 0 ) {
1324 nostyle = ( *it ). left ( 1 ). toInt ( 0, 32 ); 1320 nostyle = ( *it ). left ( 1 ). toInt ( 0, 32 );
1325 break; 1321 break;
1326 } 1322 }
1327 } 1323 }
1328#else 1324#else
1329 int nostyle = 0; 1325 int nostyle = 0;
1330#endif 1326#endif
1331 1327
1332 // Widget style 1328 // Widget style
1333 QString style = config.readEntry( "Style", "FlatStyle" ); 1329 QString style = config.readEntry( "Style", "FlatStyle" );
1334 1330
1335 // don't set a custom style 1331 // don't set a custom style
1336 if ( nostyle & Opie::Force_Style ) 1332 if ( nostyle & Opie::Force_Style )
1337 style = "FlatStyle"; 1333 style = "FlatStyle";
1338 1334
1339 internalSetStyle ( style ); 1335 internalSetStyle ( style );
1340 1336
1341 // Colors - from /etc/colors/Liquid.scheme 1337 // Colors - from /etc/colors/Liquid.scheme
1342 QColor bgcolor( config.readEntry( "Background", "#E0E0E0" ) ); 1338 QColor bgcolor( config.readEntry( "Background", "#E0E0E0" ) );
1343 QColor btncolor( config.readEntry( "Button", "#96c8fa" ) ); 1339 QColor btncolor( config.readEntry( "Button", "#96c8fa" ) );
1344 QPalette pal( btncolor, bgcolor ); 1340 QPalette pal( btncolor, bgcolor );
1345 QString color = config.readEntry( "Highlight", "#73adef" ); 1341 QString color = config.readEntry( "Highlight", "#73adef" );
1346 pal.setColor( QColorGroup::Highlight, QColor( color ) ); 1342 pal.setColor( QColorGroup::Highlight, QColor( color ) );
1347 color = config.readEntry( "HighlightedText", "#FFFFFF" ); 1343 color = config.readEntry( "HighlightedText", "#FFFFFF" );
1348 pal.setColor( QColorGroup::HighlightedText, QColor( color ) ); 1344 pal.setColor( QColorGroup::HighlightedText, QColor( color ) );
1349 color = config.readEntry( "Text", "#000000" ); 1345 color = config.readEntry( "Text", "#000000" );
1350 pal.setColor( QColorGroup::Text, QColor( color ) ); 1346 pal.setColor( QColorGroup::Text, QColor( color ) );
1351 color = config.readEntry( "ButtonText", "#000000" ); 1347 color = config.readEntry( "ButtonText", "#000000" );
1352 pal.setColor( QPalette::Active, QColorGroup::ButtonText, QColor( color ) ); 1348 pal.setColor( QPalette::Active, QColorGroup::ButtonText, QColor( color ) );
1353 color = config.readEntry( "Base", "#FFFFFF" ); 1349 color = config.readEntry( "Base", "#FFFFFF" );
1354 pal.setColor( QColorGroup::Base, QColor( color ) ); 1350 pal.setColor( QColorGroup::Base, QColor( color ) );
1355 1351
1356 pal.setColor( QPalette::Disabled, QColorGroup::Text, 1352 pal.setColor( QPalette::Disabled, QColorGroup::Text,
1357 pal.color( QPalette::Active, QColorGroup::Background ).dark() ); 1353 pal.color( QPalette::Active, QColorGroup::Background ).dark() );
1358 1354
1359 setPalette( pal, TRUE ); 1355 setPalette( pal, TRUE );
1360 1356
1361 1357
1362 // Set the ScrollBar on the 'right' side but only if the weak symbol is present 1358 // Set the ScrollBar on the 'right' side but only if the weak symbol is present
1363 if (&qt_left_hand_scrollbars ) 1359 if (&qt_left_hand_scrollbars )
1364 qt_left_hand_scrollbars = config.readBoolEntry( "LeftHand", false ); 1360 qt_left_hand_scrollbars = config.readBoolEntry( "LeftHand", false );
1365 1361
1366 // Window Decoration 1362 // Window Decoration
1367 QString dec = config.readEntry( "Decoration", "Flat" ); 1363 QString dec = config.readEntry( "Decoration", "Flat" );
1368 1364
1369 // don't set a custom deco 1365 // don't set a custom deco
1370 if ( nostyle & Opie::Force_Decoration ) 1366 if ( nostyle & Opie::Force_Decoration )
1371 dec = ""; 1367 dec = "";
1372 1368
1373 1369
1374 if ( dec != d->decorationName ) { 1370 if ( dec != d->decorationName ) {
1375 qwsSetDecoration( new QPEDecoration( dec ) ); 1371 qwsSetDecoration( new QPEDecoration( dec ) );
1376 d->decorationName = dec; 1372 d->decorationName = dec;
1377 } 1373 }
1378 1374
1379 // Font 1375 // Font
1380 QString ff = config.readEntry( "FontFamily", font().family() ); 1376 QString ff = config.readEntry( "FontFamily", font().family() );
1381 int fs = config.readNumEntry( "FontSize", font().pointSize() ); 1377 int fs = config.readNumEntry( "FontSize", font().pointSize() );
1382 1378
1383 // don't set a custom font 1379 // don't set a custom font
1384 if ( nostyle & Opie::Force_Font ) { 1380 if ( nostyle & Opie::Force_Font ) {
1385 ff = "Vera"; 1381 ff = "Vera";
1386 fs = 10; 1382 fs = 10;
1387 } 1383 }
1388 1384
1389 setFont ( QFont ( ff, fs ), true ); 1385 setFont ( QFont ( ff, fs ), true );
1390 1386
1391#if !defined(OPIE_NO_OVERRIDE_QT) 1387#if !defined(OPIE_NO_OVERRIDE_QT)
1392 // revert to global blocking policy ... 1388 // revert to global blocking policy ...
1393 Opie::force_appearance = config. readBoolEntry ( "ForceStyle", false ) ? Opie::Force_All : Opie::Force_None; 1389 Opie::force_appearance = config. readBoolEntry ( "ForceStyle", false ) ? Opie::Force_All : Opie::Force_None;
1394 Opie::force_appearance &= ~nostyle; 1390 Opie::force_appearance &= ~nostyle;
1395#endif 1391#endif
1396#endif 1392#endif
1397} 1393}
1398 1394