summaryrefslogtreecommitdiff
path: root/core/launcher/launcher.cpp
Unidiff
Diffstat (limited to 'core/launcher/launcher.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/launcher.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/core/launcher/launcher.cpp b/core/launcher/launcher.cpp
index 54efb0b..5d0c778 100644
--- a/core/launcher/launcher.cpp
+++ b/core/launcher/launcher.cpp
@@ -77,52 +77,52 @@
77 77
78 78
79static bool isVisibleWindow( int ); 79static bool isVisibleWindow( int );
80//=========================================================================== 80//===========================================================================
81 81
82LauncherTabWidget::LauncherTabWidget( Launcher* parent ) : 82LauncherTabWidget::LauncherTabWidget( Launcher* parent ) :
83 QVBox( parent ), docview( 0 ) 83 QVBox( parent ), docview( 0 )
84{ 84{
85 docLoadingWidgetEnabled = false; 85 docLoadingWidgetEnabled = false;
86 docLoadingWidget = 0; 86 docLoadingWidget = 0;
87 docLoadingWidgetProgress = 0; 87 docLoadingWidgetProgress = 0;
88 launcher = parent; 88 launcher = parent;
89 categoryBar = new LauncherTabBar( this ); 89 categoryBar = new LauncherTabBar( this );
90 QPalette pal = categoryBar->palette(); 90 QPalette pal = categoryBar->palette();
91 pal.setColor( QColorGroup::Light, pal.color(QPalette::Active,QColorGroup::Shadow) ); 91 pal.setColor( QColorGroup::Light, pal.color(QPalette::Active,QColorGroup::Shadow) );
92 pal.setColor( QColorGroup::Background, pal.active().background().light(110) ); 92 pal.setColor( QColorGroup::Background, pal.active().background().light(110) );
93 categoryBar->setPalette( pal ); 93 categoryBar->setPalette( pal );
94 stack = new QWidgetStack(this); 94 stack = new QWidgetStack(this);
95 connect( categoryBar, SIGNAL(selected(int)), this, SLOT(raiseTabWidget()) ); 95 connect( categoryBar, SIGNAL(selected(int)), this, SLOT(raiseTabWidget()) );
96 categoryBar->show(); 96 categoryBar->show();
97 stack->show(); 97 stack->show();
98 98
99#if defined(Q_WS_QWS) && !defined(QT_NO_COP) 99#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
100 QCopChannel *channel = new QCopChannel( "QPE/Launcher", this ); 100 QCopChannel *channel = new QCopChannel( "QPE/Launcher", this );
101 connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), 101 connect( channel, SIGNAL(received(const QCString&,const QByteArray&)),
102 this, SLOT(launcherMessage(const QCString&, const QByteArray&)) ); 102 this, SLOT(launcherMessage(const QCString&,const QByteArray&)) );
103 connect( qApp, SIGNAL(appMessage(const QCString&, const QByteArray&)), 103 connect( qApp, SIGNAL(appMessage(const QCString&,const QByteArray&)),
104 this, SLOT(appMessage(const QCString&, const QByteArray&))); 104 this, SLOT(appMessage(const QCString&,const QByteArray&)));
105#endif 105#endif
106 106
107 createDocLoadingWidget(); 107 createDocLoadingWidget();
108} 108}
109 109
110void LauncherTabWidget::createDocLoadingWidget() 110void LauncherTabWidget::createDocLoadingWidget()
111{ 111{
112 // Construct the 'doc loading widget' shown when finding documents 112 // Construct the 'doc loading widget' shown when finding documents
113 113
114 // ### LauncherView class needs changing to be more generic so 114 // ### LauncherView class needs changing to be more generic so
115 // this widget can change its background similar to the iconviews 115 // this widget can change its background similar to the iconviews
116 // so the background for this matches 116 // so the background for this matches
117 docLoadingWidget = new LauncherView( stack ); 117 docLoadingWidget = new LauncherView( stack );
118 docLoadingWidget->hideIcons(); 118 docLoadingWidget->hideIcons();
119 QVBox *docLoadingVBox = new QVBox( docLoadingWidget ); 119 QVBox *docLoadingVBox = new QVBox( docLoadingWidget );
120 120
121 docLoadingVBox->setSpacing( 20 ); 121 docLoadingVBox->setSpacing( 20 );
122 docLoadingVBox->setMargin( 10 ); 122 docLoadingVBox->setMargin( 10 );
123 123
124 QWidget *space1 = new QWidget( docLoadingVBox ); 124 QWidget *space1 = new QWidget( docLoadingVBox );
125 docLoadingVBox->setStretchFactor( space1, 1 ); 125 docLoadingVBox->setStretchFactor( space1, 1 );
126 126
127 QLabel *waitPixmap = new QLabel( docLoadingVBox ); 127 QLabel *waitPixmap = new QLabel( docLoadingVBox );
128 waitPixmap->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, waitPixmap->sizePolicy().hasHeightForWidth() ) ); 128 waitPixmap->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, waitPixmap->sizePolicy().hasHeightForWidth() ) );
@@ -456,50 +456,50 @@ void Launcher::createGUI()
456 tabs = new LauncherTabWidget( this ); 456 tabs = new LauncherTabWidget( this );
457 setCentralWidget( tabs ); 457 setCentralWidget( tabs );
458 458
459 ServerInterface::dockWidget( tb, ServerInterface::Bottom ); 459 ServerInterface::dockWidget( tb, ServerInterface::Bottom );
460 tb->show(); 460 tb->show();
461 461
462 qApp->installEventFilter( this ); 462 qApp->installEventFilter( this );
463 463
464 464
465 connect( qApp, SIGNAL(symbol()), this, SLOT(toggleSymbolInput()) ); 465 connect( qApp, SIGNAL(symbol()), this, SLOT(toggleSymbolInput()) );
466 connect( qApp, SIGNAL(numLockStateToggle()), this, SLOT(toggleNumLockState()) ); 466 connect( qApp, SIGNAL(numLockStateToggle()), this, SLOT(toggleNumLockState()) );
467 connect( qApp, SIGNAL(capsLockStateToggle()), this, SLOT(toggleCapsLockState()) ); 467 connect( qApp, SIGNAL(capsLockStateToggle()), this, SLOT(toggleCapsLockState()) );
468 468
469 connect( tb, SIGNAL(tabSelected(const QString&)), 469 connect( tb, SIGNAL(tabSelected(const QString&)),
470 this, SLOT(showTab(const QString&)) ); 470 this, SLOT(showTab(const QString&)) );
471 connect( tabs, SIGNAL(selected(const QString&)), 471 connect( tabs, SIGNAL(selected(const QString&)),
472 this, SLOT(viewSelected(const QString&)) ); 472 this, SLOT(viewSelected(const QString&)) );
473 connect( tabs, SIGNAL(clicked(const AppLnk*)), 473 connect( tabs, SIGNAL(clicked(const AppLnk*)),
474 this, SLOT(select(const AppLnk*))); 474 this, SLOT(select(const AppLnk*)));
475 connect( tabs, SIGNAL(rightPressed(AppLnk*)), 475 connect( tabs, SIGNAL(rightPressed(AppLnk*)),
476 this, SLOT(properties(AppLnk*))); 476 this, SLOT(properties(AppLnk*)));
477 477
478#if defined(Q_WS_QWS) && !defined(QT_NO_COP) 478#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
479 QCopChannel* sysChannel = new QCopChannel( "QPE/System", this ); 479 QCopChannel* sysChannel = new QCopChannel( "QPE/System", this );
480 connect( sysChannel, SIGNAL(received(const QCString &, const QByteArray &)), 480 connect( sysChannel, SIGNAL(received(const QCString&,const QByteArray&)),
481 this, SLOT(systemMessage( const QCString &, const QByteArray &)) ); 481 this, SLOT(systemMessage(const QCString&,const QByteArray&)) );
482#endif 482#endif
483 483
484 // all documents 484 // all documents
485 QImage img( Resource::loadImage( "DocsIcon" ) ); 485 QImage img( Resource::loadImage( "DocsIcon" ) );
486 QPixmap pm; 486 QPixmap pm;
487 pm = img.smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ); 487 pm = img.smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() );
488 // It could add this itself if it handles docs 488 // It could add this itself if it handles docs
489 489
490 tabs->newView("Documents", pm, tr("Documents") )->setToolsEnabled( TRUE ); 490 tabs->newView("Documents", pm, tr("Documents") )->setToolsEnabled( TRUE );
491 491
492 QTimer::singleShot( 0, tabs, SLOT( initLayout() ) ); 492 QTimer::singleShot( 0, tabs, SLOT( initLayout() ) );
493 qApp->setMainWidget( this ); 493 qApp->setMainWidget( this );
494 QTimer::singleShot( 500, this, SLOT( makeVisible() ) ); 494 QTimer::singleShot( 500, this, SLOT( makeVisible() ) );
495} 495}
496 496
497Launcher::~Launcher() 497Launcher::~Launcher()
498{ 498{
499 if ( tb ) 499 if ( tb )
500 destroyGUI(); 500 destroyGUI();
501} 501}
502 502
503 bool Launcher::requiresDocuments() const 503 bool Launcher::requiresDocuments() const
504 { 504 {
505 Config cfg( "Launcher" ); 505 Config cfg( "Launcher" );