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/qpeapplication.cpp | |
parent | d7cdf9468af510848688584caf34cb1cc03b8562 (diff) | |
download | opie-9ac29a12a1ba49069a85f8966b1aac89dda7817c.zip opie-9ac29a12a1ba49069a85f8966b1aac89dda7817c.tar.gz opie-9ac29a12a1ba49069a85f8966b1aac89dda7817c.tar.bz2 |
More implementation and stubs to build launcher
Diffstat (limited to 'x11/libqpe-x11/qpe/qpeapplication.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | x11/libqpe-x11/qpe/qpeapplication.cpp | 26 |
1 files changed, 26 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 | |||
@@ -611,48 +611,74 @@ void QPEApplication::tryQuit() { | |||
611 | } | 611 | } |
612 | processEvents(); | 612 | processEvents(); |
613 | 613 | ||
614 | quit(); | 614 | quit(); |
615 | } | 615 | } |
616 | void QPEApplication::hideOrQuit() { | 616 | void QPEApplication::hideOrQuit() { |
617 | qWarning("hide or close"); | 617 | qWarning("hide or close"); |
618 | processEvents(); | 618 | processEvents(); |
619 | qWarning("past processing"); | 619 | qWarning("past processing"); |
620 | 620 | ||
621 | // If we are a preloaded application we don't actually quit, so emit | 621 | // If we are a preloaded application we don't actually quit, so emit |
622 | // a System message indicating we're quasi-closing. | 622 | // a System message indicating we're quasi-closing. |
623 | if ( d->preloaded && d->qpe_main_widget ) | 623 | if ( d->preloaded && d->qpe_main_widget ) |
624 | 624 | ||
625 | { | 625 | { |
626 | qWarning("hiding"); | 626 | qWarning("hiding"); |
627 | QCopEnvelope e("QPE/System", "fastAppHiding(QString)" ); | 627 | QCopEnvelope e("QPE/System", "fastAppHiding(QString)" ); |
628 | e << d->appName; | 628 | e << d->appName; |
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. |
641 | 667 | ||
642 | void* operator new[]( size_t size ) | 668 | void* operator new[]( size_t size ) |
643 | { | 669 | { |
644 | return malloc( size ); | 670 | return malloc( size ); |
645 | } | 671 | } |
646 | 672 | ||
647 | void* operator new( size_t size ) | 673 | void* operator new( size_t size ) |
648 | { | 674 | { |
649 | return malloc( size ); | 675 | return malloc( size ); |
650 | } | 676 | } |
651 | 677 | ||
652 | void operator delete[]( void* p ) | 678 | void operator delete[]( void* p ) |
653 | { | 679 | { |
654 | free( p ); | 680 | free( p ); |
655 | } | 681 | } |
656 | 682 | ||
657 | void operator delete[]( void* p, size_t /*size*/ ) | 683 | void operator delete[]( void* p, size_t /*size*/ ) |
658 | { | 684 | { |