diff options
Diffstat (limited to 'starter/starter.cpp')
-rw-r--r-- | starter/starter.cpp | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/starter/starter.cpp b/starter/starter.cpp index d7e8d83..e411b77 100644 --- a/starter/starter.cpp +++ b/starter/starter.cpp @@ -2,12 +2,12 @@ #include <tqcombobox.h> #include <tqcursor.h> #include <tqdesktopwidget.h> -#include <kglobal.h> -#include <klocale.h> -#include <kconfig.h> -#include <kmessagebox.h> -#include <kapplication.h> -# include <kpopupmenu.h> +#include <tdeglobal.h> +#include <tdelocale.h> +#include <tdeconfig.h> +#include <tdemessagebox.h> +#include <tdeapplication.h> +# include <tdepopupmenu.h> #include <tqimage.h> #include <tqfile.h> #include <tqlabel.h> @@ -38,14 +38,14 @@ starter::starter(const TQString& configFile, Type type, int actions, TQWidget *parent, const char *name) : DCOPObject("StarterIface"), KPanelApplet(configFile, type, actions, parent, name) { - configPopup = new KPopupMenu(this); + configPopup = new TDEPopupMenu(this); popupBlocked = false; mainView = new TQLabel(this); configDialog = new StarterConfig(this); TQRect desktop = TQDesktopWidget().availableGeometry( configDialog ); configDialog->move((desktop.width() - configDialog->width())/2, (desktop.height() - configDialog->height())/2); - KConfig config("bStarter", false, false); + TDEConfig config("bStarter", false, false); config.setGroup("Settings"); configDialog->buttonShortcut->setEnabled(false); configDialog->BaseURL->setURL(config.readEntry("BaseImage", "" )); @@ -79,7 +79,7 @@ starter::starter(const TQString& configFile, Type type, int actions, TQWidget *p //--- connect(configDialog->categoryList, SIGNAL(highlighted(int)), this, SLOT(activateShortcutButton(int))); - connect(configDialog->buttonShortcut, SIGNAL(capturedShortcut (const KShortcut &)), this, SLOT(addShortcut(const KShortcut &))); + connect(configDialog->buttonShortcut, SIGNAL(capturedShortcut (const TDEShortcut &)), this, SLOT(addShortcut(const TDEShortcut &))); connect(configDialog->categoryList, SIGNAL(highlighted ( const TQString & )), this, SLOT(updateShortcutButton(const TQString &))); connect(configDialog->buttonOk, SIGNAL(clicked()), this, SLOT(updateSettings())); StarterHelp *helpDialog = new StarterHelp(configDialog); @@ -102,7 +102,7 @@ void starter::activateShortcutButton(int i) configDialog->buttonShortcut->setEnabled(bool(i)); } -void starter::addShortcut(const KShortcut &cut) +void starter::addShortcut(const TDEShortcut &cut) { // in case of empty shortcut, remove the entry from the list and return if (!short(cut.keyCodeQt())) @@ -114,7 +114,7 @@ void starter::addShortcut(const KShortcut &cut) shortcutList.remove(it); break; } - configDialog->buttonShortcut->setShortcut(KShortcut::null(), false); + configDialog->buttonShortcut->setShortcut(TDEShortcut::null(), false); return; } // generate MyKey @@ -162,11 +162,11 @@ void starter::updateShortcutButton(const TQString & category) { TQKeyEvent qke( TQEvent::KeyPress, it.key().key(), 0, it.key().modFlags()); KKey kkey(&qke); - KShortcut ksc(kkey); + TDEShortcut ksc(kkey); configDialog->buttonShortcut->setShortcut(ksc, false); return; } - configDialog->buttonShortcut->setShortcut(KShortcut::null(), false); + configDialog->buttonShortcut->setShortcut(TDEShortcut::null(), false); } starter::~starter() @@ -176,7 +176,7 @@ starter::~starter() void starter::updateSettings() { startMenu->updateShortcuts(shortcutList); - KConfig *config = new KConfig("bStarter", false, false); + TDEConfig *config = new TDEConfig("bStarter", false, false); config->setGroup("Settings"); config->writeEntry("BaseImage", configDialog->BaseURL->url()); config->writeEntry("HoverImage", configDialog->HoverURL->url()); @@ -222,12 +222,12 @@ void starter::updateSettings() void starter::reloadImages() { - KIconLoader* iLoader = KGlobal::iconLoader(); + TDEIconLoader* iLoader = TDEGlobal::iconLoader(); TQString pth; if (_VALID_(BaseURL)) pth = configDialog->BaseURL->url(); else - pth = iLoader->iconPath("bStarter", KIcon::Small, true); + pth = iLoader->iconPath("bStarter", TDEIcon::Small, true); if (pth) pixmap = TQImage(pth); if (!pth || pixmap.isNull()) @@ -239,7 +239,7 @@ void starter::reloadImages() if (_VALID_(HoverURL)) pth = configDialog->HoverURL->url(); else - pth = iLoader->iconPath("bStarter_hover", KIcon::Small, true); + pth = iLoader->iconPath("bStarter_hover", TDEIcon::Small, true); if (pth) hoverPixmap = TQImage(pth); if (!pth || hoverPixmap.isNull()) @@ -251,7 +251,7 @@ void starter::reloadImages() if (_VALID_(DownURL)) pth = configDialog->DownURL->url(); else - pth = iLoader->iconPath("bStarter_down", KIcon::Small, true); + pth = iLoader->iconPath("bStarter_down", TDEIcon::Small, true); if (pth) downPixmap = TQImage(pth); if (!pth || downPixmap.isNull()) @@ -281,12 +281,12 @@ void starter::resizeEvent ( TQResizeEvent *rev ) void starter::configureMenu() { - KApplication::startServiceByDesktopName("kmenuedit", TQStringList(), 0, 0, 0, "", true); + TDEApplication::startServiceByDesktopName("kmenuedit", TQStringList(), 0, 0, 0, "", true); } void starter::preferences() { - KApplication::startServiceByDesktopName("kmenuedit", TQStringList(), 0, 0, 0, "", true); + TDEApplication::startServiceByDesktopName("kmenuedit", TQStringList(), 0, 0, 0, "", true); } int starter::widthForHeight(int height) const @@ -475,7 +475,7 @@ extern "C" { KPanelApplet* init( TQWidget *parent, const TQString& configFile) { - KGlobal::locale()->insertCatalogue("starter"); + TDEGlobal::locale()->insertCatalogue("starter"); return new starter(configFile, KPanelApplet::Normal, KPanelApplet::Preferences, parent, "baghirastarter"); |