summaryrefslogtreecommitdiff
path: root/core/launcher/taskbar.cpp
authorharlekin <harlekin>2002-09-09 18:21:06 (UTC)
committer harlekin <harlekin>2002-09-09 18:21:06 (UTC)
commitc9442bf567252553da8ce216de1e64cbf70db3bd (patch) (unidiff)
tree8eedf088cc2ad2608287a5e6c94ad05587fa9dc0 /core/launcher/taskbar.cpp
parent3044db24e632adbcf5dbbf1874944d54cee7c8e3 (diff)
downloadopie-c9442bf567252553da8ce216de1e64cbf70db3bd.zip
opie-c9442bf567252553da8ce216de1e64cbf70db3bd.tar.gz
opie-c9442bf567252553da8ce216de1e64cbf70db3bd.tar.bz2
mrulist is dead, long live runningappbar, hopefully
Diffstat (limited to 'core/launcher/taskbar.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/launcher/taskbar.cpp19
1 files changed, 13 insertions, 6 deletions
diff --git a/core/launcher/taskbar.cpp b/core/launcher/taskbar.cpp
index e38b9fe..9f397eb 100644
--- a/core/launcher/taskbar.cpp
+++ b/core/launcher/taskbar.cpp
@@ -12,24 +12,25 @@
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19*********************************************************************/ 19*********************************************************************/
20 20
21#include "startmenu.h" 21#include "startmenu.h"
22#include "inputmethods.h" 22#include "inputmethods.h"
23#include "mrulist.h" 23#include "mrulist.h"
24#include "runningappbar.h"
24#include "systray.h" 25#include "systray.h"
25#include "calibrate.h" 26#include "calibrate.h"
26#include "wait.h" 27#include "wait.h"
27#include "appicons.h" 28#include "appicons.h"
28 29
29#include "taskbar.h" 30#include "taskbar.h"
30#include "desktop.h" 31#include "desktop.h"
31 32
32#include <qpe/qpeapplication.h> 33#include <qpe/qpeapplication.h>
33#include <qpe/qcopenvelope_qws.h> 34#include <qpe/qcopenvelope_qws.h>
34#include <qpe/global.h> 35#include <qpe/global.h>
35 36
@@ -146,36 +147,39 @@ TaskBar::TaskBar() : QHBox(0, 0, WStyle_Customize | WStyle_Tool | WStyle_StaysOn
146 147
147 sm = new StartMenu( this ); 148 sm = new StartMenu( this );
148 149
149 inputMethods = new InputMethods( this ); 150 inputMethods = new InputMethods( this );
150 connect( inputMethods, SIGNAL(inputToggled(bool)), 151 connect( inputMethods, SIGNAL(inputToggled(bool)),
151 this, SLOT(calcMaxWindowRect()) ); 152 this, SLOT(calcMaxWindowRect()) );
152 //new QuickLauncher( this ); 153 //new QuickLauncher( this );
153 154
154 stack = new QWidgetStack( this ); 155 stack = new QWidgetStack( this );
155 stack->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Minimum ) ); 156 stack->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Minimum ) );
156 label = new QLabel(stack); 157 label = new QLabel(stack);
157 158
158 mru = new MRUList( stack ); 159 //mru = new MRUList( stack );
159 stack->raiseWidget( mru ); 160 //stack->raiseWidget( mru );
161
162 runningAppBar = new RunningAppBar(stack);
163 stack->raiseWidget(runningAppBar);
160 164
161 waitIcon = new Wait( this ); 165 waitIcon = new Wait( this );
162 (void) new AppIcons( this ); 166 (void) new AppIcons( this );
163 167
164 sysTray = new SysTray( this ); 168 sysTray = new SysTray( this );
165 169
166 // ## make customizable in some way? 170 // ## make customizable in some way?
167#ifdef QT_QWS_CUSTOM 171#ifdef QT_QWS_CUSTOM
168 lockState = new LockKeyState( this ); 172 lockState = new LockKeyState( this );
169#else 173y#else
170 lockState = 0; 174 lockState = 0;
171#endif 175#endif
172 176
173#if defined(Q_WS_QWS) 177#if defined(Q_WS_QWS)
174#if !defined(QT_NO_COP) 178#if !defined(QT_NO_COP)
175 QCopChannel *channel = new QCopChannel( "QPE/TaskBar", this ); 179 QCopChannel *channel = new QCopChannel( "QPE/TaskBar", this );
176 connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), 180 connect( channel, SIGNAL(received(const QCString&, const QByteArray&)),
177 this, SLOT(receive(const QCString&, const QByteArray&)) ); 181 this, SLOT(receive(const QCString&, const QByteArray&)) );
178#endif 182#endif
179#endif 183#endif
180 waitTimer = new QTimer( this ); 184 waitTimer = new QTimer( this );
181 connect( waitTimer, SIGNAL( timeout() ), this, SLOT( stopWait() ) ); 185 connect( waitTimer, SIGNAL( timeout() ), this, SLOT( stopWait() ) );
@@ -187,44 +191,46 @@ TaskBar::TaskBar() : QHBox(0, 0, WStyle_Customize | WStyle_Tool | WStyle_StaysOn
187void TaskBar::setStatusMessage( const QString &text ) 191void TaskBar::setStatusMessage( const QString &text )
188{ 192{
189 label->setText( text ); 193 label->setText( text );
190 stack->raiseWidget( label ); 194 stack->raiseWidget( label );
191 if ( sysTray && ( label->fontMetrics().width( text ) > label->width() ) ) 195 if ( sysTray && ( label->fontMetrics().width( text ) > label->width() ) )
192 sysTray->hide(); 196 sysTray->hide();
193 clearer->start( 3000 ); 197 clearer->start( 3000 );
194} 198}
195 199
196void TaskBar::clearStatusBar() 200void TaskBar::clearStatusBar()
197{ 201{
198 label->clear(); 202 label->clear();
199 stack->raiseWidget( mru ); 203 stack->raiseWidget(runningAppBar);
204 // stack->raiseWidget( mru );
200} 205}
201 206
202void TaskBar::startWait() 207void TaskBar::startWait()
203{ 208{
204 waitIcon->setWaiting( true ); 209 waitIcon->setWaiting( true );
205 // a catchall stop after 10 seconds... 210 // a catchall stop after 10 seconds...
206 waitTimer->start( 10 * 1000, true ); 211 waitTimer->start( 10 * 1000, true );
207} 212}
208 213
209void TaskBar::stopWait(const QString& app) 214void TaskBar::stopWait(const QString& app)
210{ 215{
211 waitTimer->stop(); 216 waitTimer->stop();
212 mru->addTask(sm->execToLink(app)); 217 //mru->addTask(sm->execToLink(app));
213 waitIcon->setWaiting( false ); 218 waitIcon->setWaiting( false );
214} 219}
215 220
216void TaskBar::stopWait() 221void TaskBar::stopWait()
217{ 222{
218 waitTimer->stop(); 223 waitTimer->stop();
224
219 waitIcon->setWaiting( false ); 225 waitIcon->setWaiting( false );
220} 226}
221 227
222void TaskBar::resizeEvent( QResizeEvent *e ) 228void TaskBar::resizeEvent( QResizeEvent *e )
223{ 229{
224 QHBox::resizeEvent( e ); 230 QHBox::resizeEvent( e );
225 calcMaxWindowRect(); 231 calcMaxWindowRect();
226} 232}
227 233
228void TaskBar::styleChange( QStyle &s ) 234void TaskBar::styleChange( QStyle &s )
229{ 235{
230 QHBox::styleChange( s ); 236 QHBox::styleChange( s );
@@ -302,15 +308,16 @@ void TaskBar::toggleCapsLockState()
302 308
303void TaskBar::toggleSymbolInput() 309void TaskBar::toggleSymbolInput()
304{ 310{
305 if ( inputMethods->currentShown() == "Unicode" ) { 311 if ( inputMethods->currentShown() == "Unicode" ) {
306 inputMethods->hideInputMethod(); 312 inputMethods->hideInputMethod();
307 } else { 313 } else {
308 inputMethods->showInputMethod("Unicode"); 314 inputMethods->showInputMethod("Unicode");
309 } 315 }
310} 316}
311 317
312bool TaskBar::recoverMemory() 318bool TaskBar::recoverMemory()
313{ 319{
314 return mru->quitOldApps(); 320 //eturn mru->quitOldApps();
321 return true;
315} 322}
316 323