From 88b7febc2393324ee14940c1c41a8ddc342c35f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Fri, 25 Mar 2016 20:06:45 +0100 Subject: Initial TDE conversion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- starter/starter.cpp | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'starter/starter.cpp') 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 #include #include -#include -#include -#include -#include -#include -# include +#include +#include +#include +#include +#include +# include #include #include #include @@ -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"); -- cgit v1.2.1