author | zecke <zecke> | 2005-02-08 22:59:18 (UTC) |
---|---|---|
committer | zecke <zecke> | 2005-02-08 22:59:18 (UTC) |
commit | f24d8318de30b47ec8f877293fd175deaa0b914c (patch) (unidiff) | |
tree | 980c18e803b7b85573e1ab11a9ade2b281273d3e /library/qpeapplication.cpp | |
parent | 7cff42233a2e0e2761f54fea89db785c7b519c94 (diff) | |
download | opie-f24d8318de30b47ec8f877293fd175deaa0b914c.zip opie-f24d8318de30b47ec8f877293fd175deaa0b914c.tar.gz opie-f24d8318de30b47ec8f877293fd175deaa0b914c.tar.bz2 |
-Kill the need to compile Opie against a patched version of Qt/E
Remove the setStyle and setFont overrides
as a result remove settings from the buildsystem and the Apperance GUI
We do this as we won't run NeoCal or TKC Apps on a GCC3 (now default compiler)
libqpe, to run these applications one can use oz-compat
-rw-r--r-- | library/qpeapplication.cpp | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp index 1c5ced3..2bd7cbe 100644 --- a/library/qpeapplication.cpp +++ b/library/qpeapplication.cpp | |||
@@ -87,25 +87,24 @@ | |||
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 | #include <qtopia/qpeglobal.h> |
92 | 92 | ||
93 | #include <unistd.h> | 93 | #include <unistd.h> |
94 | #include <sys/file.h> | 94 | #include <sys/file.h> |
95 | #include <sys/ioctl.h> | 95 | #include <sys/ioctl.h> |
96 | #ifndef QT_NO_SOUND | 96 | #ifndef QT_NO_SOUND |
97 | #include <sys/soundcard.h> | 97 | #include <sys/soundcard.h> |
98 | #endif | 98 | #endif |
99 | #include "qt_override_p.h" | ||
100 | 99 | ||
101 | #include <backend/rohfeedback.h> | 100 | #include <backend/rohfeedback.h> |
102 | 101 | ||
103 | 102 | ||
104 | static bool useBigPixmaps = 0; | 103 | static bool useBigPixmaps = 0; |
105 | 104 | ||
106 | class HackWidget : public QWidget | 105 | class HackWidget : public QWidget |
107 | { | 106 | { |
108 | public: | 107 | public: |
109 | bool needsOk() | 108 | bool needsOk() |
110 | { return (getWState() & WState_Reserved1 ); } | 109 | { return (getWState() & WState_Reserved1 ); } |
111 | 110 | ||
@@ -1343,49 +1342,27 @@ bool qt_left_hand_scrollbars = false; | |||
1343 | extern bool qt_left_hand_scrollbars QPE_WEAK_SYMBOL; | 1342 | extern bool qt_left_hand_scrollbars QPE_WEAK_SYMBOL; |
1344 | #endif | 1343 | #endif |
1345 | 1344 | ||
1346 | /*! | 1345 | /*! |
1347 | \internal | 1346 | \internal |
1348 | */ | 1347 | */ |
1349 | void QPEApplication::applyStyle() | 1348 | void QPEApplication::applyStyle() |
1350 | { | 1349 | { |
1351 | Config config( "qpe" ); | 1350 | Config config( "qpe" ); |
1352 | config.setGroup( "Appearance" ); | 1351 | config.setGroup( "Appearance" ); |
1353 | 1352 | ||
1354 | #if QT_VERSION > 233 | 1353 | #if QT_VERSION > 233 |
1355 | #if !defined(OPIE_NO_OVERRIDE_QT) | ||
1356 | // don't block ourselves ... | ||
1357 | Opie::force_appearance = 0; | ||
1358 | |||
1359 | static QString appname = Opie::binaryName ( ); | ||
1360 | |||
1361 | QStringList ex = config. readListEntry ( "NoStyle", ';' ); | ||
1362 | int nostyle = 0; | ||
1363 | for ( QStringList::Iterator it = ex. begin ( ); it != ex. end ( ); ++it ) { | ||
1364 | if ( QRegExp (( *it ). mid ( 1 ), false, true ). find ( appname, 0 ) >= 0 ) { | ||
1365 | nostyle = ( *it ). left ( 1 ). toInt ( 0, 32 ); | ||
1366 | break; | ||
1367 | } | ||
1368 | } | ||
1369 | #else | ||
1370 | int nostyle = 0; | ||
1371 | #endif | ||
1372 | |||
1373 | // Widget style | 1354 | // Widget style |
1374 | QString style = config.readEntry( "Style", "FlatStyle" ); | 1355 | QString style = config.readEntry( "Style", "FlatStyle" ); |
1375 | 1356 | ||
1376 | // don't set a custom style | ||
1377 | if ( nostyle & Opie::Force_Style ) | ||
1378 | style = "FlatStyle"; | ||
1379 | |||
1380 | internalSetStyle ( style ); | 1357 | internalSetStyle ( style ); |
1381 | 1358 | ||
1382 | // Colors - from /etc/colors/Liquid.scheme | 1359 | // Colors - from /etc/colors/Liquid.scheme |
1383 | QColor bgcolor( config.readEntry( "Background", "#E0E0E0" ) ); | 1360 | QColor bgcolor( config.readEntry( "Background", "#E0E0E0" ) ); |
1384 | QColor btncolor( config.readEntry( "Button", "#96c8fa" ) ); | 1361 | QColor btncolor( config.readEntry( "Button", "#96c8fa" ) ); |
1385 | QPalette pal( btncolor, bgcolor ); | 1362 | QPalette pal( btncolor, bgcolor ); |
1386 | QString color = config.readEntry( "Highlight", "#73adef" ); | 1363 | QString color = config.readEntry( "Highlight", "#73adef" ); |
1387 | pal.setColor( QColorGroup::Highlight, QColor( color ) ); | 1364 | pal.setColor( QColorGroup::Highlight, QColor( color ) ); |
1388 | color = config.readEntry( "HighlightedText", "#FFFFFF" ); | 1365 | color = config.readEntry( "HighlightedText", "#FFFFFF" ); |
1389 | pal.setColor( QColorGroup::HighlightedText, QColor( color ) ); | 1366 | pal.setColor( QColorGroup::HighlightedText, QColor( color ) ); |
1390 | color = config.readEntry( "Text", "#000000" ); | 1367 | color = config.readEntry( "Text", "#000000" ); |
1391 | pal.setColor( QColorGroup::Text, QColor( color ) ); | 1368 | pal.setColor( QColorGroup::Text, QColor( color ) ); |
@@ -1398,51 +1375,34 @@ void QPEApplication::applyStyle() | |||
1398 | pal.color( QPalette::Active, QColorGroup::Background ).dark() ); | 1375 | pal.color( QPalette::Active, QColorGroup::Background ).dark() ); |
1399 | 1376 | ||
1400 | setPalette( pal, TRUE ); | 1377 | setPalette( pal, TRUE ); |
1401 | 1378 | ||
1402 | 1379 | ||
1403 | // Set the ScrollBar on the 'right' side but only if the weak symbol is present | 1380 | // Set the ScrollBar on the 'right' side but only if the weak symbol is present |
1404 | if (&qt_left_hand_scrollbars ) | 1381 | if (&qt_left_hand_scrollbars ) |
1405 | qt_left_hand_scrollbars = config.readBoolEntry( "LeftHand", false ); | 1382 | qt_left_hand_scrollbars = config.readBoolEntry( "LeftHand", false ); |
1406 | 1383 | ||
1407 | // Window Decoration | 1384 | // Window Decoration |
1408 | QString dec = config.readEntry( "Decoration", "Flat" ); | 1385 | QString dec = config.readEntry( "Decoration", "Flat" ); |
1409 | 1386 | ||
1410 | // don't set a custom deco | ||
1411 | if ( nostyle & Opie::Force_Decoration ) | ||
1412 | dec = ""; | ||
1413 | |||
1414 | |||
1415 | if ( dec != d->decorationName ) { | 1387 | if ( dec != d->decorationName ) { |
1416 | qwsSetDecoration( new QPEDecoration( dec ) ); | 1388 | qwsSetDecoration( new QPEDecoration( dec ) ); |
1417 | d->decorationName = dec; | 1389 | d->decorationName = dec; |
1418 | } | 1390 | } |
1419 | 1391 | ||
1420 | // Font | 1392 | // Font |
1421 | QString ff = config.readEntry( "FontFamily", font().family() ); | 1393 | QString ff = config.readEntry( "FontFamily", font().family() ); |
1422 | int fs = config.readNumEntry( "FontSize", font().pointSize() ); | 1394 | int fs = config.readNumEntry( "FontSize", font().pointSize() ); |
1423 | 1395 | ||
1424 | // don't set a custom font | ||
1425 | if ( nostyle & Opie::Force_Font ) { | ||
1426 | ff = "Vera"; | ||
1427 | fs = 10; | ||
1428 | } | ||
1429 | |||
1430 | setFont ( QFont ( ff, fs ), true ); | 1396 | setFont ( QFont ( ff, fs ), true ); |
1431 | |||
1432 | #if !defined(OPIE_NO_OVERRIDE_QT) | ||
1433 | // revert to global blocking policy ... | ||
1434 | Opie::force_appearance = config. readBoolEntry ( "ForceStyle", false ) ? Opie::Force_All : Opie::Force_None; | ||
1435 | Opie::force_appearance &= ~nostyle; | ||
1436 | #endif | ||
1437 | #endif | 1397 | #endif |
1438 | } | 1398 | } |
1439 | 1399 | ||
1440 | void QPEApplication::systemMessage( const QCString& msg, const QByteArray& data ) | 1400 | void QPEApplication::systemMessage( const QCString& msg, const QByteArray& data ) |
1441 | { | 1401 | { |
1442 | #ifdef Q_WS_QWS | 1402 | #ifdef Q_WS_QWS |
1443 | QDataStream stream( data, IO_ReadOnly ); | 1403 | QDataStream stream( data, IO_ReadOnly ); |
1444 | if ( msg == "applyStyle()" ) { | 1404 | if ( msg == "applyStyle()" ) { |
1445 | applyStyle(); | 1405 | applyStyle(); |
1446 | } | 1406 | } |
1447 | else if ( msg == "toggleApplicationMenu()" ) { | 1407 | else if ( msg == "toggleApplicationMenu()" ) { |
1448 | QWidget *active = activeWindow ( ); | 1408 | QWidget *active = activeWindow ( ); |