author | zecke <zecke> | 2002-10-17 17:05:26 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-10-17 17:05:26 (UTC) |
commit | 9ac29a12a1ba49069a85f8966b1aac89dda7817c (patch) (unidiff) | |
tree | 7c959c1ec504d01616601ddb6d71195b42a42db4 /x11/libqpe-x11/qpe | |
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 |
2 files changed, 35 insertions, 0 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 | |||
@@ -629,12 +629,38 @@ void QPEApplication::hideOrQuit() { | |||
629 | d->qpe_main_widget->hide(); | 629 | d->qpe_main_widget->hide(); |
630 | } | 630 | } |
631 | else | 631 | else |
632 | quit(); | 632 | quit(); |
633 | } | 633 | } |
634 | 634 | ||
635 | /*! | ||
636 | \internal | ||
637 | */ | ||
638 | void QPEApplication::prepareForTermination( bool willrestart ) | ||
639 | { | ||
640 | if ( willrestart ) { | ||
641 | // Draw a big wait icon, the image can be altered in later revisions | ||
642 | // QWidget *d = QApplication::desktop(); | ||
643 | QImage img = Resource::loadImage( "launcher/new_wait" ); | ||
644 | QPixmap pix; | ||
645 | pix.convertFromImage( img.smoothScale( 1 * img.width(), 1 * img.height() ) ); | ||
646 | QLabel *lblWait = new QLabel( 0, "wait hack!", QWidget::WStyle_Customize | | ||
647 | QWidget::WStyle_NoBorder | QWidget::WStyle_Tool ); | ||
648 | lblWait->setPixmap( pix ); | ||
649 | lblWait->setAlignment( QWidget::AlignCenter ); | ||
650 | lblWait->show(); | ||
651 | lblWait->showMaximized(); | ||
652 | } | ||
653 | #ifndef SINGLE_APP | ||
654 | { QCopEnvelope envelope( "QPE/System", "forceQuit()" ); | ||
655 | } | ||
656 | processEvents(); // ensure the message goes out. | ||
657 | sleep( 1 ); // You have 1 second to comply. | ||
658 | #endif | ||
659 | } | ||
660 | |||
635 | #if defined(QT_QWS_IPAQ) || defined(QT_QWS_EBX) | 661 | #if defined(QT_QWS_IPAQ) || defined(QT_QWS_EBX) |
636 | 662 | ||
637 | // The libraries with the skiff package (and possibly others) have | 663 | // The libraries with the skiff package (and possibly others) have |
638 | // completely useless implementations of builtin new and delete that | 664 | // completely useless implementations of builtin new and delete that |
639 | // use about 50% of your CPU. Here we revert to the simple libc | 665 | // use about 50% of your CPU. Here we revert to the simple libc |
640 | // functions. | 666 | // functions. |
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 | |||
@@ -51,12 +51,20 @@ public: | |||
51 | static void setKeepRunning(); | 51 | static void setKeepRunning(); |
52 | bool keepRunning()const; | 52 | bool keepRunning()const; |
53 | 53 | ||
54 | bool keyboardGrabbed()const; | 54 | bool keyboardGrabbed()const; |
55 | int exec(); | 55 | int exec(); |
56 | 56 | ||
57 | // QWS bits | ||
58 | enum screenSaverHint { | ||
59 | Disable = 0, | ||
60 | DisableLightOff = 1, | ||
61 | DisableSuspend = 2, | ||
62 | Enable = 100 | ||
63 | }; | ||
64 | |||
57 | signals: | 65 | signals: |
58 | void clientMoused(); | 66 | void clientMoused(); |
59 | void timeChanged(); | 67 | void timeChanged(); |
60 | void clockChanged( bool pm ); | 68 | void clockChanged( bool pm ); |
61 | void micChanged( bool muted ); | 69 | void micChanged( bool muted ); |
62 | void volumeChanged( bool muted ); | 70 | void volumeChanged( bool muted ); |
@@ -75,12 +83,13 @@ private slots: | |||
75 | void systemMessage( const QCString&, const QByteArray& ); | 83 | void systemMessage( const QCString&, const QByteArray& ); |
76 | void pidMessage( const QCString&, const QByteArray& ); | 84 | void pidMessage( const QCString&, const QByteArray& ); |
77 | void removeSenderFromStylusDict(); | 85 | void removeSenderFromStylusDict(); |
78 | protected: | 86 | protected: |
79 | virtual void restart(); | 87 | virtual void restart(); |
80 | virtual void shutdown(); | 88 | virtual void shutdown(); |
89 | void prepareForTermination(bool willrestart); | ||
81 | bool eventFilter( QObject*, QEvent* ); | 90 | bool eventFilter( QObject*, QEvent* ); |
82 | void timerEvent( QTimerEvent* ); | 91 | void timerEvent( QTimerEvent* ); |
83 | void raiseAppropriateWindow(); | 92 | void raiseAppropriateWindow(); |
84 | virtual void tryQuit(); | 93 | virtual void tryQuit(); |
85 | 94 | ||
86 | private: | 95 | private: |