From fd5d099065a748cac49e20a13481f85666c53c71 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Fri, 1 Feb 2013 15:14:12 -0600 Subject: Rename a number of classes to enhance compatibility with KDE4 --- kmobile/kmobile.cpp | 12 ++++++------ kmobile/kmobile.h | 8 ++++---- kmobile/systemtray.cpp | 8 ++++---- kmobile/systemtray.h | 10 +++++----- 4 files changed, 19 insertions(+), 19 deletions(-) (limited to 'kmobile') diff --git a/kmobile/kmobile.cpp b/kmobile/kmobile.cpp index 48d8d298..3d867b3d 100644 --- a/kmobile/kmobile.cpp +++ b/kmobile/kmobile.cpp @@ -53,13 +53,13 @@ #include "kmobile_selectiondialog.h" KMobile::KMobile() - : KMainWindow( 0, "kmobile" ) + : TDEMainWindow( 0, "kmobile" ) { m_config = new TDEConfig("kmobilerc"); m_view = new KMobileView(this, m_config); - // tell the KMainWindow that this is indeed the main widget + // tell the TDEMainWindow that this is indeed the main widget setCentralWidget(m_view); // then, setup our actions @@ -104,13 +104,13 @@ void KMobile::setupActions() KStdAction::configureToolbars(TQT_TQOBJECT(this), TQT_SLOT(optionsConfigureToolbars()), actionCollection()); KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(optionsPreferences()), actionCollection()); - new KAction(i18n("&Add Device..."), "folder_new", 0, + new TDEAction(i18n("&Add Device..."), "folder_new", 0, TQT_TQOBJECT(this), TQT_SLOT(addDevice()), actionCollection(), "device_add"); - new KAction( KGuiItem( i18n("&Remove Device"), "edittrash", i18n("Remove this device") ), + new TDEAction( KGuiItem( i18n("&Remove Device"), "edittrash", i18n("Remove this device") ), "Delete", TQT_TQOBJECT(this), TQT_SLOT(removeDevice()), actionCollection(), "device_remove"); - new KAction(i18n("Re&name Device..."), 0, Key_F2, + new TDEAction(i18n("Re&name Device..."), 0, Key_F2, TQT_TQOBJECT(this), TQT_SLOT(renameDevice()), actionCollection(), "device_rename"); - new KAction(i18n("&Configure Device..."), "configure", 0, + new TDEAction(i18n("&Configure Device..."), "configure", 0, TQT_TQOBJECT(this), TQT_SLOT(configDevice()), actionCollection(), "device_configure"); createGUI(); diff --git a/kmobile/kmobile.h b/kmobile/kmobile.h index 58d3f4c2..a91c4cce 100644 --- a/kmobile/kmobile.h +++ b/kmobile/kmobile.h @@ -11,7 +11,7 @@ #include "kmobileview.h" -class KToggleAction; +class TDEToggleAction; class SystemTray; /** @@ -20,7 +20,7 @@ class SystemTray; * * @short Main window class */ -class KMobile : public KMainWindow +class KMobile : public TDEMainWindow { Q_OBJECT @@ -92,8 +92,8 @@ private: KMobileView *m_view; SystemTray *m_systemTray; - KToggleAction *m_toolbarAction; - KToggleAction *m_statusbarAction; + TDEToggleAction *m_toolbarAction; + TDEToggleAction *m_statusbarAction; }; #endif // _KMOBILE_H_ diff --git a/kmobile/systemtray.cpp b/kmobile/systemtray.cpp index 9f15f055..b18faa97 100644 --- a/kmobile/systemtray.cpp +++ b/kmobile/systemtray.cpp @@ -35,7 +35,7 @@ #include "kmobileview.h" -SystemTray::SystemTray(KMainWindow *parent, const char *name) : KSystemTray(parent, name) +SystemTray::SystemTray(TDEMainWindow *parent, const char *name) : KSystemTray(parent, name) { m_appPix = TDEGlobal::instance()->iconLoader()->loadIcon("kmobile", KIcon::Small); @@ -44,9 +44,9 @@ SystemTray::SystemTray(KMainWindow *parent, const char *name) : KSystemTray(pare setToolTip(); m_actionCollection = parent->actionCollection(); - KAction *addAction = m_actionCollection->action("device_add"); + TDEAction *addAction = m_actionCollection->action("device_add"); - KPopupMenu* menu = contextMenu(); + TDEPopupMenu* menu = contextMenu(); addAction->plug(menu); menu->insertSeparator(); } @@ -58,7 +58,7 @@ SystemTray::~SystemTray() #define SYSTEMTRAY_STARTID 1000 -void SystemTray::contextMenuAboutToShow(KPopupMenu *menu) +void SystemTray::contextMenuAboutToShow(TDEPopupMenu *menu) { KMobile *main = static_cast(TQT_TQWIDGET(parent())); diff --git a/kmobile/systemtray.h b/kmobile/systemtray.h index 29e723c1..a64cabad 100644 --- a/kmobile/systemtray.h +++ b/kmobile/systemtray.h @@ -22,8 +22,8 @@ #include -class KMainWindow; -class KAction; +class TDEMainWindow; +class TDEAction; class SystemTray : public KSystemTray { @@ -31,7 +31,7 @@ class SystemTray : public KSystemTray public: - SystemTray(KMainWindow *parent = 0, const char *name = 0); + SystemTray(TDEMainWindow *parent = 0, const char *name = 0); virtual ~SystemTray(); protected slots: @@ -39,7 +39,7 @@ protected slots: void menuItemSelected(); protected: - void contextMenuAboutToShow( KPopupMenu* menu ); + void contextMenuAboutToShow( TDEPopupMenu* menu ); private: void setToolTip(const TQString &tip = TQString()); @@ -47,7 +47,7 @@ private: TQPixmap m_appPix; TQLabel *m_currentLabel; - KActionCollection *m_actionCollection; + TDEActionCollection *m_actionCollection; int m_menuID; }; -- cgit v1.2.3