summaryrefslogtreecommitdiff
path: root/core/launcher/taskbar.cpp
Unidiff
Diffstat (limited to 'core/launcher/taskbar.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/taskbar.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/launcher/taskbar.cpp b/core/launcher/taskbar.cpp
index 491a8a3..91e2f20 100644
--- a/core/launcher/taskbar.cpp
+++ b/core/launcher/taskbar.cpp
@@ -168,98 +168,98 @@ private:
168 168
169TaskBar::~TaskBar() 169TaskBar::~TaskBar()
170{ 170{
171} 171}
172 172
173 173
174TaskBar::TaskBar() : QHBox(0, 0, WStyle_Customize | WStyle_Tool | WStyle_StaysOnTop | WGroupLeader) 174TaskBar::TaskBar() : QHBox(0, 0, WStyle_Customize | WStyle_Tool | WStyle_StaysOnTop | WGroupLeader)
175{ 175{
176 Config cfg( "Launcher" ); 176 Config cfg( "Launcher" );
177 cfg.setGroup( "InputMethods" ); 177 cfg.setGroup( "InputMethods" );
178 resizeRunningApp = cfg.readBoolEntry( "Resize", true ); 178 resizeRunningApp = cfg.readBoolEntry( "Resize", true );
179 179
180 sm = new StartMenu( this ); 180 sm = new StartMenu( this );
181 connect( sm, SIGNAL(tabSelected(const QString&)), this, 181 connect( sm, SIGNAL(tabSelected(const QString&)), this,
182 SIGNAL(tabSelected(const QString&)) ); 182 SIGNAL(tabSelected(const QString&)) );
183 183
184 inputMethods = new InputMethods( this ); 184 inputMethods = new InputMethods( this );
185 connect( inputMethods, SIGNAL(inputToggled(bool)), 185 connect( inputMethods, SIGNAL(inputToggled(bool)),
186 this, SLOT(calcMaxWindowRect()) ); 186 this, SLOT(calcMaxWindowRect()) );
187 187
188 stack = new QWidgetStack( this ); 188 stack = new QWidgetStack( this );
189 stack->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Minimum ) ); 189 stack->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Minimum ) );
190 label = new QLabel(stack); 190 label = new QLabel(stack);
191 191
192 runningAppBar = new RunningAppBar(stack); 192 runningAppBar = new RunningAppBar(stack);
193 stack->raiseWidget(runningAppBar); 193 stack->raiseWidget(runningAppBar);
194 194
195 waitIcon = new Wait( this ); 195 waitIcon = new Wait( this );
196 (void) new AppIcons( this ); 196 (void) new AppIcons( this );
197 197
198 sysTray = new SysTray( this ); 198 sysTray = new SysTray( this );
199 199
200 /* ### FIXME plugin loader and safe mode */ 200 /* ### FIXME plugin loader and safe mode */
201#if 0 201#if 0
202 if (PluginLoader::inSafeMode()) 202 if (PluginLoader::inSafeMode())
203 (void)new SafeMode( this ); 203 (void)new SafeMode( this );
204#endif 204#endif
205 205
206 // ## make customizable in some way? 206 // ## make customizable in some way?
207#ifdef QT_QWS_CUSTOM 207#ifdef QT_QWS_CUSTOM
208 lockState = new LockKeyState( this ); 208 lockState = new LockKeyState( this );
209#else 209#else
210 lockState = 0; 210 lockState = 0;
211#endif 211#endif
212 212
213#if defined(Q_WS_QWS) 213#if defined(Q_WS_QWS)
214#if !defined(QT_NO_COP) 214#if !defined(QT_NO_COP)
215 QCopChannel *channel = new QCopChannel( "QPE/TaskBar", this ); 215 QCopChannel *channel = new QCopChannel( "QPE/TaskBar", this );
216 connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), 216 connect( channel, SIGNAL(received(const QCString&,const QByteArray&)),
217 this, SLOT(receive(const QCString&, const QByteArray&)) ); 217 this, SLOT(receive(const QCString&,const QByteArray&)) );
218#endif 218#endif
219#endif 219#endif
220 waitTimer = new QTimer( this ); 220 waitTimer = new QTimer( this );
221 connect( waitTimer, SIGNAL( timeout() ), this, SLOT( stopWait() ) ); 221 connect( waitTimer, SIGNAL( timeout() ), this, SLOT( stopWait() ) );
222 clearer = new QTimer( this ); 222 clearer = new QTimer( this );
223 QObject::connect(clearer, SIGNAL(timeout()), SLOT(clearStatusBar())); 223 QObject::connect(clearer, SIGNAL(timeout()), SLOT(clearStatusBar()));
224 224
225 connect( qApp, SIGNAL(symbol()), this, SLOT(toggleSymbolInput()) ); 225 connect( qApp, SIGNAL(symbol()), this, SLOT(toggleSymbolInput()) );
226 connect( qApp, SIGNAL(numLockStateToggle()), this, SLOT(toggleNumLockState()) ); 226 connect( qApp, SIGNAL(numLockStateToggle()), this, SLOT(toggleNumLockState()) );
227 connect( qApp, SIGNAL(capsLockStateToggle()), this, SLOT(toggleCapsLockState()) ); 227 connect( qApp, SIGNAL(capsLockStateToggle()), this, SLOT(toggleCapsLockState()) );
228} 228}
229 229
230void TaskBar::setStatusMessage( const QString &text ) 230void TaskBar::setStatusMessage( const QString &text )
231{ 231{
232 if ( !text.isEmpty() ) { 232 if ( !text.isEmpty() ) {
233 label->setText( text ); 233 label->setText( text );
234 stack->raiseWidget( label ); 234 stack->raiseWidget( label );
235 if ( sysTray && ( label->fontMetrics().width( text ) > label->width() ) ) 235 if ( sysTray && ( label->fontMetrics().width( text ) > label->width() ) )
236 sysTray->hide(); 236 sysTray->hide();
237 clearer->start( 3000, TRUE ); 237 clearer->start( 3000, TRUE );
238 } else { 238 } else {
239 clearStatusBar(); 239 clearStatusBar();
240 } 240 }
241} 241}
242 242
243void TaskBar::clearStatusBar() 243void TaskBar::clearStatusBar()
244{ 244{
245 label->clear(); 245 label->clear();
246 stack->raiseWidget(runningAppBar); 246 stack->raiseWidget(runningAppBar);
247 if ( sysTray ) 247 if ( sysTray )
248 sysTray->show(); 248 sysTray->show();
249 // stack->raiseWidget( mru ); 249 // stack->raiseWidget( mru );
250} 250}
251 251
252void TaskBar::startWait() 252void TaskBar::startWait()
253{ 253{
254 waitIcon->setWaiting( true ); 254 waitIcon->setWaiting( true );
255 // a catchall stop after 10 seconds... 255 // a catchall stop after 10 seconds...
256 waitTimer->start( 10 * 1000, true ); 256 waitTimer->start( 10 * 1000, true );
257} 257}
258 258
259void TaskBar::stopWait(const QString&) 259void TaskBar::stopWait(const QString&)
260{ 260{
261 waitTimer->stop(); 261 waitTimer->stop();
262 waitIcon->setWaiting( false ); 262 waitIcon->setWaiting( false );
263} 263}
264 264
265void TaskBar::stopWait() 265void TaskBar::stopWait()