From 2bf0790dac098fd24a20161f32cd848a87fe56ca Mon Sep 17 00:00:00 2001 From: harlekin Date: Mon, 24 Mar 2003 20:51:18 +0000 Subject: preliminary big busy cursor - maybe an animation later --- (limited to 'core') diff --git a/core/launcher/launcher.pro b/core/launcher/launcher.pro index d0a573b..a876d1d 100644 --- a/core/launcher/launcher.pro +++ b/core/launcher/launcher.pro @@ -14,6 +14,7 @@ HEADERS = background.h \ inputmethods.h \ systray.h \ wait.h \ + waitpopup.h \ shutdownimpl.h \ launcher.h \ launcherview.h \ @@ -55,6 +56,7 @@ SOURCES = background.cpp \ inputmethods.cpp \ systray.cpp \ wait.cpp \ + waitpopup.cpp \ shutdownimpl.cpp \ launcher.cpp \ launcherview.cpp \ diff --git a/core/launcher/wait.cpp b/core/launcher/wait.cpp index 059e6f1..e1832dd 100644 --- a/core/launcher/wait.cpp +++ b/core/launcher/wait.cpp @@ -21,6 +21,7 @@ #include "wait.h" #include +#include #include #include @@ -35,6 +36,8 @@ Wait::Wait( QWidget *parent ) : QWidget( parent ), { setFixedSize( pm.size() ); lastWaitObject = this; + centralWait = new WaitPopup( 0L ); + centralWait->hide(); hide(); } @@ -47,11 +50,21 @@ Wait *Wait::getWaitObject() void Wait::setWaiting( bool w ) { + Config cfg ( "Launcher" ); + cfg. setGroup ( "GUI" ); + + waiting = w; - if ( w ) - show(); - else - hide(); + if ( w ) { + if ( cfg. readBoolEntry ( "BigBusy" ) ) { + centralWait->show(); + } else { + show(); + } + } else { + centralWait->hide(); + hide(); + } } diff --git a/core/launcher/wait.h b/core/launcher/wait.h index 519b654..6e5e41a 100644 --- a/core/launcher/wait.h +++ b/core/launcher/wait.h @@ -24,9 +24,10 @@ #include #include +#include #include #include - +#include "waitpopup.h" class Wait : public QWidget { @@ -36,6 +37,7 @@ public: void paintEvent( QPaintEvent * ); static Wait *getWaitObject(); private: + WaitPopup* centralWait; QPixmap pm; bool waiting; }; diff --git a/core/launcher/waitpopup.cpp b/core/launcher/waitpopup.cpp new file mode 100644 index 0000000..e488ab5 --- a/dev/null +++ b/core/launcher/waitpopup.cpp @@ -0,0 +1,23 @@ +#include +#include +#include +#include + +#include "waitpopup.h" +#include + + +WaitPopup::WaitPopup(QWidget *parent, const char* msg, bool dispIcon ) + :QDialog(parent, QObject::tr("Wait"), TRUE,WStyle_Customize) { + QHBoxLayout *hbox = new QHBoxLayout( this ); + QLabel *lb; + lb = new QLabel( this ); + //lb->setMovie( QMovie( "./wait.gif" , 200) ); + lb->setPixmap( Resource::loadPixmap( "Clock" ) ); + lb->setBackgroundMode ( NoBackground ); + hbox->addWidget( lb ); + hbox->activate(); +} + +WaitPopup::~WaitPopup() { +} diff --git a/core/launcher/waitpopup.h b/core/launcher/waitpopup.h new file mode 100644 index 0000000..76f0c27 --- a/dev/null +++ b/core/launcher/waitpopup.h @@ -0,0 +1,14 @@ +#ifndef WAITPOPUP_H +#define WAITPOPUP_H + +#include + +class WaitPopup : public QDialog { + Q_OBJECT + +public: + WaitPopup(QWidget *parent=0,const char* msg=0,bool dispIcon=TRUE); + ~WaitPopup(); +}; + +#endif -- cgit v0.9.0.2