-rw-r--r-- | core/launcher/launcher.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/core/launcher/launcher.cpp b/core/launcher/launcher.cpp index 4255b44..4ec5f4c 100644 --- a/core/launcher/launcher.cpp +++ b/core/launcher/launcher.cpp | |||
@@ -411,96 +411,104 @@ void LauncherTabWidget::launcherMessage( const QCString &msg, const QByteArray & | |||
411 | stream >> id; | 411 | stream >> id; |
412 | QString color; | 412 | QString color; |
413 | stream >> color; | 413 | stream >> color; |
414 | if ( view(id) ) | 414 | if ( view(id) ) |
415 | view(id)->setTextColor( QColor(color) ); | 415 | view(id)->setTextColor( QColor(color) ); |
416 | if ( id == "Documents" ) | 416 | if ( id == "Documents" ) |
417 | docLoadingWidget->setTextColor( QColor(color) ); | 417 | docLoadingWidget->setTextColor( QColor(color) ); |
418 | } else if ( msg == "setIconColumns(QString,int)" ) { | 418 | } else if ( msg == "setIconColumns(QString,int)" ) { |
419 | QString id; | 419 | QString id; |
420 | stream >> id; | 420 | stream >> id; |
421 | int number; | 421 | int number; |
422 | stream >> number; | 422 | stream >> number; |
423 | if ( view(id ) ) | 423 | if ( view(id ) ) |
424 | view(id)->setColNumber( number ); | 424 | view(id)->setColNumber( number ); |
425 | } else if ( msg == "setFont(QString,QString,int,int,int)" ) { | 425 | } else if ( msg == "setFont(QString,QString,int,int,int)" ) { |
426 | QString id; | 426 | QString id; |
427 | stream >> id; | 427 | stream >> id; |
428 | QString fam; | 428 | QString fam; |
429 | stream >> fam; | 429 | stream >> fam; |
430 | int size; | 430 | int size; |
431 | stream >> size; | 431 | stream >> size; |
432 | int weight; | 432 | int weight; |
433 | stream >> weight; | 433 | stream >> weight; |
434 | int italic; | 434 | int italic; |
435 | stream >> italic; | 435 | stream >> italic; |
436 | if ( view(id) ) { | 436 | if ( view(id) ) { |
437 | if ( !fam.isEmpty() ) { | 437 | if ( !fam.isEmpty() ) { |
438 | view(id)->setViewFont( QFont(fam, size, weight, italic!=0) ); | 438 | view(id)->setViewFont( QFont(fam, size, weight, italic!=0) ); |
439 | odebug << "setFont: " << fam << ", " << size << ", " << weight << ", " << italic << "" << oendl; | 439 | odebug << "setFont: " << fam << ", " << size << ", " << weight << ", " << italic << "" << oendl; |
440 | } else { | 440 | } else { |
441 | view(id)->clearViewFont(); | 441 | view(id)->clearViewFont(); |
442 | } | 442 | } |
443 | } | 443 | } |
444 | }else if ( msg == "setBusyIndicatorType(QString)" ) { | 444 | }else if ( msg == "setBusyIndicatorType(QString)" ) { |
445 | QString type; | 445 | QString type; |
446 | stream >> type; | 446 | stream >> type; |
447 | setBusyIndicatorType( type ); | 447 | setBusyIndicatorType( type ); |
448 | }else if ( msg == "home()" ) { | 448 | }else if ( msg == "home()" ) { |
449 | if ( isVisibleWindow( static_cast<QWidget*>(parent())->winId() ) ) { | 449 | if ( isVisibleWindow( static_cast<QWidget*>(parent())->winId() ) ) { |
450 | if (categoryBar) | 450 | if (categoryBar) |
451 | categoryBar->nextTab(); | 451 | categoryBar->nextTab(); |
452 | }else { | 452 | }else { |
453 | static_cast<QWidget*>(parent())->raise(); | 453 | static_cast<QWidget*>(parent())->raise(); |
454 | } | 454 | } |
455 | } else if (msg=="doctabEnabled(int)") { | 455 | } else if (msg=="doctabEnabled(int)") { |
456 | int id; stream >> id; | 456 | int id; stream >> id; |
457 | odebug << "Doctab enabled " << id << oendl; | 457 | odebug << "Doctab enabled " << id << oendl; |
458 | reCheckDoctab(id); | 458 | reCheckDoctab(id); |
459 | } else if ( msg == "setStaticBackground(bool)" ) { | ||
460 | int set; stream >> set; | ||
461 | odebug << "setStaticBackground " << set << oendl; | ||
462 | for (int i = 0; i < categoryBar->count(); i++ ) | ||
463 | { | ||
464 | LauncherView* view = static_cast<LauncherTab*>( categoryBar->tab(i) )->view; | ||
465 | view->iconView()->setStaticBackgroundPicture( set ); | ||
466 | } | ||
459 | } | 467 | } |
460 | } | 468 | } |
461 | 469 | ||
462 | void LauncherTabWidget::reCheckDoctab(int how) | 470 | void LauncherTabWidget::reCheckDoctab(int how) |
463 | { | 471 | { |
464 | if ((bool)how == docTabEnabled) { | 472 | if ((bool)how == docTabEnabled) { |
465 | /* nothing to do */ | 473 | /* nothing to do */ |
466 | return; | 474 | return; |
467 | } | 475 | } |
468 | if (docLoadingWidget) { | 476 | if (docLoadingWidget) { |
469 | stack->removeWidget(docLoadingWidget); | 477 | stack->removeWidget(docLoadingWidget); |
470 | delete docLoadingWidget; | 478 | delete docLoadingWidget; |
471 | docLoadingWidget = 0; | 479 | docLoadingWidget = 0; |
472 | } | 480 | } |
473 | createDocLoadingWidget(); | 481 | createDocLoadingWidget(); |
474 | { | 482 | { |
475 | QCopEnvelope( "QPE/System", "reforceDocuments()" ); | 483 | QCopEnvelope( "QPE/System", "reforceDocuments()" ); |
476 | odebug << "Sending doc rescan" << oendl; | 484 | odebug << "Sending doc rescan" << oendl; |
477 | } | 485 | } |
478 | } | 486 | } |
479 | 487 | ||
480 | //--------------------------------------------------------------------------- | 488 | //--------------------------------------------------------------------------- |
481 | 489 | ||
482 | Launcher::Launcher() | 490 | Launcher::Launcher() |
483 | : QMainWindow( 0, "PDA User Interface", QWidget::WStyle_Customize | QWidget::WGroupLeader ) | 491 | : QMainWindow( 0, "PDA User Interface", QWidget::WStyle_Customize | QWidget::WGroupLeader ) |
484 | { | 492 | { |
485 | tabs = 0; | 493 | tabs = 0; |
486 | tb = 0; | 494 | tb = 0; |
487 | Config cfg( "Launcher" ); | 495 | Config cfg( "Launcher" ); |
488 | cfg.setGroup( "DocTab" ); | 496 | cfg.setGroup( "DocTab" ); |
489 | docTabEnabled = cfg.readBoolEntry( "Enable", true ); | 497 | docTabEnabled = cfg.readBoolEntry( "Enable", true ); |
490 | } | 498 | } |
491 | 499 | ||
492 | void Launcher::createGUI() | 500 | void Launcher::createGUI() |
493 | { | 501 | { |
494 | setCaption( tr("Launcher") ); | 502 | setCaption( tr("Launcher") ); |
495 | 503 | ||
496 | // we have a pretty good idea how big we'll be | 504 | // we have a pretty good idea how big we'll be |
497 | setGeometry( 0, 0, qApp->desktop()->width(), qApp->desktop()->height() ); | 505 | setGeometry( 0, 0, qApp->desktop()->width(), qApp->desktop()->height() ); |
498 | 506 | ||
499 | tb = new TaskBar; | 507 | tb = new TaskBar; |
500 | tabs = new LauncherTabWidget( this ); | 508 | tabs = new LauncherTabWidget( this ); |
501 | setCentralWidget( tabs ); | 509 | setCentralWidget( tabs ); |
502 | 510 | ||
503 | ServerInterface::dockWidget( tb, ServerInterface::Bottom ); | 511 | ServerInterface::dockWidget( tb, ServerInterface::Bottom ); |
504 | tb->show(); | 512 | tb->show(); |
505 | 513 | ||
506 | qApp->installEventFilter( this ); | 514 | qApp->installEventFilter( this ); |