summaryrefslogtreecommitdiff
path: root/library/qpeapplication.cpp
Unidiff
Diffstat (limited to 'library/qpeapplication.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--library/qpeapplication.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp
index f84bc0e..1534b0b 100644
--- a/library/qpeapplication.cpp
+++ b/library/qpeapplication.cpp
@@ -81,24 +81,25 @@
81#include <sys/file.h> 81#include <sys/file.h>
82#include <sys/ioctl.h> 82#include <sys/ioctl.h>
83#include <sys/soundcard.h> 83#include <sys/soundcard.h>
84 84
85// for setBacklight() 85// for setBacklight()
86#if defined(QT_QWS_IPAQ) || defined(QT_QWS_EBX) 86#if defined(QT_QWS_IPAQ) || defined(QT_QWS_EBX)
87#include <linux/fb.h> 87#include <linux/fb.h>
88#include <sys/types.h> 88#include <sys/types.h>
89#include <sys/stat.h> 89#include <sys/stat.h>
90#endif 90#endif
91#include <stdlib.h> 91#include <stdlib.h>
92 92
93#include <dlfcn.h> // for Liquid HACK
93 94
94class QPEApplicationData { 95class QPEApplicationData {
95public: 96public:
96 QPEApplicationData() : presstimer(0), presswidget(0), rightpressed(FALSE), 97 QPEApplicationData() : presstimer(0), presswidget(0), rightpressed(FALSE),
97 kbgrabber(0), kbregrab(FALSE), notbusysent(FALSE), preloaded(FALSE), 98 kbgrabber(0), kbregrab(FALSE), notbusysent(FALSE), preloaded(FALSE),
98 forceshow(FALSE), nomaximize(FALSE), qpe_main_widget(0), 99 forceshow(FALSE), nomaximize(FALSE), qpe_main_widget(0),
99 keep_running(TRUE) 100 keep_running(TRUE)
100 { 101 {
101 qcopq.setAutoDelete(TRUE); 102 qcopq.setAutoDelete(TRUE);
102 } 103 }
103 104
104 int presstimer; 105 int presstimer;
@@ -1305,24 +1306,45 @@ void QPEApplication::internalSetStyle( const QString &style )
1305 } 1306 }
1306#endif 1307#endif
1307#ifndef QT_NO_STYLE_MOTIF 1308#ifndef QT_NO_STYLE_MOTIF
1308 else if ( style == "Motif" ) { 1309 else if ( style == "Motif" ) {
1309 setStyle( new QMotifStyle ); 1310 setStyle( new QMotifStyle );
1310 } 1311 }
1311#endif 1312#endif
1312#ifndef QT_NO_STYLE_MOTIFPLUS 1313#ifndef QT_NO_STYLE_MOTIFPLUS
1313 else if ( style == "MotifPlus" ) { 1314 else if ( style == "MotifPlus" ) {
1314 setStyle( new QMotifPlusStyle ); 1315 setStyle( new QMotifPlusStyle );
1315 } 1316 }
1316#endif 1317#endif
1318
1319 // HACK for Qt2 only
1320 else if ( style == "Liquid" ) {
1321 static void *lib = 0;
1322 QStyle *sty = 0;
1323
1324
1325 if ( !lib ) {
1326 QString path = QPEApplication::qpeDir() + "/plugins/styles/" + "libliquid.so";
1327 lib = ::dlopen ( path. local8Bit ( ), RTLD_NOW | RTLD_GLOBAL );
1328 }
1329 if ( lib ) {
1330 void *sym = ::dlsym ( lib, "allocate" );
1331
1332 if ( sym )
1333 sty = ((QStyle * (*) ( )) sym ) ( );
1334 }
1335 if ( sty )
1336 setStyle ( sty );
1337 }
1338 // HACK for Qt2 only
1317#endif 1339#endif
1318} 1340}
1319 1341
1320/*! 1342/*!
1321 \internal 1343 \internal
1322*/ 1344*/
1323void QPEApplication::prepareForTermination(bool willrestart) 1345void QPEApplication::prepareForTermination(bool willrestart)
1324{ 1346{
1325 if ( willrestart ) { 1347 if ( willrestart ) {
1326 // Draw a big wait icon, the image can be altered in later revisions 1348 // Draw a big wait icon, the image can be altered in later revisions
1327// QWidget *d = QApplication::desktop(); 1349// QWidget *d = QApplication::desktop();
1328 QImage img = Resource::loadImage( "launcher/new_wait" ); 1350 QImage img = Resource::loadImage( "launcher/new_wait" );