Rename a number of classes to enhance compatibility with KDE4

pull/1/head
Timothy Pearson 12 years ago
parent db3cbd38c6
commit 7f0e392c11

@ -2,7 +2,7 @@ This is an overview of how the code is situated and a very brief overview of wha
-- System Settings classes --
mainwindow - The KMainWindow contains KActions, the stack of the iconlist and the current module(s) view.
mainwindow - The TDEMainWindow contains TDEActions, the stack of the iconlist and the current module(s) view.
modulesview - The widget that is the icon view that users see when the first enter the app.
kcmsearch - Search widget that can search ModulesView and enable/disable items.

@ -53,7 +53,7 @@
MainWindow::MainWindow(bool embed, const TQString & menuFile,
TQWidget *parent, const char *name) :
KMainWindow(parent,name), menu(NULL), embeddedWindows(embed),
TDEMainWindow(parent,name), menu(NULL), embeddedWindows(embed),
groupWidget(NULL), selectedPage(0), dummyAbout(NULL) {
// Load the menu structure in from disk.
@ -105,21 +105,21 @@ void MainWindow::buildActions()
{
KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT( close() ), actionCollection());
resetModule = new KAction(i18n("Undo Changes"), 0, TQT_TQOBJECT(this),
resetModule = new TDEAction(i18n("Undo Changes"), 0, TQT_TQOBJECT(this),
TQT_SLOT(showAllModules()), actionCollection(), "resetModule" );
resetModule->setEnabled(false);
defaultModule = new KAction(i18n("Reset to Defaults"), 0, TQT_TQOBJECT(this),
defaultModule = new TDEAction(i18n("Reset to Defaults"), 0, TQT_TQOBJECT(this),
TQT_SLOT(showAllModules()), actionCollection(), "defaultModule" );
defaultModule->setEnabled(false);
if( embeddedWindows ) {
showAllAction = new KAction(i18n("Overview"), TQApplication::reverseLayout() ? "forward" : "back", 0, TQT_TQOBJECT(this),
showAllAction = new TDEAction(i18n("Overview"), TQApplication::reverseLayout() ? "forward" : "back", 0, TQT_TQOBJECT(this),
TQT_SLOT(showAllModules()), actionCollection(), "showAll" );
showAllAction->setEnabled(false);
}
aboutModuleAction = new KAction(i18n("About Current Module"), 0, TQT_TQOBJECT(this), TQT_SLOT(aboutCurrentModule()), actionCollection(), "help_about_module");
aboutModuleAction = new TDEAction(i18n("About Current Module"), 0, TQT_TQOBJECT(this), TQT_SLOT(aboutCurrentModule()), actionCollection(), "help_about_module");
resetModuleHelp();
// Search
@ -154,7 +154,7 @@ void MainWindow::buildActions()
TQWhatsThis::add( search, i18n( "Search Bar<p>Enter a search term." ) );
// The Clear search box button.
KToolBarButton *clearWidget = new KToolBarButton(TQApplication::reverseLayout() ? "clear_left" : "locationbar_erase",
TDEToolBarButton *clearWidget = new TDEToolBarButton(TQApplication::reverseLayout() ? "clear_left" : "locationbar_erase",
0, this);
searchClear = new KWidgetAction( clearWidget, TQString(""), CTRL+Key_L, TQT_TQOBJECT(search), TQT_SLOT(clear()),
actionCollection(), "searchReset");
@ -174,7 +174,7 @@ void MainWindow::buildActions()
continue;
}
KRadioAction *newAction = new KRadioAction( group->caption(), group->icon(), KShortcut(), TQT_TQOBJECT(this),
TDERadioAction *newAction = new TDERadioAction( group->caption(), group->icon(), TDEShortcut(), TQT_TQOBJECT(this),
TQT_SLOT(slotTopPage()), actionCollection(), group->relPath() );
pageActions.append(newAction);
kdDebug() << "relpath is :" << group->relPath() << endl;
@ -219,7 +219,7 @@ void MainWindow::showAllModules()
searchClear->setEnabled(true);
searchAction->setEnabled(true);
KRadioAction *currentRadioAction;
TDERadioAction *currentRadioAction;
for ( currentRadioAction = pageActions.first(); currentRadioAction; currentRadioAction = pageActions.next()) {
currentRadioAction->setEnabled(true);
}
@ -273,7 +273,7 @@ void MainWindow::slotItemSelected( TQIconViewItem *item ){
searchClear->setEnabled(false);
searchAction->setEnabled(false);
KRadioAction *currentRadioAction;
TDERadioAction *currentRadioAction;
for ( currentRadioAction = pageActions.first(); currentRadioAction; currentRadioAction = pageActions.next()) {
currentRadioAction->setEnabled(false);
}
@ -333,10 +333,10 @@ void MainWindow::widgetChange() {
}
void MainWindow::slotTopPage() {
KRadioAction *clickedRadioAction = (KRadioAction *)sender();
TDERadioAction *clickedRadioAction = (TDERadioAction *)sender();
selectedPage = pageActions.find(clickedRadioAction);
KRadioAction *currentRadioAction;
TDERadioAction *currentRadioAction;
for ( currentRadioAction = pageActions.first(); currentRadioAction; currentRadioAction = pageActions.next()) {
currentRadioAction->setChecked(currentRadioAction==clickedRadioAction);
}

@ -36,12 +36,12 @@ class TQWidgetStack;
class TQIconViewItem;
class KCMultiWidget;
class ModulesView;
class KAction;
class TDEAction;
class KWidgetAction;
class TDECModule;
class TDECModuleProxy;
class MainWindow : public KMainWindow
class MainWindow : public TDEMainWindow
{
Q_OBJECT
@ -80,19 +80,19 @@ private:
TQPtrDict<KCMultiWidget> moduleItemToWidgetDict;
TQPtrDict<KCScrollView> moduleItemToScrollerDict;
TQPtrList<KRadioAction> pageActions;
TQPtrList<TDERadioAction> pageActions;
TQPtrList<KCScrollView> overviewPages;
int selectedPage;
KAction *resetModule;
KAction *defaultModule;
TDEAction *resetModule;
TDEAction *defaultModule;
KAction *showAllAction;
TDEAction *showAllAction;
KWidgetAction *searchText;
KAction *searchClear;
TDEAction *searchClear;
KWidgetAction *searchAction;
KAction *aboutModuleAction;
TDEAction *aboutModuleAction;
void buildMainWidget();
void buildActions();

Loading…
Cancel
Save