summaryrefslogtreecommitdiff
path: root/library/qpeapplication.cpp
Unidiff
Diffstat (limited to 'library/qpeapplication.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--library/qpeapplication.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp
index f4db1ab..19adb00 100644
--- a/library/qpeapplication.cpp
+++ b/library/qpeapplication.cpp
@@ -948,32 +948,33 @@ void QPEApplication::setDefaultRotation( int r )
948 e << r; 948 e << r;
949 } 949 }
950#endif 950#endif
951 951
952 } 952 }
953} 953}
954 954
955 955
956/*! 956/*!
957 \internal 957 \internal
958*/ 958*/
959void QPEApplication::applyStyle() 959void QPEApplication::applyStyle()
960{ 960{
961 Config config( "qpe" ); 961 Config config( "qpe" );
962 config.setGroup( "Appearance" ); 962 config.setGroup( "Appearance" );
963 963
964 #if QT_VERSION > 233
964 // don't block ourselves ... 965 // don't block ourselves ...
965 Opie::force_appearance = 0; 966 Opie::force_appearance = 0;
966 967
967 static QString appname = Opie::binaryName ( ); 968 static QString appname = Opie::binaryName ( );
968 969
969 QStringList ex = config. readListEntry ( "NoStyle", ';' ); 970 QStringList ex = config. readListEntry ( "NoStyle", ';' );
970 int nostyle = 0; 971 int nostyle = 0;
971 for ( QStringList::Iterator it = ex. begin ( ); it != ex. end ( ); ++it ) { 972 for ( QStringList::Iterator it = ex. begin ( ); it != ex. end ( ); ++it ) {
972 if ( QRegExp (( *it ). mid ( 1 ), false, true ). find ( appname, 0 ) >= 0 ) { 973 if ( QRegExp (( *it ). mid ( 1 ), false, true ). find ( appname, 0 ) >= 0 ) {
973 nostyle = ( *it ). left ( 1 ). toInt ( 0, 32 ); 974 nostyle = ( *it ). left ( 1 ). toInt ( 0, 32 );
974 break; 975 break;
975 } 976 }
976 } 977 }
977 978
978 // Widget style 979 // Widget style
979 QString style = config.readEntry( "Style", "Light" ); 980 QString style = config.readEntry( "Style", "Light" );
@@ -1020,32 +1021,33 @@ void QPEApplication::applyStyle()
1020 1021
1021 // Font 1022 // Font
1022 QString ff = config.readEntry( "FontFamily", font().family() ); 1023 QString ff = config.readEntry( "FontFamily", font().family() );
1023 int fs = config.readNumEntry( "FontSize", font().pointSize() ); 1024 int fs = config.readNumEntry( "FontSize", font().pointSize() );
1024 1025
1025 // don't set a custom font 1026 // don't set a custom font
1026 if ( nostyle & Opie::Force_Font ) { 1027 if ( nostyle & Opie::Force_Font ) {
1027 ff = "Vera"; 1028 ff = "Vera";
1028 fs = 10; 1029 fs = 10;
1029 } 1030 }
1030 1031
1031 setFont ( QFont ( ff, fs ), true ); 1032 setFont ( QFont ( ff, fs ), true );
1032 1033
1033 // revert to global blocking policy ... 1034 // revert to global blocking policy ...
1034 Opie::force_appearance = config. readBoolEntry ( "ForceStyle", false ) ? Opie::Force_All : Opie::Force_None; 1035 Opie::force_appearance = config. readBoolEntry ( "ForceStyle", false ) ? Opie::Force_All : Opie::Force_None;
1035 Opie::force_appearance &= ~nostyle; 1036 Opie::force_appearance &= ~nostyle;
1037 #endif
1036} 1038}
1037 1039
1038void QPEApplication::systemMessage( const QCString& msg, const QByteArray& data ) 1040void QPEApplication::systemMessage( const QCString& msg, const QByteArray& data )
1039{ 1041{
1040#ifdef Q_WS_QWS 1042#ifdef Q_WS_QWS
1041 QDataStream stream( data, IO_ReadOnly ); 1043 QDataStream stream( data, IO_ReadOnly );
1042 if ( msg == "applyStyle()" ) { 1044 if ( msg == "applyStyle()" ) {
1043 applyStyle(); 1045 applyStyle();
1044 } 1046 }
1045 else if ( msg == "toggleApplicationMenu()" ) { 1047 else if ( msg == "toggleApplicationMenu()" ) {
1046 QWidget *active = activeWindow ( ); 1048 QWidget *active = activeWindow ( );
1047 1049
1048 if ( active ) { 1050 if ( active ) {
1049 QPEMenuToolFocusManager *man = QPEMenuToolFocusManager::manager ( ); 1051 QPEMenuToolFocusManager *man = QPEMenuToolFocusManager::manager ( );
1050 bool oldactive = man-> isActive ( ); 1052 bool oldactive = man-> isActive ( );
1051 1053