author | harlekin <harlekin> | 2002-03-22 18:16:38 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-03-22 18:16:38 (UTC) |
commit | a6f3ce177ac43ec2cf91f96cfd11713126e29407 (patch) (side-by-side diff) | |
tree | 023664192c19117e524892fea4ec98b49dc55826 | |
parent | da1430c6bd5fee39a19b294017848b95198217af (diff) | |
download | opie-a6f3ce177ac43ec2cf91f96cfd11713126e29407.zip opie-a6f3ce177ac43ec2cf91f96cfd11713126e29407.tar.gz opie-a6f3ce177ac43ec2cf91f96cfd11713126e29407.tar.bz2 |
different splash
-rw-r--r-- | library/qpeapplication.cpp | 4 | ||||
-rw-r--r-- | pics/launcher/new_wait.png | bin | 0 -> 1904 bytes |
2 files changed, 2 insertions, 2 deletions
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp index a55f5f9..c154689 100644 --- a/library/qpeapplication.cpp +++ b/library/qpeapplication.cpp @@ -1154,259 +1154,259 @@ void QPEApplication::showMainWidget( QWidget* mw, bool nomaximize ) else #endif mw->show(); } } else if ( d->keep_running ) { #ifdef Q_WS_QWS if ( !nomaximize ) mw->showMaximized(); else #endif mw->show(); } } /*! Sets \a mw as the mainWidget() and shows it. For small windows, consider passing TRUE for \a nomaximize rather than the default FALSE. This calls designates the application as a \link docwidget.html document-oriented\endlink application. The \a mw widget must have a slot: setDocument(const QString&). \sa showMainWidget() */ void QPEApplication::showMainDocumentWidget( QWidget* mw, bool nomaximize ) { setWidgetCaptionFromAppName( mw, d->appName, qpeDir() + "apps" ); if ( mw && argc() == 2 ) Global::setDocument( mw, QString::fromUtf8(argv()[1]) ); d->nomaximize = nomaximize; d->qpe_main_widget = mw; d->sendQCopQ(); if ( d->preloaded ) { if(d->forceshow) { #ifdef Q_WS_QWS if ( !nomaximize ) mw->showMaximized(); else #endif mw->show(); } } else if ( d->keep_running ) { #ifdef Q_WS_QWS if ( !nomaximize ) mw->showMaximized(); else #endif mw->show(); } } /*! Sets that the application should continue running after processing qcop messages. Normally if an application is started via a qcop message, the application will process the qcop message and then quit. If while processing the qcop message it calls this function, then the application will show and start proper once it has finished processing qcop messages. \sa keepRunning() */ void QPEApplication::setKeepRunning() { if ( qApp && qApp->inherits( "QPEApplication" ) ) { QPEApplication *qpeApp = (QPEApplication*)qApp; qpeApp->d->keep_running = TRUE; } } /*! Returns whether the application will quit after processing the current list of qcop messages. \sa setKeepRunning() */ bool QPEApplication::keepRunning() const { return d->keep_running; } /*! \internal */ void QPEApplication::internalSetStyle( const QString &style ) { #if QT_VERSION >= 300 if ( style == "QPE" ) { setStyle( new QPEStyle ); } else { QStyle *s = QStyleFactory::create(style); if ( s ) setStyle(s); } #else if ( style == "Windows" ) { setStyle( new QWindowsStyle ); } else if ( style == "QPE" ) { setStyle( new QPEStyle ); } else if ( style == "Light" ) { setStyle( new LightStyle ); } #ifndef QT_NO_STYLE_PLATINUM else if ( style == "Platinum" ) { setStyle( new QPlatinumStyle ); } #endif #ifndef QT_NO_STYLE_MOTIF else if ( style == "Motif" ) { setStyle( new QMotifStyle ); } #endif #ifndef QT_NO_STYLE_MOTIFPLUS else if ( style == "MotifPlus" ) { setStyle( new QMotifPlusStyle ); } #endif #endif } /*! \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( "wait" ); + QImage img = Resource::loadImage( "launcher/new_wait" ); QPixmap pix; - pix.convertFromImage(img.smoothScale(3*img.width(), 3*img.height())); + 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 } /*! \internal */ void QPEApplication::shutdown() { // Implement in server's QPEApplication subclass } /*! \internal */ void QPEApplication::restart() { // Implement in server's QPEApplication subclass } static QPtrDict<void>* stylusDict=0; static void createDict() { if ( !stylusDict ) stylusDict = new QPtrDict<void>; } /*! Returns the current StylusMode for \a w. \sa setStylusOperation() */ QPEApplication::StylusMode QPEApplication::stylusOperation( QWidget* w ) { if ( stylusDict ) return (StylusMode)(int)stylusDict->find(w); return LeftOnly; } /*! \enum QPEApplication::StylusMode \value LeftOnly the stylus only generates LeftButton events (the default). \value RightOnHold the stylus generates RightButton events if the user uses the press-and-hold gesture. See setStylusOperation(). */ /*! Causes \a w to receive mouse events according to \a mode. \sa stylusOperation() */ void QPEApplication::setStylusOperation( QWidget* w, StylusMode mode ) { createDict(); if ( mode == LeftOnly ) { stylusDict->remove(w); w->removeEventFilter(qApp); } else { stylusDict->insert(w,(void*)mode); connect(w,SIGNAL(destroyed()),qApp,SLOT(removeSenderFromStylusDict())); w->installEventFilter(qApp); } } /*! \reimp */ bool QPEApplication::eventFilter( QObject *o, QEvent *e ) { if ( stylusDict && e->type() >= QEvent::MouseButtonPress && e->type() <= QEvent::MouseMove ) { QMouseEvent* me = (QMouseEvent*)e; if ( me->button() == LeftButton ) { StylusMode mode = (StylusMode)(int)stylusDict->find(o); switch (mode) { case RightOnHold: switch ( me->type() ) { case QEvent::MouseButtonPress: d->presstimer = startTimer(500); // #### pref. d->presswidget = (QWidget*)o; d->presspos = me->pos(); d->rightpressed = FALSE; break; case QEvent::MouseButtonRelease: if ( d->presstimer ) { killTimer(d->presstimer); d->presstimer = 0; } if ( d->rightpressed && d->presswidget ) { // Right released postEvent( d->presswidget, new QMouseEvent( QEvent::MouseButtonRelease, me->pos(), RightButton, LeftButton+RightButton ) ); // Left released, off-widget postEvent( d->presswidget, new QMouseEvent( QEvent::MouseMove, QPoint(-1,-1), LeftButton, LeftButton ) ); postEvent( d->presswidget, new QMouseEvent( QEvent::MouseButtonRelease, QPoint(-1,-1), LeftButton, LeftButton ) ); d->rightpressed = FALSE; return TRUE; // don't send the real Left release } break; default: break; } break; default: ; } } } else if ( e->type() == QEvent::KeyPress || e->type() == QEvent::KeyRelease ) { QKeyEvent *ke = (QKeyEvent *)e; diff --git a/pics/launcher/new_wait.png b/pics/launcher/new_wait.png Binary files differnew file mode 100644 index 0000000..ef65056 --- a/dev/null +++ b/pics/launcher/new_wait.png |