author | zecke <zecke> | 2002-10-17 17:05:26 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-10-17 17:05:26 (UTC) |
commit | 9ac29a12a1ba49069a85f8966b1aac89dda7817c (patch) (side-by-side diff) | |
tree | 7c959c1ec504d01616601ddb6d71195b42a42db4 /x11/libqpe-x11 | |
parent | d7cdf9468af510848688584caf34cb1cc03b8562 (diff) | |
download | opie-9ac29a12a1ba49069a85f8966b1aac89dda7817c.zip opie-9ac29a12a1ba49069a85f8966b1aac89dda7817c.tar.gz opie-9ac29a12a1ba49069a85f8966b1aac89dda7817c.tar.bz2 |
More implementation and stubs to build launcher
-rw-r--r-- | x11/libqpe-x11/qpe/qpeapplication.cpp | 26 | ||||
-rw-r--r-- | x11/libqpe-x11/qpe/qpeapplication.h | 9 | ||||
-rw-r--r-- | x11/libqpe-x11/qt/qwindowsystem_qws.h | 19 |
3 files changed, 53 insertions, 1 deletions
diff --git a/x11/libqpe-x11/qpe/qpeapplication.cpp b/x11/libqpe-x11/qpe/qpeapplication.cpp index 6e4a96c..8785c74 100644 --- a/x11/libqpe-x11/qpe/qpeapplication.cpp +++ b/x11/libqpe-x11/qpe/qpeapplication.cpp @@ -632,6 +632,32 @@ void QPEApplication::hideOrQuit() { quit(); } +/*! + \internal +*/ +void QPEApplication::prepareForTermination( bool willrestart ) +{ + if ( willrestart ) { + // Draw a big wait icon, the image can be altered in later revisions + // QWidget *d = QApplication::desktop(); + QImage img = Resource::loadImage( "launcher/new_wait" ); + QPixmap pix; + pix.convertFromImage( img.smoothScale( 1 * img.width(), 1 * img.height() ) ); + QLabel *lblWait = new QLabel( 0, "wait hack!", QWidget::WStyle_Customize | + QWidget::WStyle_NoBorder | QWidget::WStyle_Tool ); + lblWait->setPixmap( pix ); + lblWait->setAlignment( QWidget::AlignCenter ); + lblWait->show(); + lblWait->showMaximized(); + } +#ifndef SINGLE_APP + { QCopEnvelope envelope( "QPE/System", "forceQuit()" ); + } + processEvents(); // ensure the message goes out. + sleep( 1 ); // You have 1 second to comply. +#endif +} + #if defined(QT_QWS_IPAQ) || defined(QT_QWS_EBX) // The libraries with the skiff package (and possibly others) have diff --git a/x11/libqpe-x11/qpe/qpeapplication.h b/x11/libqpe-x11/qpe/qpeapplication.h index 2af1c66..333f331 100644 --- a/x11/libqpe-x11/qpe/qpeapplication.h +++ b/x11/libqpe-x11/qpe/qpeapplication.h @@ -54,6 +54,14 @@ public: bool keyboardGrabbed()const; int exec(); +// QWS bits + enum screenSaverHint { + Disable = 0, + DisableLightOff = 1, + DisableSuspend = 2, + Enable = 100 + }; + signals: void clientMoused(); void timeChanged(); @@ -78,6 +86,7 @@ private slots: protected: virtual void restart(); virtual void shutdown(); + void prepareForTermination(bool willrestart); bool eventFilter( QObject*, QEvent* ); void timerEvent( QTimerEvent* ); void raiseAppropriateWindow(); diff --git a/x11/libqpe-x11/qt/qwindowsystem_qws.h b/x11/libqpe-x11/qt/qwindowsystem_qws.h index 7bc43c5..2652f5f 100644 --- a/x11/libqpe-x11/qt/qwindowsystem_qws.h +++ b/x11/libqpe-x11/qt/qwindowsystem_qws.h @@ -1,6 +1,7 @@ #ifndef OPIE_QWINDOWSYSTEM_H #define OPIE_QWINDOWSYSTEM_H +class QWSScreenSaver; class QWSServer { public: QWSServer(){} @@ -11,8 +12,24 @@ QWSServer(){} static void setKeyboardFilter( KeyboardFilter* ) { } + static void setScreenSaver( QWSScreenSaver* ) { -}; + } + static void setScreenSaverInterval( int ) { + + } + static void setScreenSaverIntervals( int[] ) { + + } + static void screenSaverActivate( bool ) { + } + static void setDesktopBackground( const QImage& ) { + + } + +}; +struct QWSScreenSaver { +}; #endif |