author | sandman <sandman> | 2002-07-06 16:42:29 (UTC) |
---|---|---|
committer | sandman <sandman> | 2002-07-06 16:42:29 (UTC) |
commit | 3a422983abc7342c9229dccac825d0608fca10f3 (patch) (unidiff) | |
tree | fd0d71eab4df0b286b78efe24184525ae4c819a3 | |
parent | 8beb5fcdbca8110dc586a7e620bf8eae892087fb (diff) | |
download | opie-3a422983abc7342c9229dccac825d0608fca10f3.zip opie-3a422983abc7342c9229dccac825d0608fca10f3.tar.gz opie-3a422983abc7342c9229dccac825d0608fca10f3.tar.bz2 |
Complete renovation of the external style API:
- created two QCom interfaces in "styleinterface.h"
- moved the liquid/theme settings apps into the plugins
- modified the plugin interface for all three styles
- extended appearance to fully support the new API (replaces the
settings apps)
Additional work:
- made a workaround in appearance for a Qt Bug -- now a QDialog again
(this should really be fixed in Qt, but Z won't work that way)
28 files changed, 705 insertions, 309 deletions
@@ -52,5 +52,3 @@ NONCORETOOLS = noncore/tools/calculator noncore/tools/clock \ | |||
52 | 52 | ||
53 | NONCORESTYLES = noncore/styles/liquid noncore/styles/liquid/settings \ | 53 | NONCORESTYLES = noncore/styles/liquid noncore/styles/theme noncore/styles/metal |
54 | noncore/styles/theme noncore/styles/theme/settings \ | ||
55 | noncore/styles/metal | ||
56 | 54 | ||
diff --git a/apps/Settings/Liquid.desktop b/apps/Settings/Liquid.desktop deleted file mode 100644 index 8a1727f..0000000 --- a/apps/Settings/Liquid.desktop +++ b/dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | [Desktop Entry] | ||
2 | Type=Application | ||
3 | Exec=liquid-settings | ||
4 | Icon=liquid/Liquid | ||
5 | Name=Liquid-Settings | ||
6 | Name[de]=Liquid-Einstellungen | ||
7 | |||
diff --git a/apps/Settings/Theme.desktop b/apps/Settings/Theme.desktop deleted file mode 100644 index 197184f..0000000 --- a/apps/Settings/Theme.desktop +++ b/dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | [Desktop Entry] | ||
2 | Type=Application | ||
3 | Exec=theme-settings | ||
4 | Icon=theme/Theme | ||
5 | Name=Theme-Settings | ||
6 | Name[de]=Thema-Einstellungen | ||
7 | |||
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp index dff8235..187a7e2 100644 --- a/library/qpeapplication.cpp +++ b/library/qpeapplication.cpp | |||
@@ -66,2 +66,3 @@ | |||
66 | #include "qpestyle.h" | 66 | #include "qpestyle.h" |
67 | #include "styleinterface.h" | ||
67 | #if QT_VERSION >= 300 | 68 | #if QT_VERSION >= 300 |
@@ -76,3 +77,2 @@ | |||
76 | #include <qpe/qlibrary.h> | 77 | #include <qpe/qlibrary.h> |
77 | #include <dlfcn.h> | ||
78 | #endif | 78 | #endif |
@@ -107,3 +107,4 @@ | |||
107 | 107 | ||
108 | class QPEApplicationData { | 108 | class QPEApplicationData |
109 | { | ||
109 | public: | 110 | public: |
@@ -125,6 +126,8 @@ public: | |||
125 | QString appName; | 126 | QString appName; |
126 | struct QCopRec { | 127 | struct QCopRec |
128 | { | ||
127 | QCopRec(const QCString &ch, const QCString &msg, | 129 | QCopRec(const QCString &ch, const QCString &msg, |
128 | const QByteArray &d) : | 130 | const QByteArray &d) : |
129 | channel(ch), message(msg), data(d) { } | 131 | channel( ch ), message( msg ), data( d ) |
132 | { } | ||
130 | 133 | ||
@@ -155,3 +158,4 @@ public: | |||
155 | 158 | ||
156 | class ResourceMimeFactory : public QMimeSourceFactory { | 159 | class ResourceMimeFactory : public QMimeSourceFactory |
160 | { | ||
157 | public: | 161 | public: |
@@ -177,3 +181,4 @@ public: | |||
177 | r = new QImageDrag(img); | 181 | r = new QImageDrag(img); |
178 | } while (!r && sl>0); | 182 | } |
183 | while ( !r && sl > 0 ); | ||
179 | } | 184 | } |
@@ -202,3 +207,4 @@ static void setVolume(int t=0, int percent=-1) | |||
202 | } | 207 | } |
203 | } break; | 208 | } |
209 | break; | ||
204 | } | 210 | } |
@@ -221,3 +227,4 @@ static void setMic(int t=0, int percent=-1) | |||
221 | } | 227 | } |
222 | } break; | 228 | } |
229 | break; | ||
223 | } | 230 | } |
@@ -230,4 +237,6 @@ int qpe_sysBrightnessSteps() | |||
230 | #elif defined(QT_QWS_EBX) | 237 | #elif defined(QT_QWS_EBX) |
238 | |||
231 | return 4; | 239 | return 4; |
232 | #else | 240 | #else |
241 | |||
233 | return 255; // ? | 242 | return 255; // ? |
@@ -244,2 +253,3 @@ static int& hack(int& i) | |||
244 | #endif | 253 | #endif |
254 | |||
245 | return i; | 255 | return i; |
@@ -288,3 +298,5 @@ static void setBacklight(int bright) | |||
288 | #if defined(QT_QWS_EBX) | 298 | #if defined(QT_QWS_EBX) |
289 | } else if ( QFile::exists("/dev/fl") ) { | 299 | |
300 | } | ||
301 | else if ( QFile::exists( "/dev/fl" ) ) { | ||
290 | #define FL_IOCTL_STEP_CONTRAST 100 | 302 | #define FL_IOCTL_STEP_CONTRAST 100 |
@@ -294,3 +306,4 @@ static void setBacklight(int bright) | |||
294 | int bl = ( bright * steps + 127 ) / 255; | 306 | int bl = ( bright * steps + 127 ) / 255; |
295 | if ( bright && !bl ) bl = 1; | 307 | if ( bright && !bl ) |
308 | bl = 1; | ||
296 | bl = ioctl(fd, FL_IOCTL_STEP_CONTRAST, bl); | 309 | bl = ioctl(fd, FL_IOCTL_STEP_CONTRAST, bl); |
@@ -300,3 +313,6 @@ static void setBacklight(int bright) | |||
300 | #elif defined(QT_QWS_IPAQ) | 313 | #elif defined(QT_QWS_IPAQ) |
301 | } else if ( QFile::exists("/dev/ts") || QFile::exists("/dev/h3600_ts") ) { | 314 | |
315 | } | ||
316 | else if ( QFile::exists( "/dev/ts" ) || QFile::exists( "/dev/h3600_ts" ) ) | ||
317 | { | ||
302 | typedef struct { | 318 | typedef struct { |
@@ -305,3 +321,4 @@ static void setBacklight(int bright) | |||
305 | unsigned char brightness; | 321 | unsigned char brightness; |
306 | } FLITE_IN; | 322 | } |
323 | FLITE_IN; | ||
307 | # ifndef FLITE_ON | 324 | # ifndef FLITE_ON |
@@ -312,2 +329,3 @@ static void setBacklight(int bright) | |||
312 | # endif | 329 | # endif |
330 | |||
313 | int fd; | 331 | int fd; |
@@ -331,3 +349,5 @@ static void setBacklight(int bright) | |||
331 | 349 | ||
332 | void qpe_setBacklight(int bright) { setBacklight(bright); } | 350 | void qpe_setBacklight( int bright ) { |
351 | setBacklight( bright ); | ||
352 | } | ||
333 | 353 | ||
@@ -360,3 +380,6 @@ public: | |||
360 | fd=open("/dev/fb0",O_RDWR); | 380 | fd=open("/dev/fb0",O_RDWR); |
361 | if (fd != -1) { ioctl(fd,FBIOBLANK,VESA_NO_BLANKING); close(fd); } | 381 | if ( fd != -1 ) { |
382 | ioctl( fd, FBIOBLANK, VESA_NO_BLANKING ); | ||
383 | close( fd ); | ||
384 | } | ||
362 | } | 385 | } |
@@ -368,3 +391,7 @@ public: | |||
368 | fd=open("/dev/fb0",O_RDWR); | 391 | fd=open("/dev/fb0",O_RDWR); |
369 | if (fd != -1) { ioctl(fd,FBIOBLANK,VESA_NO_BLANKING); close(fd); } | 392 | if ( fd != -1 ) |
393 | { | ||
394 | ioctl( fd, FBIOBLANK, VESA_NO_BLANKING ); | ||
395 | close( fd ); | ||
396 | } | ||
370 | } | 397 | } |
@@ -396,3 +423,7 @@ public: | |||
396 | fd=open("/dev/fb0",O_RDWR); | 423 | fd=open("/dev/fb0",O_RDWR); |
397 | if (fd != -1) { ioctl(fd,FBIOBLANK,VESA_POWERDOWN); close(fd); } | 424 | if ( fd != -1 ) |
425 | { | ||
426 | ioctl( fd, FBIOBLANK, VESA_POWERDOWN ); | ||
427 | close( fd ); | ||
428 | } | ||
398 | LcdOn = FALSE; | 429 | LcdOn = FALSE; |
@@ -574,3 +605,4 @@ QPEApplication::QPEApplication( int& argc, char **argv, Type t ) | |||
574 | argc-=1; | 605 | argc-=1; |
575 | } else if ( qstrcmp(argv[a],"-preload-show")==0 ) { | 606 | } |
607 | else if ( qstrcmp( argv[ a ], "-preload-show" ) == 0 ) { | ||
576 | argv[a] = argv[a+1]; | 608 | argv[a] = argv[a+1]; |
@@ -591,2 +623,3 @@ QPEApplication::QPEApplication( int& argc, char **argv, Type t ) | |||
591 | #ifndef QT_NO_TRANSLATION | 623 | #ifndef QT_NO_TRANSLATION |
624 | |||
592 | QStringList langs = Global::languageList(); | 625 | QStringList langs = Global::languageList(); |
@@ -690,4 +723,6 @@ void QPEApplication::setInputMethodHint( QWidget* w, InputMethodHint mode ) | |||
690 | if ( mode == Normal ) { | 723 | if ( mode == Normal ) { |
691 | inputMethodDict->remove(w); | 724 | inputMethodDict->remove |
692 | } else { | 725 | ( w ); |
726 | } | ||
727 | else { | ||
693 | inputMethodDict->insert(w,(void*)mode); | 728 | inputMethodDict->insert(w,(void*)mode); |
@@ -699,4 +734,10 @@ class HackDialog : public QDialog | |||
699 | public: | 734 | public: |
700 | void acceptIt() { accept(); } | 735 | void acceptIt() |
701 | void rejectIt() { reject(); } | 736 | { |
737 | accept(); | ||
738 | } | ||
739 | void rejectIt() | ||
740 | { | ||
741 | reject(); | ||
742 | } | ||
702 | }; | 743 | }; |
@@ -723,3 +764,5 @@ public: | |||
723 | bool needsOk() | 764 | bool needsOk() |
724 | { return (getWState() & WState_Reserved1 ); } | 765 | { |
766 | return ( getWState() & WState_Reserved1 ); | ||
767 | } | ||
725 | }; | 768 | }; |
@@ -766,3 +809,4 @@ bool QPEApplication::qwsEventFilter( QWSEvent *e ) | |||
766 | return TRUE; | 809 | return TRUE; |
767 | } else if ( ((HackWidget *)active)->needsOk() ) { | 810 | } |
811 | else if ( ( ( HackWidget * ) active ) ->needsOk() ) { | ||
768 | QSignal s; | 812 | QSignal s; |
@@ -770,3 +814,4 @@ bool QPEApplication::qwsEventFilter( QWSEvent *e ) | |||
770 | s.activate(); | 814 | s.activate(); |
771 | } else { | 815 | } |
816 | else { | ||
772 | // do the same as with the select key: Map to the default action of the widget: | 817 | // do the same as with the select key: Map to the default action of the widget: |
@@ -776,6 +821,8 @@ bool QPEApplication::qwsEventFilter( QWSEvent *e ) | |||
776 | } | 821 | } |
777 | } else if ( ke->simpleData.keycode == Qt::Key_F30 ) { | 822 | } |
823 | else if ( ke->simpleData.keycode == Qt::Key_F30 ) { | ||
778 | // Use special "select" key to do whatever default action a widget has | 824 | // Use special "select" key to do whatever default action a widget has |
779 | mapToDefaultAction( ke, Qt::Key_Space ); | 825 | mapToDefaultAction( ke, Qt::Key_Space ); |
780 | } else if ( ke->simpleData.keycode == Qt::Key_Escape && | 826 | } |
827 | else if ( ke->simpleData.keycode == Qt::Key_Escape && | ||
781 | ke->simpleData.is_press ) { | 828 | ke->simpleData.is_press ) { |
@@ -790,3 +837,4 @@ bool QPEApplication::qwsEventFilter( QWSEvent *e ) | |||
790 | return TRUE; | 837 | return TRUE; |
791 | } else if ( strcmp( argv()[0], "embeddedkonsole") != 0 ) { | 838 | } |
839 | else if ( strcmp( argv() [ 0 ], "embeddedkonsole" ) != 0 ) { | ||
792 | active->close(); | 840 | active->close(); |
@@ -802,2 +850,3 @@ bool QPEApplication::qwsEventFilter( QWSEvent *e ) | |||
802 | #endif | 850 | #endif |
851 | |||
803 | } | 852 | } |
@@ -816,3 +865,4 @@ bool QPEApplication::qwsEventFilter( QWSEvent *e ) | |||
816 | } | 865 | } |
817 | } else { | 866 | } |
867 | else { | ||
818 | // make sure our modal widget is ALWAYS on top | 868 | // make sure our modal widget is ALWAYS on top |
@@ -850,2 +900,3 @@ QPEApplication::~QPEApplication() | |||
850 | #endif | 900 | #endif |
901 | |||
851 | delete d; | 902 | delete d; |
@@ -888,7 +939,10 @@ int QPEApplication::defaultRotation() | |||
888 | deforient = 90; | 939 | deforient = 90; |
889 | } else if ( d.contains("Rot180") ) { | 940 | } |
941 | else if ( d.contains( "Rot180" ) ) { | ||
890 | deforient = 180; | 942 | deforient = 180; |
891 | } else if ( d.contains("Rot270") ) { | 943 | } |
944 | else if ( d.contains( "Rot270" ) ) { | ||
892 | deforient = 270; | 945 | deforient = 270; |
893 | } else { | 946 | } |
947 | else { | ||
894 | deforient=0; | 948 | deforient=0; |
@@ -907,3 +961,4 @@ void QPEApplication::setDefaultRotation(int r) | |||
907 | setenv("QWS_DISPLAY", QString("Transformed:Rot%1:0").arg(r).latin1(), 1); | 961 | setenv("QWS_DISPLAY", QString("Transformed:Rot%1:0").arg(r).latin1(), 1); |
908 | } else { | 962 | } |
963 | else { | ||
909 | QCopEnvelope("QPE/System", "setDefaultRotation(int)") << r; | 964 | QCopEnvelope("QPE/System", "setDefaultRotation(int)") << r; |
@@ -952,3 +1007,4 @@ void QPEApplication::systemMessage( const QCString &msg, const QByteArray &data) | |||
952 | applyStyle(); | 1007 | applyStyle(); |
953 | } else if ( msg == "setScreenSaverInterval(int)" ) { | 1008 | } |
1009 | else if ( msg == "setScreenSaverInterval(int)" ) { | ||
954 | if ( type() == GuiServer ) { | 1010 | if ( type() == GuiServer ) { |
@@ -958,3 +1014,4 @@ void QPEApplication::systemMessage( const QCString &msg, const QByteArray &data) | |||
958 | } | 1014 | } |
959 | } else if ( msg == "setScreenSaverIntervals(int,int,int)" ) { | 1015 | } |
1016 | else if ( msg == "setScreenSaverIntervals(int,int,int)" ) { | ||
960 | if ( type() == GuiServer ) { | 1017 | if ( type() == GuiServer ) { |
@@ -964,3 +1021,4 @@ void QPEApplication::systemMessage( const QCString &msg, const QByteArray &data) | |||
964 | } | 1021 | } |
965 | } else if ( msg == "setBacklight(int)" ) { | 1022 | } |
1023 | else if ( msg == "setBacklight(int)" ) { | ||
966 | if ( type() == GuiServer ) { | 1024 | if ( type() == GuiServer ) { |
@@ -970,3 +1028,4 @@ void QPEApplication::systemMessage( const QCString &msg, const QByteArray &data) | |||
970 | } | 1028 | } |
971 | } else if ( msg == "setDefaultRotation(int)" ) { | 1029 | } |
1030 | else if ( msg == "setDefaultRotation(int)" ) { | ||
972 | if ( type() == GuiServer ) { | 1031 | if ( type() == GuiServer ) { |
@@ -976,15 +1035,20 @@ void QPEApplication::systemMessage( const QCString &msg, const QByteArray &data) | |||
976 | } | 1035 | } |
977 | } else if ( msg == "shutdown()" ) { | 1036 | } |
1037 | else if ( msg == "shutdown()" ) { | ||
978 | if ( type() == GuiServer ) | 1038 | if ( type() == GuiServer ) |
979 | shutdown(); | 1039 | shutdown(); |
980 | } else if ( msg == "quit()" ) { | 1040 | } |
1041 | else if ( msg == "quit()" ) { | ||
981 | if ( type() != GuiServer ) | 1042 | if ( type() != GuiServer ) |
982 | tryQuit(); | 1043 | tryQuit(); |
983 | } else if ( msg == "forceQuit()" ) { | 1044 | } |
1045 | else if ( msg == "forceQuit()" ) { | ||
984 | if ( type() != GuiServer ) | 1046 | if ( type() != GuiServer ) |
985 | quit(); | 1047 | quit(); |
986 | } else if ( msg == "restart()" ) { | 1048 | } |
1049 | else if ( msg == "restart()" ) { | ||
987 | if ( type() == GuiServer ) | 1050 | if ( type() == GuiServer ) |
988 | restart(); | 1051 | restart(); |
989 | } else if ( msg == "grabKeyboard(QString)" ) { | 1052 | } |
1053 | else if ( msg == "grabKeyboard(QString)" ) { | ||
990 | QString who; | 1054 | QString who; |
@@ -997,3 +1061,4 @@ void QPEApplication::systemMessage( const QCString &msg, const QByteArray &data) | |||
997 | d->kbgrabber = 2; | 1061 | d->kbgrabber = 2; |
998 | } else if ( msg == "language(QString)" ) { | 1062 | } |
1063 | else if ( msg == "language(QString)" ) { | ||
999 | if ( type() == GuiServer ) { | 1064 | if ( type() == GuiServer ) { |
@@ -1010,3 +1075,4 @@ void QPEApplication::systemMessage( const QCString &msg, const QByteArray &data) | |||
1010 | } | 1075 | } |
1011 | } else if ( msg == "timeChange(QString)" ) { | 1076 | } |
1077 | else if ( msg == "timeChange(QString)" ) { | ||
1012 | QString t; | 1078 | QString t; |
@@ -1019,3 +1085,4 @@ void QPEApplication::systemMessage( const QCString &msg, const QByteArray &data) | |||
1019 | emit timeChanged(); | 1085 | emit timeChanged(); |
1020 | } else if ( msg == "execute(QString)" ) { | 1086 | } |
1087 | else if ( msg == "execute(QString)" ) { | ||
1021 | if ( type() == GuiServer ) { | 1088 | if ( type() == GuiServer ) { |
@@ -1025,3 +1092,4 @@ void QPEApplication::systemMessage( const QCString &msg, const QByteArray &data) | |||
1025 | } | 1092 | } |
1026 | } else if ( msg == "execute(QString,QString)" ) { | 1093 | } |
1094 | else if ( msg == "execute(QString,QString)" ) { | ||
1027 | if ( type() == GuiServer ) { | 1095 | if ( type() == GuiServer ) { |
@@ -1031,3 +1099,4 @@ void QPEApplication::systemMessage( const QCString &msg, const QByteArray &data) | |||
1031 | } | 1099 | } |
1032 | } else if ( msg == "addAlarm(QDateTime,QCString,QCString,int)" ) { | 1100 | } |
1101 | else if ( msg == "addAlarm(QDateTime,QCString,QCString,int)" ) { | ||
1033 | if ( type() == GuiServer ) { | 1102 | if ( type() == GuiServer ) { |
@@ -1039,3 +1108,4 @@ void QPEApplication::systemMessage( const QCString &msg, const QByteArray &data) | |||
1039 | } | 1108 | } |
1040 | } else if ( msg == "deleteAlarm(QDateTime,QCString,QCString,int)" ) { | 1109 | } |
1110 | else if ( msg == "deleteAlarm(QDateTime,QCString,QCString,int)" ) { | ||
1041 | if ( type() == GuiServer ) { | 1111 | if ( type() == GuiServer ) { |
@@ -1047,3 +1117,4 @@ void QPEApplication::systemMessage( const QCString &msg, const QByteArray &data) | |||
1047 | } | 1117 | } |
1048 | } else if ( msg == "clockChange(bool)" ) { | 1118 | } |
1119 | else if ( msg == "clockChange(bool)" ) { | ||
1049 | int tmp; | 1120 | int tmp; |
@@ -1051,3 +1122,4 @@ void QPEApplication::systemMessage( const QCString &msg, const QByteArray &data) | |||
1051 | emit clockChanged( tmp ); | 1122 | emit clockChanged( tmp ); |
1052 | } else if ( msg == "weekChange(bool)" ) { | 1123 | } |
1124 | else if ( msg == "weekChange(bool)" ) { | ||
1053 | int tmp; | 1125 | int tmp; |
@@ -1055,3 +1127,4 @@ void QPEApplication::systemMessage( const QCString &msg, const QByteArray &data) | |||
1055 | emit weekChanged( tmp ); | 1127 | emit weekChanged( tmp ); |
1056 | } else if ( msg == "setDateFormat(DateFormat)" ) { | 1128 | } |
1129 | else if ( msg == "setDateFormat(DateFormat)" ) { | ||
1057 | DateFormat tmp; | 1130 | DateFormat tmp; |
@@ -1059,3 +1132,4 @@ void QPEApplication::systemMessage( const QCString &msg, const QByteArray &data) | |||
1059 | emit dateFormatChanged( tmp ); | 1132 | emit dateFormatChanged( tmp ); |
1060 | } else if ( msg == "setVolume(int,int)" ) { | 1133 | } |
1134 | else if ( msg == "setVolume(int,int)" ) { | ||
1061 | int t,v; | 1135 | int t,v; |
@@ -1064,3 +1138,4 @@ void QPEApplication::systemMessage( const QCString &msg, const QByteArray &data) | |||
1064 | emit volumeChanged( muted ); | 1138 | emit volumeChanged( muted ); |
1065 | } else if ( msg == "volumeChange(bool)" ) { | 1139 | } |
1140 | else if ( msg == "volumeChange(bool)" ) { | ||
1066 | stream >> muted; | 1141 | stream >> muted; |
@@ -1068,3 +1143,4 @@ void QPEApplication::systemMessage( const QCString &msg, const QByteArray &data) | |||
1068 | emit volumeChanged( muted ); | 1143 | emit volumeChanged( muted ); |
1069 | } else if ( msg == "setMic(int,int)") { // Added: 2002-02-08 by Jeremy Cowgar <jc@cowgar.com> | 1144 | } |
1145 | else if ( msg == "setMic(int,int)" ) { // Added: 2002-02-08 by Jeremy Cowgar <jc@cowgar.com> | ||
1070 | int t,v; | 1146 | int t,v; |
@@ -1073,3 +1149,4 @@ void QPEApplication::systemMessage( const QCString &msg, const QByteArray &data) | |||
1073 | emit micChanged( micMuted ); | 1149 | emit micChanged( micMuted ); |
1074 | } else if ( msg == "micChange(bool)" ) { // Added: 2002-02-08 by Jeremy Cowgar <jc@cowgar.com> | 1150 | } |
1151 | else if ( msg == "micChange(bool)" ) { // Added: 2002-02-08 by Jeremy Cowgar <jc@cowgar.com> | ||
1075 | stream >> micMuted; | 1152 | stream >> micMuted; |
@@ -1077,3 +1154,4 @@ void QPEApplication::systemMessage( const QCString &msg, const QByteArray &data) | |||
1077 | emit micChanged( micMuted ); | 1154 | emit micChanged( micMuted ); |
1078 | } else if ( msg == "setScreenSaverMode(int)" ) { | 1155 | } |
1156 | else if ( msg == "setScreenSaverMode(int)" ) { | ||
1079 | if ( type() == GuiServer ) { | 1157 | if ( type() == GuiServer ) { |
@@ -1098,3 +1176,4 @@ bool QPEApplication::raiseAppropriateWindow() | |||
1098 | QWidget *top = d->qpe_main_widget; | 1176 | QWidget *top = d->qpe_main_widget; |
1099 | if ( !top ) top =mainWidget(); | 1177 | if ( !top ) |
1178 | top = mainWidget(); | ||
1100 | if ( top && d->keep_running ) { | 1179 | if ( top && d->keep_running ) { |
@@ -1103,2 +1182,3 @@ bool QPEApplication::raiseAppropriateWindow() | |||
1103 | #ifdef Q_WS_QWS | 1182 | #ifdef Q_WS_QWS |
1183 | |||
1104 | if ( !d->nomaximize ) | 1184 | if ( !d->nomaximize ) |
@@ -1107,2 +1187,3 @@ bool QPEApplication::raiseAppropriateWindow() | |||
1107 | #endif | 1187 | #endif |
1188 | |||
1108 | top->show(); | 1189 | top->show(); |
@@ -1127,8 +1208,11 @@ void QPEApplication::pidMessage( const QCString &msg, const QByteArray & data) | |||
1127 | tryQuit(); | 1208 | tryQuit(); |
1128 | } else if ( msg == "quitIfInvisible()" ) { | 1209 | } |
1210 | else if ( msg == "quitIfInvisible()" ) { | ||
1129 | if ( d->qpe_main_widget && !d->qpe_main_widget->isVisible() ) | 1211 | if ( d->qpe_main_widget && !d->qpe_main_widget->isVisible() ) |
1130 | quit(); | 1212 | quit(); |
1131 | } else if ( msg == "close()" ) { | 1213 | } |
1214 | else if ( msg == "close()" ) { | ||
1132 | hideOrQuit(); | 1215 | hideOrQuit(); |
1133 | } else if ( msg == "disablePreload()" ) { | 1216 | } |
1217 | else if ( msg == "disablePreload()" ) { | ||
1134 | d->preloaded = FALSE; | 1218 | d->preloaded = FALSE; |
@@ -1136,3 +1220,4 @@ void QPEApplication::pidMessage( const QCString &msg, const QByteArray & data) | |||
1136 | /* so that quit will quit */ | 1220 | /* so that quit will quit */ |
1137 | } else if ( msg == "enablePreload()" ) { | 1221 | } |
1222 | else if ( msg == "enablePreload()" ) { | ||
1138 | d->preloaded = TRUE; | 1223 | d->preloaded = TRUE; |
@@ -1140,3 +1225,4 @@ void QPEApplication::pidMessage( const QCString &msg, const QByteArray & data) | |||
1140 | /* so next quit won't quit */ | 1225 | /* so next quit won't quit */ |
1141 | } else if ( msg == "raise()" ) { | 1226 | } |
1227 | else if ( msg == "raise()" ) { | ||
1142 | d->keep_running = TRUE; | 1228 | d->keep_running = TRUE; |
@@ -1144,3 +1230,4 @@ void QPEApplication::pidMessage( const QCString &msg, const QByteArray & data) | |||
1144 | raiseAppropriateWindow(); | 1230 | raiseAppropriateWindow(); |
1145 | } else if ( msg == "flush()" ) { | 1231 | } |
1232 | else if ( msg == "flush()" ) { | ||
1146 | emit flush(); | 1233 | emit flush(); |
@@ -1149,5 +1236,7 @@ void QPEApplication::pidMessage( const QCString &msg, const QByteArray & data) | |||
1149 | e << d->appName; | 1236 | e << d->appName; |
1150 | } else if ( msg == "reload()" ) { | 1237 | } |
1238 | else if ( msg == "reload()" ) { | ||
1151 | emit reload(); | 1239 | emit reload(); |
1152 | } else if ( msg == "setDocument(QString)" ) { | 1240 | } |
1241 | else if ( msg == "setDocument(QString)" ) { | ||
1153 | d->keep_running = TRUE; | 1242 | d->keep_running = TRUE; |
@@ -1161,6 +1250,8 @@ void QPEApplication::pidMessage( const QCString &msg, const QByteArray & data) | |||
1161 | Global::setDocument( mw, doc ); | 1250 | Global::setDocument( mw, doc ); |
1162 | } else if ( msg == "nextView()" ) { | 1251 | } |
1252 | else if ( msg == "nextView()" ) { | ||
1163 | if ( raiseAppropriateWindow() ) | 1253 | if ( raiseAppropriateWindow() ) |
1164 | emit appMessage( msg, data); | 1254 | emit appMessage( msg, data); |
1165 | } else { | 1255 | } |
1256 | else { | ||
1166 | emit appMessage( msg, data); | 1257 | emit appMessage( msg, data); |
@@ -1215,5 +1306,7 @@ void QPEApplication::showMainWidget( QWidget* mw, bool nomaximize ) | |||
1215 | #endif | 1306 | #endif |
1307 | |||
1216 | mw->show(); | 1308 | mw->show(); |
1217 | } | 1309 | } |
1218 | } else if ( d->keep_running ) { | 1310 | } |
1311 | else if ( d->keep_running ) { | ||
1219 | #ifdef Q_WS_QWS | 1312 | #ifdef Q_WS_QWS |
@@ -1223,2 +1316,3 @@ void QPEApplication::showMainWidget( QWidget* mw, bool nomaximize ) | |||
1223 | #endif | 1316 | #endif |
1317 | |||
1224 | mw->show(); | 1318 | mw->show(); |
@@ -1254,5 +1348,7 @@ void QPEApplication::showMainDocumentWidget( QWidget* mw, bool nomaximize ) | |||
1254 | #endif | 1348 | #endif |
1349 | |||
1255 | mw->show(); | 1350 | mw->show(); |
1256 | } | 1351 | } |
1257 | } else if ( d->keep_running ) { | 1352 | } |
1353 | else if ( d->keep_running ) { | ||
1258 | #ifdef Q_WS_QWS | 1354 | #ifdef Q_WS_QWS |
@@ -1262,2 +1358,3 @@ void QPEApplication::showMainDocumentWidget( QWidget* mw, bool nomaximize ) | |||
1262 | #endif | 1358 | #endif |
1359 | |||
1263 | mw->show(); | 1360 | mw->show(); |
@@ -1303,5 +1400,7 @@ void QPEApplication::internalSetStyle( const QString &style ) | |||
1303 | setStyle( new QPEStyle ); | 1400 | setStyle( new QPEStyle ); |
1304 | } else { | 1401 | } |
1402 | else { | ||
1305 | QStyle *s = QStyleFactory::create(style); | 1403 | QStyle *s = QStyleFactory::create(style); |
1306 | if ( s ) setStyle(s); | 1404 | if ( s ) |
1405 | setStyle( s ); | ||
1307 | } | 1406 | } |
@@ -1310,5 +1409,7 @@ void QPEApplication::internalSetStyle( const QString &style ) | |||
1310 | setStyle( new QWindowsStyle ); | 1409 | setStyle( new QWindowsStyle ); |
1311 | } else if ( style == "QPE" ) { | 1410 | } |
1411 | else if ( style == "QPE" ) { | ||
1312 | setStyle( new QPEStyle ); | 1412 | setStyle( new QPEStyle ); |
1313 | } else if ( style == "Light" ) { | 1413 | } |
1414 | else if ( style == "Light" ) { | ||
1314 | setStyle( new LightStyle ); | 1415 | setStyle( new LightStyle ); |
@@ -1333,2 +1434,39 @@ void QPEApplication::internalSetStyle( const QString &style ) | |||
1333 | else { | 1434 | else { |
1435 | QStyle *sty = 0; | ||
1436 | QString path = QPEApplication::qpeDir ( ) + "/plugins/styles/lib" + style. lower ( ) + ".so"; | ||
1437 | |||
1438 | static QLibrary *lastlib = 0; | ||
1439 | static StyleInterface *lastiface = 0; | ||
1440 | |||
1441 | QLibrary *lib = new QLibrary ( path ); | ||
1442 | StyleInterface *iface = 0; | ||
1443 | |||
1444 | if ( lib-> queryInterface ( IID_Style, ( QUnknownInterface ** ) &iface ) == QS_OK ) | ||
1445 | sty = iface-> create ( ); | ||
1446 | |||
1447 | if ( sty ) { | ||
1448 | setStyle ( sty ); | ||
1449 | |||
1450 | qDebug ( "Got Style: %p -- iface: %p, lib: %p\n", sty, iface, lib ); | ||
1451 | |||
1452 | if ( lastiface ) | ||
1453 | lastiface-> release ( ); | ||
1454 | lastiface = iface; | ||
1455 | |||
1456 | |||
1457 | if ( lastlib ) { | ||
1458 | lastlib-> unload ( ); | ||
1459 | delete lastlib; | ||
1460 | } | ||
1461 | lastlib = lib; | ||
1462 | } | ||
1463 | else { | ||
1464 | if ( iface ) | ||
1465 | iface-> release ( ); | ||
1466 | delete lib; | ||
1467 | |||
1468 | setStyle ( new QPEStyle ( )); | ||
1469 | } | ||
1470 | |||
1471 | #if 0 | ||
1334 | // style == "Liquid Style (libliquid.so)" (or "Windows XP (libxp.so)" | 1472 | // style == "Liquid Style (libliquid.so)" (or "Windows XP (libxp.so)" |
@@ -1344,4 +1482,3 @@ void QPEApplication::internalSetStyle( const QString &style ) | |||
1344 | 1482 | ||
1345 | // static QLibrary *currentlib = 0; | 1483 | static QLibrary *currentlib = 0; |
1346 | static void *currentlib = 0; | ||
1347 | 1484 | ||
@@ -1350,8 +1487,6 @@ void QPEApplication::internalSetStyle( const QString &style ) | |||
1350 | do { // try/catch simulation | 1487 | do { // try/catch simulation |
1351 | // QLibrary *lib = new QLibrary ( path, QLibrary::Immediately ); | 1488 | QLibrary *lib = new QLibrary ( path, QLibrary::Immediately ); |
1352 | void *lib = ::dlopen ( path. local8Bit ( ), RTLD_LAZY | RTLD_GLOBAL ); | ||
1353 | 1489 | ||
1354 | if ( lib ) { | 1490 | if ( lib ) { |
1355 | //QStyle * (*fpa) ( ) = (QStyle * (*) ( )) lib-> resolve ( "allocate" ); | 1491 | QStyle * ( *fpa ) ( ) = ( QStyle * ( * ) ( ) ) lib-> resolve ( "allocate" ); |
1356 | QStyle * (*fpa) ( ) = (QStyle * (*) ( )) ::dlsym ( lib, "allocate" ); | ||
1357 | 1492 | ||
@@ -1363,6 +1498,4 @@ void QPEApplication::internalSetStyle( const QString &style ) | |||
1363 | 1498 | ||
1364 | if ( currentlib ) { | 1499 | if ( currentlib ) |
1365 | //delete currentlib; | 1500 | delete currentlib; |
1366 | ::dlclose ( currentlib ); | ||
1367 | } | ||
1368 | currentlib = lib; | 1501 | currentlib = lib; |
@@ -1372,7 +1505,6 @@ void QPEApplication::internalSetStyle( const QString &style ) | |||
1372 | } | 1505 | } |
1373 | //delete lib; | 1506 | delete lib; |
1374 | ::dlclose ( lib ); | ||
1375 | } | 1507 | } |
1376 | } while ( false ); | ||
1377 | } | 1508 | } |
1509 | while ( false ); | ||
1378 | // HACK for Qt2 only | 1510 | // HACK for Qt2 only |
@@ -1380,2 +1512,4 @@ void QPEApplication::internalSetStyle( const QString &style ) | |||
1380 | } | 1512 | } |
1513 | #endif | ||
1514 | } | ||
1381 | 1515 | ||
@@ -1400,3 +1534,4 @@ void QPEApplication::prepareForTermination(bool willrestart) | |||
1400 | #ifndef SINGLE_APP | 1534 | #ifndef SINGLE_APP |
1401 | { QCopEnvelope envelope("QPE/System", "forceQuit()"); } | 1535 | { QCopEnvelope envelope( "QPE/System", "forceQuit()" ); |
1536 | } | ||
1402 | processEvents(); // ensure the message goes out. | 1537 | processEvents(); // ensure the message goes out. |
@@ -1461,5 +1596,7 @@ void QPEApplication::setStylusOperation( QWidget* w, StylusMode mode ) | |||
1461 | if ( mode == LeftOnly ) { | 1596 | if ( mode == LeftOnly ) { |
1462 | stylusDict->remove(w); | 1597 | stylusDict->remove |
1598 | ( w ); | ||
1463 | w->removeEventFilter(qApp); | 1599 | w->removeEventFilter(qApp); |
1464 | } else { | 1600 | } |
1601 | else { | ||
1465 | stylusDict->insert(w,(void*)mode); | 1602 | stylusDict->insert(w,(void*)mode); |
@@ -1518,3 +1655,4 @@ bool QPEApplication::eventFilter( QObject *o, QEvent *e ) | |||
1518 | } | 1655 | } |
1519 | } else if ( e->type() == QEvent::KeyPress || e->type() == QEvent::KeyRelease ) { | 1656 | } |
1657 | else if ( e->type() == QEvent::KeyPress || e->type() == QEvent::KeyRelease ) { | ||
1520 | QKeyEvent *ke = (QKeyEvent *)e; | 1658 | QKeyEvent *ke = (QKeyEvent *)e; |
@@ -1550,3 +1688,4 @@ void QPEApplication::removeSenderFromStylusDict() | |||
1550 | { | 1688 | { |
1551 | stylusDict->remove((void*)sender()); | 1689 | stylusDict->remove |
1690 | ( ( void* ) sender() ); | ||
1552 | if ( d->presswidget == sender() ) | 1691 | if ( d->presswidget == sender() ) |
@@ -1706,4 +1845,3 @@ void qt_setMaxWindowRect(const QRect& r) | |||
1706 | while ( w ) { | 1845 | while ( w ) { |
1707 | if ( w->isVisible() && w->isMaximized() ) | 1846 | if ( w->isVisible() && w->isMaximized() ) { |
1708 | { | ||
1709 | w->showMaximized(); | 1847 | w->showMaximized(); |
diff --git a/library/styleinterface.h b/library/styleinterface.h new file mode 100644 index 0000000..9fea636 --- a/dev/null +++ b/library/styleinterface.h | |||
@@ -0,0 +1,68 @@ | |||
1 | /********************************************************************** | ||
2 | ** Copyright (C) 2002 Robert Griebl. All rights reserved. | ||
3 | ** | ||
4 | ** This file is part of OPIE (http://www.opie.info). | ||
5 | ** | ||
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 | ||
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
9 | ** packaging of this file. | ||
10 | ** | ||
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. | ||
13 | ** | ||
14 | **********************************************************************/ | ||
15 | |||
16 | #ifndef STYLEINTERFACE_H | ||
17 | #define STYLEINTERFACE_H | ||
18 | |||
19 | #include <qpe/qcom.h> | ||
20 | |||
21 | #ifndef QT_NO_COMPONENT | ||
22 | |||
23 | // {6C33B4F9-D529-453A-8FB3-DA42B21872BD} | ||
24 | # ifndef IID_Style | ||
25 | # define IID_Style QUuid( 0x6c33b4f9, 0xd529, 0x453a, 0x8f, 0xb3, 0xda, 0x42, 0xb2, 0x18, 0x72, 0xbd) | ||
26 | #endif | ||
27 | |||
28 | // {9757A252-3FD4-438F-A756-80BE4A9FB8DC} | ||
29 | # ifndef IID_StyleSettings | ||
30 | # define IID_StyleSettings QUuid( 0x9757a252, 0x3fd4, 0x438f, 0xa7, 0x56, 0x80, 0xbe, 0x4a, 0x9f, 0xb8, 0xdc) | ||
31 | # endif | ||
32 | |||
33 | #endif | ||
34 | |||
35 | class QWidget; | ||
36 | class QStyle; | ||
37 | |||
38 | struct StyleInterface : public QUnknownInterface | ||
39 | { | ||
40 | //! Return a new style. | ||
41 | virtual QStyle *create ( ) = 0; | ||
42 | |||
43 | //! Return a (longer) description for the style. | ||
44 | virtual QString description ( ) = 0; | ||
45 | |||
46 | //! Return a short name for the style. | ||
47 | virtual QString name ( ) = 0; | ||
48 | |||
49 | //! Return the library basename (libliquid.so => liquid) | ||
50 | virtual QCString key ( ) = 0; | ||
51 | |||
52 | //! QT_VERSION like 1.2.3 == 123 | ||
53 | virtual unsigned int version ( ) = 0; | ||
54 | }; | ||
55 | |||
56 | struct StyleSettingsInterface : public QUnknownInterface | ||
57 | { | ||
58 | //! Return a new settings page. | ||
59 | virtual QWidget *create ( QWidget *parent, const char *name = 0 ) = 0; | ||
60 | |||
61 | //! Callback for appearance app when OK is clicked (return true when style has to re-applied). | ||
62 | virtual bool accept ( ) = 0; | ||
63 | |||
64 | //! Callback for appeaeance app when Cancel is clicked. | ||
65 | virtual void reject ( ) = 0; | ||
66 | }; | ||
67 | |||
68 | #endif | ||
diff --git a/noncore/styles/liquid/liquid.pro b/noncore/styles/liquid/liquid.pro index 23dce09..a07eaf2 100644 --- a/noncore/styles/liquid/liquid.pro +++ b/noncore/styles/liquid/liquid.pro | |||
@@ -5,2 +5,3 @@ SOURCES = liquid.cpp \ | |||
5 | effects.cpp \ | 5 | effects.cpp \ |
6 | liquidset.cpp \ | ||
6 | plugin.cpp | 7 | plugin.cpp |
@@ -9,3 +10,6 @@ HEADERS = liquid.h \ | |||
9 | liquiddeco.h \ | 10 | liquiddeco.h \ |
10 | effects.h | 11 | effects.h \ |
12 | liquidset.h \ | ||
13 | plugin.h | ||
14 | |||
11 | LIBS += -lqpe | 15 | LIBS += -lqpe |
diff --git a/noncore/styles/liquid/settings/liquidset.cpp b/noncore/styles/liquid/liquidset.cpp index 1479ac0..5ae19ba 100644 --- a/noncore/styles/liquid/settings/liquidset.cpp +++ b/noncore/styles/liquid/liquidset.cpp | |||
@@ -23,3 +23,3 @@ | |||
23 | #include "liquidset.h" | 23 | #include "liquidset.h" |
24 | #include "../liquid.h" | 24 | #include "liquid.h" |
25 | 25 | ||
@@ -59,4 +59,4 @@ static void changeButtonColor ( QWidget *btn, const QColor &col ) | |||
59 | 59 | ||
60 | LiquidSet::LiquidSet ( QWidget* parent, const char *name, WFlags fl ) | 60 | LiquidSettings::LiquidSettings ( QWidget* parent, const char *name, WFlags fl ) |
61 | : QDialog ( parent, name, fl ) | 61 | : QWidget ( parent, name, fl ) |
62 | { | 62 | { |
@@ -124,3 +124,3 @@ LiquidSet::LiquidSet ( QWidget* parent, const char *name, WFlags fl ) | |||
124 | 124 | ||
125 | popup = new ColorPopupMenu ( m_menucol, this ); | 125 | popup = new ColorPopupMenu ( m_menucol, 0 ); |
126 | m_menubtn-> setPopup ( popup ); | 126 | m_menubtn-> setPopup ( popup ); |
@@ -133,3 +133,3 @@ LiquidSet::LiquidSet ( QWidget* parent, const char *name, WFlags fl ) | |||
133 | 133 | ||
134 | popup = new ColorPopupMenu ( m_textcol, this ); | 134 | popup = new ColorPopupMenu ( m_textcol, 0 ); |
135 | m_textbtn-> setPopup ( popup ); | 135 | m_textbtn-> setPopup ( popup ); |
@@ -178,3 +178,3 @@ LiquidSet::LiquidSet ( QWidget* parent, const char *name, WFlags fl ) | |||
178 | 178 | ||
179 | void LiquidSet::changeType ( int t ) | 179 | void LiquidSettings::changeType ( int t ) |
180 | { | 180 | { |
@@ -192,3 +192,3 @@ void LiquidSet::changeType ( int t ) | |||
192 | 192 | ||
193 | void LiquidSet::changeMenuColor ( const QColor &col ) | 193 | void LiquidSettings::changeMenuColor ( const QColor &col ) |
194 | { | 194 | { |
@@ -198,3 +198,3 @@ void LiquidSet::changeMenuColor ( const QColor &col ) | |||
198 | 198 | ||
199 | void LiquidSet::changeTextColor ( const QColor &col ) | 199 | void LiquidSettings::changeTextColor ( const QColor &col ) |
200 | { | 200 | { |
@@ -204,3 +204,3 @@ void LiquidSet::changeTextColor ( const QColor &col ) | |||
204 | 204 | ||
205 | void LiquidSet::changeShadow ( bool b ) | 205 | void LiquidSettings::changeShadow ( bool b ) |
206 | { | 206 | { |
@@ -209,3 +209,3 @@ void LiquidSet::changeShadow ( bool b ) | |||
209 | 209 | ||
210 | void LiquidSet::changeDeco ( bool b ) | 210 | void LiquidSettings::changeDeco ( bool b ) |
211 | { | 211 | { |
@@ -215,3 +215,3 @@ void LiquidSet::changeDeco ( bool b ) | |||
215 | 215 | ||
216 | void LiquidSet::accept ( ) | 216 | bool LiquidSettings::writeConfig ( ) |
217 | { | 217 | { |
@@ -229,5 +229,3 @@ void LiquidSet::accept ( ) | |||
229 | 229 | ||
230 | Global::applyStyle ( ); | 230 | return true; |
231 | |||
232 | QDialog::accept ( ); | ||
233 | } | 231 | } |
diff --git a/noncore/styles/liquid/settings/liquidset.h b/noncore/styles/liquid/liquidset.h index a0f590a..7843513 100644 --- a/noncore/styles/liquid/settings/liquidset.h +++ b/noncore/styles/liquid/liquidset.h | |||
@@ -10,3 +10,3 @@ class QSlider; | |||
10 | 10 | ||
11 | class LiquidSet : public QDialog { | 11 | class LiquidSettings : public QWidget { |
12 | Q_OBJECT | 12 | Q_OBJECT |
@@ -14,3 +14,3 @@ class LiquidSet : public QDialog { | |||
14 | public: | 14 | public: |
15 | LiquidSet ( QWidget *parent = 0, const char *name = 0, WFlags fl = 0 ); | 15 | LiquidSettings ( QWidget *parent = 0, const char *name = 0, WFlags fl = 0 ); |
16 | 16 | ||
@@ -23,4 +23,3 @@ public slots: | |||
23 | 23 | ||
24 | protected: | 24 | virtual bool writeConfig ( ); |
25 | virtual void accept ( ); | ||
26 | 25 | ||
diff --git a/noncore/styles/liquid/opie-liquid.control b/noncore/styles/liquid/opie-liquid.control index 6311dee..7b6ae71 100644 --- a/noncore/styles/liquid/opie-liquid.control +++ b/noncore/styles/liquid/opie-liquid.control | |||
@@ -1,2 +1,2 @@ | |||
1 | Files: plugins/styles/libliquid.so* bin/liquid-settings apps/Settings/Liquid.desktop pics/liquid/Liquid.png | 1 | Files: plugins/styles/libliquid.so* |
2 | Priority: optional | 2 | Priority: optional |
diff --git a/noncore/styles/liquid/plugin.cpp b/noncore/styles/liquid/plugin.cpp index d9aa8ef..f149c29 100644 --- a/noncore/styles/liquid/plugin.cpp +++ b/noncore/styles/liquid/plugin.cpp | |||
@@ -1,12 +1,16 @@ | |||
1 | #include "liquid.h" | 1 | #include "liquid.h" |
2 | #include "liquidset.h" | ||
3 | #include "plugin.h" | ||
2 | 4 | ||
3 | 5 | ||
4 | extern "C" { | 6 | |
5 | QStyle* allocate ( ); | 7 | LiquidInterface::LiquidInterface ( ) : ref ( 0 ) |
6 | int minor_version ( ); | 8 | { |
7 | int major_version ( ); | 9 | } |
8 | const char *description ( ); | 10 | |
11 | LiquidInterface::~LiquidInterface ( ) | ||
12 | { | ||
9 | } | 13 | } |
10 | 14 | ||
11 | QStyle* allocate ( ) | 15 | QStyle *LiquidInterface::create ( ) |
12 | { | 16 | { |
@@ -15,15 +19,93 @@ QStyle* allocate ( ) | |||
15 | 19 | ||
16 | int minor_version ( ) | 20 | QString LiquidInterface::name ( ) |
21 | { | ||
22 | return QObject::tr( "Liquid", "name" ); | ||
23 | } | ||
24 | |||
25 | QString LiquidInterface::description ( ) | ||
26 | { | ||
27 | return QObject::tr( "High Performance Liquid style by Mosfet", "description" ); | ||
28 | } | ||
29 | |||
30 | QCString LiquidInterface::key ( ) | ||
17 | { | 31 | { |
18 | return 0; | 32 | return QCString ( "liquid" ); |
19 | } | 33 | } |
20 | 34 | ||
21 | int major_version ( ) | 35 | unsigned int LiquidInterface::version ( ) |
22 | { | 36 | { |
23 | return 1; | 37 | return 100; // 1.0.0 (\d+.\d.\d) |
24 | } | 38 | } |
25 | 39 | ||
26 | const char *description ( ) | 40 | QRESULT LiquidInterface::queryInterface ( const QUuid &uuid, QUnknownInterface **iface ) |
41 | { | ||
42 | static LiquidSettingsInterface *setiface = 0; | ||
43 | |||
44 | *iface = 0; | ||
45 | |||
46 | if ( uuid == IID_QUnknown ) | ||
47 | *iface = this; | ||
48 | else if ( uuid == IID_Style ) | ||
49 | *iface = this; | ||
50 | else if ( uuid == IID_StyleSettings ) { | ||
51 | if ( !setiface ) | ||
52 | setiface = new LiquidSettingsInterface ( ); | ||
53 | *iface = setiface; | ||
54 | } | ||
55 | |||
56 | if ( *iface ) | ||
57 | (*iface)-> addRef ( ); | ||
58 | |||
59 | return QS_OK; | ||
60 | } | ||
61 | |||
62 | Q_EXPORT_INTERFACE() | ||
63 | { | ||
64 | Q_CREATE_INSTANCE( LiquidInterface ) | ||
65 | } | ||
66 | |||
67 | |||
68 | LiquidSettingsInterface::LiquidSettingsInterface ( ) : ref ( 0 ) | ||
27 | { | 69 | { |
28 | return "High Performance Liquid"; | 70 | m_widget = 0; |
29 | } | 71 | } |
72 | |||
73 | LiquidSettingsInterface::~LiquidSettingsInterface ( ) | ||
74 | { | ||
75 | } | ||
76 | |||
77 | QWidget *LiquidSettingsInterface::create ( QWidget *parent, const char *name ) | ||
78 | { | ||
79 | m_widget = new LiquidSettings ( parent, name ? name : "LIQUID-SETTINGS" ); | ||
80 | |||
81 | return m_widget; | ||
82 | } | ||
83 | |||
84 | bool LiquidSettingsInterface::accept ( ) | ||
85 | { | ||
86 | if ( !m_widget ) | ||
87 | return false; | ||
88 | |||
89 | return m_widget-> writeConfig ( ); | ||
90 | } | ||
91 | |||
92 | void LiquidSettingsInterface::reject ( ) | ||
93 | { | ||
94 | } | ||
95 | |||
96 | QRESULT LiquidSettingsInterface::queryInterface ( const QUuid &uuid, QUnknownInterface **iface ) | ||
97 | { | ||
98 | *iface = 0; | ||
99 | |||
100 | |||
101 | if ( uuid == IID_QUnknown ) | ||
102 | *iface = this; | ||
103 | else if ( uuid == IID_StyleSettings ) | ||
104 | *iface = this; | ||
105 | |||
106 | if ( *iface ) | ||
107 | (*iface)-> addRef ( ); | ||
108 | |||
109 | return QS_OK; | ||
110 | } | ||
111 | |||
diff --git a/noncore/styles/liquid/plugin.h b/noncore/styles/liquid/plugin.h new file mode 100644 index 0000000..759577f --- a/dev/null +++ b/noncore/styles/liquid/plugin.h | |||
@@ -0,0 +1,46 @@ | |||
1 | #ifndef __OPIE_LIQUID_PLUGIN_H__ | ||
2 | #define __OPIE_LIQUID_PLUGIN_H__ | ||
3 | |||
4 | #include <qpe/styleinterface.h> | ||
5 | |||
6 | class LiquidSettings; | ||
7 | |||
8 | class LiquidInterface : public StyleInterface { | ||
9 | public: | ||
10 | LiquidInterface ( ); | ||
11 | virtual ~LiquidInterface ( ); | ||
12 | |||
13 | QRESULT queryInterface ( const QUuid &, QUnknownInterface ** ); | ||
14 | Q_REFCOUNT | ||
15 | |||
16 | virtual QStyle *create ( ); | ||
17 | |||
18 | virtual QString description ( ); | ||
19 | virtual QString name ( ); | ||
20 | virtual QCString key ( ); | ||
21 | |||
22 | virtual unsigned int version ( ); | ||
23 | |||
24 | private: | ||
25 | ulong ref; | ||
26 | }; | ||
27 | |||
28 | class LiquidSettingsInterface : public StyleSettingsInterface { | ||
29 | public: | ||
30 | LiquidSettingsInterface ( ); | ||
31 | virtual ~LiquidSettingsInterface ( ); | ||
32 | |||
33 | QRESULT queryInterface ( const QUuid &, QUnknownInterface ** ); | ||
34 | Q_REFCOUNT | ||
35 | |||
36 | virtual QWidget *create ( QWidget *parent, const char *name = 0 ); | ||
37 | |||
38 | virtual bool accept ( ); | ||
39 | virtual void reject ( ); | ||
40 | |||
41 | private: | ||
42 | LiquidSettings *m_widget; | ||
43 | ulong ref; | ||
44 | }; | ||
45 | |||
46 | #endif | ||
diff --git a/noncore/styles/liquid/settings/.cvsignore b/noncore/styles/liquid/settings/.cvsignore deleted file mode 100644 index c13418b..0000000 --- a/noncore/styles/liquid/settings/.cvsignore +++ b/dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | Makefile* | ||
2 | moc_* | ||
diff --git a/noncore/styles/liquid/settings/main.cpp b/noncore/styles/liquid/settings/main.cpp deleted file mode 100644 index fd69007..0000000 --- a/noncore/styles/liquid/settings/main.cpp +++ b/dev/null | |||
@@ -1,34 +0,0 @@ | |||
1 | /********************************************************************** | ||
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | ||
3 | ** | ||
4 | ** This file is part of Qtopia Environment. | ||
5 | ** | ||
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 | ||
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
9 | ** packaging of this file. | ||
10 | ** | ||
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. | ||
13 | ** | ||
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
15 | ** | ||
16 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
17 | ** not clear to you. | ||
18 | ** | ||
19 | **********************************************************************/ | ||
20 | |||
21 | #include "liquidset.h" | ||
22 | |||
23 | #include <qpe/qpeapplication.h> | ||
24 | |||
25 | |||
26 | int main ( int argc, char** argv ) | ||
27 | { | ||
28 | QPEApplication a ( argc, argv ); | ||
29 | |||
30 | LiquidSet dlg; | ||
31 | a. showMainWidget ( &dlg ); | ||
32 | |||
33 | return a. exec ( ); | ||
34 | } | ||
diff --git a/noncore/styles/liquid/settings/settings.pro b/noncore/styles/liquid/settings/settings.pro deleted file mode 100644 index bfda7a4..0000000 --- a/noncore/styles/liquid/settings/settings.pro +++ b/dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | TEMPLATE= app | ||
2 | CONFIG += qt warn_on release | ||
3 | DESTDIR = $(OPIEDIR)/bin | ||
4 | HEADERS = liquidset.h | ||
5 | SOURCES = liquidset.cpp main.cpp | ||
6 | INCLUDEPATH += $(OPIEDIR)/include | ||
7 | DEPENDPATH+= ../$(OPIEDIR)/include | ||
8 | LIBS += -lqpe -lopie | ||
9 | TARGET = liquid-settings | ||
10 | |||
11 | TRANSLATIONS = ../../../../i18n/de/liquid-settings.ts \ | ||
12 | ../../../../i18n/en/liquid-settings.ts \ | ||
13 | ../../../../i18n/es/liquid-settings.ts \ | ||
14 | ../../../../i18n/fr/liquid-settings.ts \ | ||
15 | ../../../../i18n/hu/liquid-settings.ts \ | ||
16 | ../../../../i18n/ja/liquid-settings.ts \ | ||
17 | ../../../../i18n/ko/liquid-settings.ts \ | ||
18 | ../../../../i18n/no/liquid-settings.ts \ | ||
19 | ../../../../i18n/pl/liquid-settings.ts \ | ||
20 | ../../../../i18n/pt/liquid-settings.ts \ | ||
21 | ../../../../i18n/pt_BR/liquid-settings.ts \ | ||
22 | ../../../../i18n/sl/liquid-settings.ts \ | ||
23 | ../../../../i18n/zh_CN/liquid-settings.ts \ | ||
24 | ../../../../i18n/zh_TW/liquid-settings.ts | ||
diff --git a/noncore/styles/metal/metal.pro b/noncore/styles/metal/metal.pro index 6e99389..cf15f33 100644 --- a/noncore/styles/metal/metal.pro +++ b/noncore/styles/metal/metal.pro | |||
@@ -4,3 +4,3 @@ SOURCES = metal.cpp plugin.cpp | |||
4 | 4 | ||
5 | HEADERS = metal.h | 5 | HEADERS = metal.h plugin.h |
6 | LIBS += -lqpe | 6 | LIBS += -lqpe |
diff --git a/noncore/styles/metal/plugin.cpp b/noncore/styles/metal/plugin.cpp index e5bee10..1db4aac 100644 --- a/noncore/styles/metal/plugin.cpp +++ b/noncore/styles/metal/plugin.cpp | |||
@@ -1,12 +1,14 @@ | |||
1 | #include "metal.h" | 1 | #include "metal.h" |
2 | #include "plugin.h" | ||
2 | 3 | ||
3 | 4 | ||
4 | extern "C" { | 5 | MetalInterface::MetalInterface ( ) : ref ( 0 ) |
5 | QStyle* allocate ( ); | 6 | { |
6 | int minor_version ( ); | ||
7 | int major_version ( ); | ||
8 | const char *description ( ); | ||
9 | } | 7 | } |
10 | 8 | ||
11 | QStyle* allocate ( ) | 9 | MetalInterface::~MetalInterface ( ) |
10 | { | ||
11 | } | ||
12 | |||
13 | QStyle *MetalInterface::create ( ) | ||
12 | { | 14 | { |
@@ -15,15 +17,41 @@ QStyle* allocate ( ) | |||
15 | 17 | ||
16 | int minor_version ( ) | 18 | QString MetalInterface::name ( ) |
17 | { | 19 | { |
18 | return 0; | 20 | return QObject::tr( "Metal", "name" ); |
19 | } | 21 | } |
20 | 22 | ||
21 | int major_version ( ) | 23 | QString MetalInterface::description ( ) |
22 | { | 24 | { |
23 | return 1; | 25 | return QObject::tr( "Metal style", "description" ); |
24 | } | 26 | } |
25 | 27 | ||
26 | const char *description ( ) | 28 | QCString MetalInterface::key ( ) |
27 | { | 29 | { |
28 | return "Metal style plugin"; | 30 | return QCString ( "metal" ); |
29 | } | 31 | } |
32 | |||
33 | unsigned int MetalInterface::version ( ) | ||
34 | { | ||
35 | return 100; // 1.0.0 (\d+.\d.\d) | ||
36 | } | ||
37 | |||
38 | QRESULT MetalInterface::queryInterface ( const QUuid &uuid, QUnknownInterface **iface ) | ||
39 | { | ||
40 | *iface = 0; | ||
41 | |||
42 | if ( uuid == IID_QUnknown ) | ||
43 | *iface = this; | ||
44 | else if ( uuid == IID_Style ) | ||
45 | *iface = this; | ||
46 | |||
47 | if ( *iface ) | ||
48 | (*iface)-> addRef ( ); | ||
49 | |||
50 | return QS_OK; | ||
51 | } | ||
52 | |||
53 | Q_EXPORT_INTERFACE() | ||
54 | { | ||
55 | Q_CREATE_INSTANCE( MetalInterface ) | ||
56 | } | ||
57 | |||
diff --git a/noncore/styles/metal/plugin.h b/noncore/styles/metal/plugin.h new file mode 100644 index 0000000..f61c833 --- a/dev/null +++ b/noncore/styles/metal/plugin.h | |||
@@ -0,0 +1,27 @@ | |||
1 | #ifndef __OPIE_METAL_PLUGIN_H__ | ||
2 | #define __OPIE_METAL_PLUGIN_H__ | ||
3 | |||
4 | #include <qpe/styleinterface.h> | ||
5 | |||
6 | |||
7 | class MetalInterface : public StyleInterface { | ||
8 | public: | ||
9 | MetalInterface ( ); | ||
10 | virtual ~MetalInterface ( ); | ||
11 | |||
12 | QRESULT queryInterface ( const QUuid &, QUnknownInterface ** ); | ||
13 | Q_REFCOUNT | ||
14 | |||
15 | virtual QStyle *create ( ); | ||
16 | |||
17 | virtual QString description ( ); | ||
18 | virtual QString name ( ); | ||
19 | virtual QCString key ( ); | ||
20 | |||
21 | virtual unsigned int version ( ); | ||
22 | |||
23 | private: | ||
24 | ulong ref; | ||
25 | }; | ||
26 | |||
27 | #endif | ||
diff --git a/noncore/styles/theme/opie-theme.control b/noncore/styles/theme/opie-theme.control index 02739fb..adb4f4b 100644 --- a/noncore/styles/theme/opie-theme.control +++ b/noncore/styles/theme/opie-theme.control | |||
@@ -1,2 +1,2 @@ | |||
1 | Files: plugins/styles/libtheme.so* bin/theme-settings apps/Settings/Theme.desktop pics/theme/Theme.png | 1 | Files: plugins/styles/libtheme.so* |
2 | Priority: optional | 2 | Priority: optional |
diff --git a/noncore/styles/theme/plugin.cpp b/noncore/styles/theme/plugin.cpp index b334357..4383693 100644 --- a/noncore/styles/theme/plugin.cpp +++ b/noncore/styles/theme/plugin.cpp | |||
@@ -1,18 +1,110 @@ | |||
1 | //#include <klocale.h> | ||
2 | #include "othemestyle.h" | 1 | #include "othemestyle.h" |
2 | #include "themeset.h" | ||
3 | #include "plugin.h" | ||
3 | 4 | ||
4 | extern "C" | 5 | |
6 | |||
7 | ThemeInterface::ThemeInterface ( ) : ref ( 0 ) | ||
8 | { | ||
9 | } | ||
10 | |||
11 | ThemeInterface::~ThemeInterface ( ) | ||
12 | { | ||
13 | } | ||
14 | |||
15 | QStyle *ThemeInterface::create ( ) | ||
5 | { | 16 | { |
6 | QStyle * allocate() { | ||
7 | return new OThemeStyle ( "" ); | 17 | return new OThemeStyle ( "" ); |
8 | } | 18 | } |
9 | int minor_version() { | 19 | |
10 | return 0; | 20 | QString ThemeInterface::name ( ) |
21 | { | ||
22 | return QObject::tr( "Themed style", "name" ); | ||
23 | } | ||
24 | |||
25 | QString ThemeInterface::description ( ) | ||
26 | { | ||
27 | return QObject::tr( "KDE2 theme compatible style engine", "description" ); | ||
28 | } | ||
29 | |||
30 | QCString ThemeInterface::key ( ) | ||
31 | { | ||
32 | return QCString ( "theme" ); | ||
33 | } | ||
34 | |||
35 | unsigned int ThemeInterface::version ( ) | ||
36 | { | ||
37 | return 100; // 1.0.0 (\d+.\d.\d) | ||
38 | } | ||
39 | |||
40 | QRESULT ThemeInterface::queryInterface ( const QUuid &uuid, QUnknownInterface **iface ) | ||
41 | { | ||
42 | static ThemeSettingsInterface *setiface = 0; | ||
43 | |||
44 | *iface = 0; | ||
45 | |||
46 | if ( uuid == IID_QUnknown ) | ||
47 | *iface = this; | ||
48 | else if ( uuid == IID_Style ) | ||
49 | *iface = this; | ||
50 | else if ( uuid == IID_StyleSettings ) { | ||
51 | if ( !setiface ) | ||
52 | setiface = new ThemeSettingsInterface ( ); | ||
53 | *iface = setiface; | ||
54 | } | ||
55 | |||
56 | if ( *iface ) | ||
57 | (*iface)-> addRef ( ); | ||
58 | |||
59 | return QS_OK; | ||
60 | } | ||
61 | |||
62 | Q_EXPORT_INTERFACE() | ||
63 | { | ||
64 | Q_CREATE_INSTANCE( ThemeInterface ) | ||
65 | } | ||
66 | |||
67 | |||
68 | ThemeSettingsInterface::ThemeSettingsInterface ( ) : ref ( 0 ) | ||
69 | { | ||
70 | m_widget = 0; | ||
71 | } | ||
72 | |||
73 | ThemeSettingsInterface::~ThemeSettingsInterface ( ) | ||
74 | { | ||
75 | } | ||
76 | |||
77 | QWidget *ThemeSettingsInterface::create ( QWidget *parent, const char *name ) | ||
78 | { | ||
79 | m_widget = new ThemeSettings ( parent, name ? name : "THEME-SETTINGS" ); | ||
80 | |||
81 | return m_widget; | ||
11 | } | 82 | } |
12 | int major_version() { | 83 | |
13 | return 1; | 84 | bool ThemeSettingsInterface::accept ( ) |
85 | { | ||
86 | if ( !m_widget ) | ||
87 | return false; | ||
88 | |||
89 | return m_widget-> writeConfig ( ); | ||
14 | } | 90 | } |
15 | const char * description() { | 91 | |
16 | return ( "Theme Style" ); | 92 | void ThemeSettingsInterface::reject ( ) |
93 | { | ||
17 | } | 94 | } |
95 | |||
96 | QRESULT ThemeSettingsInterface::queryInterface ( const QUuid &uuid, QUnknownInterface **iface ) | ||
97 | { | ||
98 | *iface = 0; | ||
99 | |||
100 | |||
101 | if ( uuid == IID_QUnknown ) | ||
102 | *iface = this; | ||
103 | else if ( uuid == IID_StyleSettings ) | ||
104 | *iface = this; | ||
105 | |||
106 | if ( *iface ) | ||
107 | (*iface)-> addRef ( ); | ||
108 | |||
109 | return QS_OK; | ||
18 | } | 110 | } |
diff --git a/noncore/styles/theme/plugin.h b/noncore/styles/theme/plugin.h new file mode 100644 index 0000000..d13fc5d --- a/dev/null +++ b/noncore/styles/theme/plugin.h | |||
@@ -0,0 +1,46 @@ | |||
1 | #ifndef __OPIE_THEME_PLUGIN_H__ | ||
2 | #define __OPIE_THEME_PLUGIN_H__ | ||
3 | |||
4 | #include <qpe/styleinterface.h> | ||
5 | |||
6 | class ThemeSettings; | ||
7 | |||
8 | class ThemeInterface : public StyleInterface { | ||
9 | public: | ||
10 | ThemeInterface ( ); | ||
11 | virtual ~ThemeInterface ( ); | ||
12 | |||
13 | QRESULT queryInterface ( const QUuid &, QUnknownInterface ** ); | ||
14 | Q_REFCOUNT | ||
15 | |||
16 | virtual QStyle *create ( ); | ||
17 | |||
18 | virtual QString description ( ); | ||
19 | virtual QString name ( ); | ||
20 | virtual QCString key ( ); | ||
21 | |||
22 | virtual unsigned int version ( ); | ||
23 | |||
24 | private: | ||
25 | ulong ref; | ||
26 | }; | ||
27 | |||
28 | class ThemeSettingsInterface : public StyleSettingsInterface { | ||
29 | public: | ||
30 | ThemeSettingsInterface ( ); | ||
31 | virtual ~ThemeSettingsInterface ( ); | ||
32 | |||
33 | QRESULT queryInterface ( const QUuid &, QUnknownInterface ** ); | ||
34 | Q_REFCOUNT | ||
35 | |||
36 | virtual QWidget *create ( QWidget *parent, const char *name = 0 ); | ||
37 | |||
38 | virtual bool accept ( ); | ||
39 | virtual void reject ( ); | ||
40 | |||
41 | private: | ||
42 | ThemeSettings *m_widget; | ||
43 | ulong ref; | ||
44 | }; | ||
45 | |||
46 | #endif | ||
diff --git a/noncore/styles/theme/settings/main.cpp b/noncore/styles/theme/settings/main.cpp deleted file mode 100644 index 94d40f3..0000000 --- a/noncore/styles/theme/settings/main.cpp +++ b/dev/null | |||
@@ -1,34 +0,0 @@ | |||
1 | /********************************************************************** | ||
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | ||
3 | ** | ||
4 | ** This file is part of Qtopia Environment. | ||
5 | ** | ||
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 | ||
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
9 | ** packaging of this file. | ||
10 | ** | ||
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. | ||
13 | ** | ||
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
15 | ** | ||
16 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
17 | ** not clear to you. | ||
18 | ** | ||
19 | **********************************************************************/ | ||
20 | |||
21 | #include "themeset.h" | ||
22 | |||
23 | #include <qpe/qpeapplication.h> | ||
24 | |||
25 | |||
26 | int main ( int argc, char** argv ) | ||
27 | { | ||
28 | QPEApplication a ( argc, argv ); | ||
29 | |||
30 | ThemeSet dlg; | ||
31 | a. showMainWidget ( &dlg ); | ||
32 | |||
33 | return a. exec ( ); | ||
34 | } | ||
diff --git a/noncore/styles/theme/settings/settings.pro b/noncore/styles/theme/settings/settings.pro deleted file mode 100644 index 85d1f7a..0000000 --- a/noncore/styles/theme/settings/settings.pro +++ b/dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | TEMPLATE= app | ||
2 | CONFIG += qt warn_on release | ||
3 | DESTDIR = $(OPIEDIR)/bin | ||
4 | HEADERS = themeset.h | ||
5 | SOURCES = themeset.cpp main.cpp | ||
6 | INCLUDEPATH += $(OPIEDIR)/include | ||
7 | DEPENDPATH+= ../$(OPIEDIR)/include | ||
8 | LIBS += -lqpe | ||
9 | TARGET = theme-settings | ||
10 | |||
11 | TRANSLATIONS = ../../../../i18n/de/theme-settings.ts \ | ||
12 | ../../../../i18n/en/theme-settings.ts \ | ||
13 | ../../../../i18n/es/theme-settings.ts \ | ||
14 | ../../../../i18n/fr/theme-settings.ts \ | ||
15 | ../../../../i18n/hu/theme-settings.ts \ | ||
16 | ../../../../i18n/ja/theme-settings.ts \ | ||
17 | ../../../../i18n/ko/theme-settings.ts \ | ||
18 | ../../../../i18n/no/theme-settings.ts \ | ||
19 | ../../../../i18n/pl/theme-settings.ts \ | ||
20 | ../../../../i18n/pt/theme-settings.ts \ | ||
21 | ../../../../i18n/pt_BR/theme-settings.ts \ | ||
22 | ../../../../i18n/sl/theme-settings.ts \ | ||
23 | ../../../../i18n/zh_CN/theme-settings.ts \ | ||
24 | ../../../../i18n/zh_TW/theme-settings.ts | ||
diff --git a/noncore/styles/theme/settings/themeset.h b/noncore/styles/theme/settings/themeset.h deleted file mode 100644 index 24804ce..0000000 --- a/noncore/styles/theme/settings/themeset.h +++ b/dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | #ifndef __OPIE_THEME_SET_H__ | ||
2 | #define __OPIE_THEME_SET_H__ | ||
3 | |||
4 | #include <qdialog.h> | ||
5 | |||
6 | class QListView; | ||
7 | |||
8 | class ThemeSet : public QDialog { | ||
9 | Q_OBJECT | ||
10 | |||
11 | public: | ||
12 | ThemeSet ( QWidget *parent = 0, const char *name = 0, WFlags fl = 0 ); | ||
13 | |||
14 | protected: | ||
15 | virtual void accept ( ); | ||
16 | |||
17 | private: | ||
18 | QListView *m_list; | ||
19 | }; | ||
20 | #endif | ||
diff --git a/noncore/styles/theme/theme.pro b/noncore/styles/theme/theme.pro index fdcd20e..49c4103 100644 --- a/noncore/styles/theme/theme.pro +++ b/noncore/styles/theme/theme.pro | |||
@@ -5,2 +5,3 @@ SOURCES = ogfxeffect.cpp \ | |||
5 | othemebase.cpp \ | 5 | othemebase.cpp \ |
6 | themeset.cpp \ | ||
6 | plugin.cpp | 7 | plugin.cpp |
@@ -9,3 +10,5 @@ HEADERS = ogfxeffect.h \ | |||
9 | othemebase.h \ | 10 | othemebase.h \ |
10 | othemestyle.h | 11 | othemestyle.h \ |
12 | themeset.h \ | ||
13 | plugin.h | ||
11 | 14 | ||
diff --git a/noncore/styles/theme/settings/themeset.cpp b/noncore/styles/theme/themeset.cpp index 046618e..4a4efcb 100644 --- a/noncore/styles/theme/settings/themeset.cpp +++ b/noncore/styles/theme/themeset.cpp | |||
@@ -61,4 +61,4 @@ public: | |||
61 | 61 | ||
62 | ThemeSet::ThemeSet ( QWidget* parent, const char *name, WFlags fl ) | 62 | ThemeSettings::ThemeSettings ( QWidget* parent, const char *name, WFlags fl ) |
63 | : QDialog ( parent, name, fl ) | 63 | : QWidget ( parent, name, fl ) |
64 | { | 64 | { |
@@ -111,3 +111,3 @@ ThemeSet::ThemeSet ( QWidget* parent, const char *name, WFlags fl ) | |||
111 | 111 | ||
112 | void ThemeSet::accept ( ) | 112 | bool ThemeSettings::writeConfig ( ) |
113 | { | 113 | { |
@@ -118,6 +118,5 @@ void ThemeSet::accept ( ) | |||
118 | config. writeEntry ( "Theme", it ? it-> m_theme : QString ( "" )); | 118 | config. writeEntry ( "Theme", it ? it-> m_theme : QString ( "" )); |
119 | config. write ( ); | ||
119 | 120 | ||
120 | Global::applyStyle ( ); | 121 | return true; |
121 | |||
122 | QDialog::accept ( ); | ||
123 | } | 122 | } |
diff --git a/noncore/styles/theme/themeset.h b/noncore/styles/theme/themeset.h new file mode 100644 index 0000000..c337cfa --- a/dev/null +++ b/noncore/styles/theme/themeset.h | |||
@@ -0,0 +1,20 @@ | |||
1 | #ifndef __OPIE_THEME_SETTINGS_H__ | ||
2 | #define __OPIE_THEME_SETTINGS_H__ | ||
3 | |||
4 | #include <qdialog.h> | ||
5 | |||
6 | class QListView; | ||
7 | |||
8 | class ThemeSettings : public QWidget { | ||
9 | Q_OBJECT | ||
10 | |||
11 | public: | ||
12 | ThemeSettings ( QWidget *parent = 0, const char *name = 0, WFlags fl = 0 ); | ||
13 | |||
14 | public: | ||
15 | virtual bool writeConfig ( ); | ||
16 | |||
17 | private: | ||
18 | QListView *m_list; | ||
19 | }; | ||
20 | #endif | ||
diff --git a/pics/liquid/Liquid.png b/pics/liquid/Liquid.png deleted file mode 100644 index 67647d0..0000000 --- a/pics/liquid/Liquid.png +++ b/dev/null | |||
Binary files differ | |||
diff --git a/pics/theme/Theme.png b/pics/theme/Theme.png deleted file mode 100644 index 67647d0..0000000 --- a/pics/theme/Theme.png +++ b/dev/null | |||
Binary files differ | |||