|
|
@ -89,7 +89,7 @@ void MainWindow::buildMainWidget()
|
|
|
|
modulesScroller = new KCScrollView(moduleTabs);
|
|
|
|
modulesScroller = new KCScrollView(moduleTabs);
|
|
|
|
ModulesView *modulesView = new ModulesView( menu, (*it).subMenu, modulesScroller->viewport(), "modulesView" );
|
|
|
|
ModulesView *modulesView = new ModulesView( menu, (*it).subMenu, modulesScroller->viewport(), "modulesView" );
|
|
|
|
modulesViewList.append(modulesView);
|
|
|
|
modulesViewList.append(modulesView);
|
|
|
|
connect(modulesView, TQT_SIGNAL(itemSelected(TQIconViewItem* )), this, TQT_SLOT(slotItemSelected(TQIconViewItem*)));
|
|
|
|
connect(modulesView, TQ_SIGNAL(itemSelected(TQIconViewItem* )), this, TQ_SLOT(slotItemSelected(TQIconViewItem*)));
|
|
|
|
modulesScroller->addChild(modulesView);
|
|
|
|
modulesScroller->addChild(modulesView);
|
|
|
|
moduleTabs->addTab(modulesScroller, (*it).caption);
|
|
|
|
moduleTabs->addTab(modulesScroller, (*it).caption);
|
|
|
|
overviewPages.append(modulesScroller);
|
|
|
|
overviewPages.append(modulesScroller);
|
|
|
@ -103,23 +103,23 @@ void MainWindow::buildMainWidget()
|
|
|
|
|
|
|
|
|
|
|
|
void MainWindow::buildActions()
|
|
|
|
void MainWindow::buildActions()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
KStdAction::quit(this, TQT_SLOT( close() ), actionCollection());
|
|
|
|
KStdAction::quit(this, TQ_SLOT( close() ), actionCollection());
|
|
|
|
|
|
|
|
|
|
|
|
resetModule = new TDEAction(i18n("Undo Changes"), 0, this,
|
|
|
|
resetModule = new TDEAction(i18n("Undo Changes"), 0, this,
|
|
|
|
TQT_SLOT(showAllModules()), actionCollection(), "resetModule" );
|
|
|
|
TQ_SLOT(showAllModules()), actionCollection(), "resetModule" );
|
|
|
|
resetModule->setEnabled(false);
|
|
|
|
resetModule->setEnabled(false);
|
|
|
|
|
|
|
|
|
|
|
|
defaultModule = new TDEAction(i18n("Reset to Defaults"), 0, this,
|
|
|
|
defaultModule = new TDEAction(i18n("Reset to Defaults"), 0, this,
|
|
|
|
TQT_SLOT(showAllModules()), actionCollection(), "defaultModule" );
|
|
|
|
TQ_SLOT(showAllModules()), actionCollection(), "defaultModule" );
|
|
|
|
defaultModule->setEnabled(false);
|
|
|
|
defaultModule->setEnabled(false);
|
|
|
|
|
|
|
|
|
|
|
|
if( embeddedWindows ) {
|
|
|
|
if( embeddedWindows ) {
|
|
|
|
showAllAction = new TDEAction(i18n("Overview"), TQApplication::reverseLayout() ? "forward" : "back", 0, this,
|
|
|
|
showAllAction = new TDEAction(i18n("Overview"), TQApplication::reverseLayout() ? "forward" : "back", 0, this,
|
|
|
|
TQT_SLOT(showAllModules()), actionCollection(), "showAll" );
|
|
|
|
TQ_SLOT(showAllModules()), actionCollection(), "showAll" );
|
|
|
|
showAllAction->setEnabled(false);
|
|
|
|
showAllAction->setEnabled(false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
aboutModuleAction = new TDEAction(i18n("About Current Module"), 0, this, TQT_SLOT(aboutCurrentModule()), actionCollection(), "help_about_module");
|
|
|
|
aboutModuleAction = new TDEAction(i18n("About Current Module"), 0, this, TQ_SLOT(aboutCurrentModule()), actionCollection(), "help_about_module");
|
|
|
|
resetModuleHelp();
|
|
|
|
resetModuleHelp();
|
|
|
|
|
|
|
|
|
|
|
|
// Search
|
|
|
|
// Search
|
|
|
@ -128,7 +128,7 @@ void MainWindow::buildActions()
|
|
|
|
|
|
|
|
|
|
|
|
KcmSearch* search = new KcmSearch(&modulesViewList, hbox, "search");
|
|
|
|
KcmSearch* search = new KcmSearch(&modulesViewList, hbox, "search");
|
|
|
|
hbox->setStretchFactor(search,1);
|
|
|
|
hbox->setStretchFactor(search,1);
|
|
|
|
connect(search, TQT_SIGNAL(searchHits(const TQString &, int *, int)), this, TQT_SLOT(slotSearchHits(const TQString &, int *, int)));
|
|
|
|
connect(search, TQ_SIGNAL(searchHits(const TQString &, int *, int)), this, TQ_SLOT(slotSearchHits(const TQString &, int *, int)));
|
|
|
|
|
|
|
|
|
|
|
|
TQVBox *vbox = new TQVBox(hbox);
|
|
|
|
TQVBox *vbox = new TQVBox(hbox);
|
|
|
|
generalHitLabel = new TQLabel(vbox);
|
|
|
|
generalHitLabel = new TQLabel(vbox);
|
|
|
@ -156,9 +156,9 @@ void MainWindow::buildActions()
|
|
|
|
// The Clear search box button.
|
|
|
|
// The Clear search box button.
|
|
|
|
TDEToolBarButton *clearWidget = new TDEToolBarButton(TQApplication::reverseLayout() ? "clear_left" : "locationbar_erase",
|
|
|
|
TDEToolBarButton *clearWidget = new TDEToolBarButton(TQApplication::reverseLayout() ? "clear_left" : "locationbar_erase",
|
|
|
|
0, this);
|
|
|
|
0, this);
|
|
|
|
searchClear = new KWidgetAction( clearWidget, TQString(""), CTRL+Key_L, search, TQT_SLOT(clear()),
|
|
|
|
searchClear = new KWidgetAction( clearWidget, TQString(""), CTRL+Key_L, search, TQ_SLOT(clear()),
|
|
|
|
actionCollection(), "searchReset");
|
|
|
|
actionCollection(), "searchReset");
|
|
|
|
connect(clearWidget, TQT_SIGNAL(clicked()), searchClear, TQT_SLOT(activate()));
|
|
|
|
connect(clearWidget, TQ_SIGNAL(clicked()), searchClear, TQ_SLOT(activate()));
|
|
|
|
searchClear->setWhatsThis( i18n( "Reset Search\n"
|
|
|
|
searchClear->setWhatsThis( i18n( "Reset Search\n"
|
|
|
|
"Resets the search so that "
|
|
|
|
"Resets the search so that "
|
|
|
|
"all items are shown again." ) );
|
|
|
|
"all items are shown again." ) );
|
|
|
@ -175,7 +175,7 @@ void MainWindow::buildActions()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
TDERadioAction *newAction = new TDERadioAction( group->caption(), group->icon(), TDEShortcut(), this,
|
|
|
|
TDERadioAction *newAction = new TDERadioAction( group->caption(), group->icon(), TDEShortcut(), this,
|
|
|
|
TQT_SLOT(slotTopPage()), actionCollection(), group->relPath().utf8() );
|
|
|
|
TQ_SLOT(slotTopPage()), actionCollection(), group->relPath().utf8() );
|
|
|
|
pageActions.append(newAction);
|
|
|
|
pageActions.append(newAction);
|
|
|
|
kdDebug() << "relpath is :" << group->relPath() << endl;
|
|
|
|
kdDebug() << "relpath is :" << group->relPath() << endl;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -250,10 +250,10 @@ void MainWindow::slotItemSelected( TQIconViewItem *item ){
|
|
|
|
moduleItemToScrollerDict.insert(mItem,scrollView);
|
|
|
|
moduleItemToScrollerDict.insert(mItem,scrollView);
|
|
|
|
moduleItemToWidgetDict.insert(mItem,groupWidget);
|
|
|
|
moduleItemToWidgetDict.insert(mItem,groupWidget);
|
|
|
|
|
|
|
|
|
|
|
|
connect(groupWidget, TQT_SIGNAL(aboutToShow( TDECModuleProxy * )), this, TQT_SLOT(updateModuleHelp( TDECModuleProxy * )));
|
|
|
|
connect(groupWidget, TQ_SIGNAL(aboutToShow( TDECModuleProxy * )), this, TQ_SLOT(updateModuleHelp( TDECModuleProxy * )));
|
|
|
|
connect(groupWidget, TQT_SIGNAL(aboutToShowPage( TQWidget* )), this, TQT_SLOT(widgetChange()));
|
|
|
|
connect(groupWidget, TQ_SIGNAL(aboutToShowPage( TQWidget* )), this, TQ_SLOT(widgetChange()));
|
|
|
|
connect(groupWidget, TQT_SIGNAL(finished()), this, TQT_SLOT(groupModulesFinished()));
|
|
|
|
connect(groupWidget, TQ_SIGNAL(finished()), this, TQ_SLOT(groupModulesFinished()));
|
|
|
|
connect(groupWidget, TQT_SIGNAL(close()), this, TQT_SLOT(showAllModules()));
|
|
|
|
connect(groupWidget, TQ_SIGNAL(close()), this, TQ_SLOT(showAllModules()));
|
|
|
|
|
|
|
|
|
|
|
|
TQValueList<TDECModuleInfo>::iterator it;
|
|
|
|
TQValueList<TDECModuleInfo>::iterator it;
|
|
|
|
for ( it = list.begin(); it != list.end(); ++it ){
|
|
|
|
for ( it = list.begin(); it != list.end(); ++it ){
|
|
|
@ -286,7 +286,7 @@ void MainWindow::slotItemSelected( TQIconViewItem *item ){
|
|
|
|
// We resize and expand the window if neccessary, but only once the window has been updated.
|
|
|
|
// We resize and expand the window if neccessary, but only once the window has been updated.
|
|
|
|
// Some modules seem to dynamically change thier size. The new size is only available
|
|
|
|
// Some modules seem to dynamically change thier size. The new size is only available
|
|
|
|
// once the dialog is updated. :-/ -SBE
|
|
|
|
// once the dialog is updated. :-/ -SBE
|
|
|
|
TQTimer::singleShot(0,this,TQT_SLOT(timerResize()));
|
|
|
|
TQTimer::singleShot(0,this,TQ_SLOT(timerResize()));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void MainWindow::timerResize() {
|
|
|
|
void MainWindow::timerResize() {
|
|
|
|