summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2013-02-01 15:01:16 -0600
committerTimothy Pearson <[email protected]>2013-02-01 15:01:16 -0600
commitab695c12f91b2058b3fc088be4688a968a7bebda (patch)
tree1e2821074a53777207eade970145f150afdf0f97
parent71f85d8dc5079ce5dffa0457ec258d1de4f4753e (diff)
downloadknetload-ab695c12f91b2058b3fc088be4688a968a7bebda.tar.gz
knetload-ab695c12f91b2058b3fc088be4688a968a7bebda.zip
Rename a number of classes to enhance compatibility with KDE4
-rw-r--r--knetload/icontoggleaction.cpp18
-rw-r--r--knetload/icontoggleaction.h10
-rw-r--r--knetload/knetload.cpp20
-rw-r--r--knetload/knetload.h18
-rw-r--r--knetload/statpopup.cpp16
-rw-r--r--knetload/statpopup.h42
6 files changed, 62 insertions, 62 deletions
diff --git a/knetload/icontoggleaction.cpp b/knetload/icontoggleaction.cpp
index a7d7625..3e73d98 100644
--- a/knetload/icontoggleaction.cpp
+++ b/knetload/icontoggleaction.cpp
@@ -16,9 +16,9 @@
IconToggleAction::IconToggleAction(
const TQString& useTextUnchecked, const TQString& useIconUnchecked,
const TQString& useTextChecked, const TQString& useIconChecked,
- const KShortcut& cut, const TQObject* receiver, const char* slot,
+ const TDEShortcut& cut, const TQObject* receiver, const char* slot,
TQObject* parent, const char* name) :
- KToggleAction(useTextUnchecked, useIconUnchecked, cut, receiver,
+ TDEToggleAction(useTextUnchecked, useIconUnchecked, cut, receiver,
slot, parent, name),
textChecked(useTextChecked), textUnchecked(useTextUnchecked),
iconChecked(useIconChecked), iconUnchecked(useIconUnchecked) {
@@ -26,9 +26,9 @@ IconToggleAction::IconToggleAction(
IconToggleAction::IconToggleAction(const TQString& useText,
const TQString& useIconUnchecked, const TQString& useIconChecked,
- const KShortcut& cut, const TQObject* receiver, const char* slot,
+ const TDEShortcut& cut, const TQObject* receiver, const char* slot,
TQObject* parent, const char* name) :
- KToggleAction(useText, useIconUnchecked, cut, receiver,
+ TDEToggleAction(useText, useIconUnchecked, cut, receiver,
slot, parent, name),
textChecked(useText), textUnchecked(useText),
iconChecked(useIconChecked), iconUnchecked(useIconUnchecked) {
@@ -37,16 +37,16 @@ IconToggleAction::IconToggleAction(const TQString& useText,
IconToggleAction::IconToggleAction(
const TQString& useTextUnchecked, const TQString& useIconUnchecked,
const TQString& useTextChecked, const TQString& useIconChecked,
- const KShortcut& cut, TQObject* parent, const char* name) :
- KToggleAction(useTextUnchecked, useIconUnchecked, cut, parent, name),
+ const TDEShortcut& cut, TQObject* parent, const char* name) :
+ TDEToggleAction(useTextUnchecked, useIconUnchecked, cut, parent, name),
textChecked(useTextChecked), textUnchecked(useTextUnchecked),
iconChecked(useIconChecked), iconUnchecked(useIconUnchecked) {
}
IconToggleAction::IconToggleAction(const TQString& useText,
const TQString& useIconUnchecked, const TQString& useIconChecked,
- const KShortcut& cut, TQObject* parent, const char* name) :
- KToggleAction(useText, useIconUnchecked, cut, parent, name),
+ const TDEShortcut& cut, TQObject* parent, const char* name) :
+ TDEToggleAction(useText, useIconUnchecked, cut, parent, name),
textChecked(useText), textUnchecked(useText),
iconChecked(useIconChecked), iconUnchecked(useIconUnchecked) {
}
@@ -57,7 +57,7 @@ void IconToggleAction::setChecked(bool value) {
setIcon(value ? iconChecked : iconUnchecked);
}
- KToggleAction::setChecked(value);
+ TDEToggleAction::setChecked(value);
}
#include "icontoggleaction.moc"
diff --git a/knetload/icontoggleaction.h b/knetload/icontoggleaction.h
index 0b98e3d..7240af4 100644
--- a/knetload/icontoggleaction.h
+++ b/knetload/icontoggleaction.h
@@ -20,7 +20,7 @@
* A toggle action that uses different labels and pixmaps in its
* different states.
*/
-class IconToggleAction : public KToggleAction {
+class IconToggleAction : public TDEToggleAction {
Q_OBJECT
@@ -31,20 +31,20 @@ class IconToggleAction : public KToggleAction {
IconToggleAction(
const TQString& useTextUnchecked, const TQString& useIconUnchecked,
const TQString& useTextChecked, const TQString& useIconChecked,
- const KShortcut& cut, const TQObject* receiver, const char* slot,
+ const TDEShortcut& cut, const TQObject* receiver, const char* slot,
TQObject* parent, const char* name = 0);
IconToggleAction(const TQString& useText,
const TQString& useIconUnchecked, const TQString& useIconChecked,
- const KShortcut& cut, const TQObject* receiver, const char* slot,
+ const TDEShortcut& cut, const TQObject* receiver, const char* slot,
TQObject* parent, const char* name = 0);
IconToggleAction(
const TQString& useTextUnchecked, const TQString& useIconUnchecked,
const TQString& useTextChecked, const TQString& useIconChecked,
- const KShortcut& cut = KShortcut(), TQObject* parent = 0,
+ const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0,
const char* name = 0);
IconToggleAction(const TQString& useText,
const TQString& useIconUnchecked, const TQString& useIconChecked,
- const KShortcut& cut = KShortcut(), TQObject* parent = 0,
+ const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0,
const char* name = 0);
/**
diff --git a/knetload/knetload.cpp b/knetload/knetload.cpp
index df9a441..fd05f1d 100644
--- a/knetload/knetload.cpp
+++ b/knetload/knetload.cpp
@@ -243,10 +243,10 @@ void KNetLoad::setupCustomActions() {
scaleOut = config->readNumEntry("ScaleOut", 0 /* same as in */);
}
-void KNetLoad::insertCustomItems(KPopupMenu* menu) {
+void KNetLoad::insertCustomItems(TDEPopupMenu* menu) {
// Device menu. The menu item IDs are indices into the
// stockDevice[] array.
- KPopupMenu* deviceMenu = new KPopupMenu(menu);
+ TDEPopupMenu* deviceMenu = new TDEPopupMenu(menu);
deviceMenus.append(deviceMenu);
deviceMenu->setCheckable(true);
for (int i = 0; i < stockDevice.count(); i++)
@@ -259,7 +259,7 @@ void KNetLoad::insertCustomItems(KPopupMenu* menu) {
// Scale menus. The menu item IDs are the scales themselves (in bits
// per second), to make event handling sane.
- KPopupMenu* scaleInMenu = new KPopupMenu(menu);
+ TDEPopupMenu* scaleInMenu = new TDEPopupMenu(menu);
scaleInMenus.append(scaleInMenu);
scaleInMenu->setCheckable(true);
scaleInMenu->insertItem(i18n("28.8KBit/s"), 28800);
@@ -277,7 +277,7 @@ void KNetLoad::insertCustomItems(KPopupMenu* menu) {
connect(scaleInMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(setScaleIn(int)));
menu->insertItem(SmallIcon("scalein"), i18n("&Scale (In)"), scaleInMenu);
- KPopupMenu* scaleOutMenu = new KPopupMenu(menu);
+ TDEPopupMenu* scaleOutMenu = new TDEPopupMenu(menu);
scaleOutMenus.append(scaleOutMenu);
scaleOutMenu->setCheckable(true);
scaleOutMenu->insertItem(i18n("28.8KBit/s"), 28800);
@@ -332,7 +332,7 @@ void KNetLoad::takeReadingInternal() {
.arg(TDEGlobal::locale()->formatNumber((int)((bitRateOut + 50) / 100) / 10.0)).arg(TDEGlobal::locale()->formatNumber(proc->totalMbOut()));
}
-void KNetLoad::updateDeviceMenu(KPopupMenu* menu) {
+void KNetLoad::updateDeviceMenu(TDEPopupMenu* menu) {
const TQString& dev = proc->getDevice();
// Update the checked/unchecked states of menu items.
@@ -375,12 +375,12 @@ void KNetLoad::updateDeviceMenu(KPopupMenu* menu) {
}
void KNetLoad::updateDeviceMenus() {
- for (KPopupMenu* menu = deviceMenus.first(); menu;
+ for (TDEPopupMenu* menu = deviceMenus.first(); menu;
menu = deviceMenus.next())
updateDeviceMenu(menu);
}
-void KNetLoad::updateScaleInMenu(KPopupMenu* menu) {
+void KNetLoad::updateScaleInMenu(TDEPopupMenu* menu) {
// Update the checked/unchecked states of menu items.
bool found = false;
int id;
@@ -413,12 +413,12 @@ void KNetLoad::updateScaleInMenu(KPopupMenu* menu) {
}
void KNetLoad::updateScaleInMenus() {
- for (KPopupMenu* menu = scaleInMenus.first(); menu;
+ for (TDEPopupMenu* menu = scaleInMenus.first(); menu;
menu = scaleInMenus.next())
updateScaleInMenu(menu);
}
-void KNetLoad::updateScaleOutMenu(KPopupMenu* menu) {
+void KNetLoad::updateScaleOutMenu(TDEPopupMenu* menu) {
// Update the checked/unchecked states of menu items.
bool found = false;
int id;
@@ -451,7 +451,7 @@ void KNetLoad::updateScaleOutMenu(KPopupMenu* menu) {
}
void KNetLoad::updateScaleOutMenus() {
- for (KPopupMenu* menu = scaleOutMenus.first(); menu;
+ for (TDEPopupMenu* menu = scaleOutMenus.first(); menu;
menu = scaleOutMenus.next())
updateScaleOutMenu(menu);
}
diff --git a/knetload/knetload.h b/knetload/knetload.h
index aa00ae9..9014efa 100644
--- a/knetload/knetload.h
+++ b/knetload/knetload.h
@@ -18,9 +18,9 @@
#include <tqptrlist.h>
-class KAction;
+class TDEAction;
class KNetProc;
-class KPopupMenu;
+class TDEPopupMenu;
/**
* The specific pop-up window used by KNetLoad.
@@ -52,18 +52,18 @@ protected:
virtual TQString dockName(int which) const;
virtual TQColor defaultDockColor(int which) const;
virtual void setupCustomActions();
- virtual void insertCustomItems(KPopupMenu* menu);
+ virtual void insertCustomItems(TDEPopupMenu* menu);
virtual void takeReadingInternal();
private:
/**
* Updating menus to reflect the current configuration.
*/
- void updateDeviceMenu(KPopupMenu* menu);
+ void updateDeviceMenu(TDEPopupMenu* menu);
void updateDeviceMenus();
- void updateScaleInMenu(KPopupMenu* menu);
+ void updateScaleInMenu(TDEPopupMenu* menu);
void updateScaleInMenus();
- void updateScaleOutMenu(KPopupMenu* menu);
+ void updateScaleOutMenu(TDEPopupMenu* menu);
void updateScaleOutMenus();
private:
@@ -85,9 +85,9 @@ private:
/**
* Lists of menus that must be kept up-to-date.
*/
- TQPtrList<KPopupMenu> deviceMenus;
- TQPtrList<KPopupMenu> scaleInMenus;
- TQPtrList<KPopupMenu> scaleOutMenus;
+ TQPtrList<TDEPopupMenu> deviceMenus;
+ TQPtrList<TDEPopupMenu> scaleInMenus;
+ TQPtrList<TDEPopupMenu> scaleOutMenus;
TQStringList stockDevice;
TQStringList stockDeviceIconOn;
diff --git a/knetload/statpopup.cpp b/knetload/statpopup.cpp
index 0d5bd1c..4268c0e 100644
--- a/knetload/statpopup.cpp
+++ b/knetload/statpopup.cpp
@@ -57,7 +57,7 @@ StatPopup::StatPopup(bool useSupportSplit, TQWidget *parent, const char *name) :
// Prepare for actions and the config file, but don't actually add
// any actions or read the configuration.
config = TDEGlobal::config();
- coll = new KActionCollection(this);
+ coll = new TDEActionCollection(this);
// Set up a timer for our periodic updates.
timer = new TQTimer(this);
@@ -91,7 +91,7 @@ void StatPopup::savePopupState() {
config->sync();
}
-void StatPopup::initDock(StatDock* target, KPopupMenu* menu, int whichDock) {
+void StatPopup::initDock(StatDock* target, TDEPopupMenu* menu, int whichDock) {
// Initialise the menus.
actActive->plug(menu);
actClearHistory->plug(menu);
@@ -103,7 +103,7 @@ void StatPopup::initDock(StatDock* target, KPopupMenu* menu, int whichDock) {
insertCustomItems(menu);
- KPopupMenu* fillMenu = new KPopupMenu(menu);
+ TDEPopupMenu* fillMenu = new TDEPopupMenu(menu);
actFillLines->plug(fillMenu);
actFillBars->plug(fillMenu);
actFillShaded->plug(fillMenu);
@@ -342,15 +342,15 @@ void StatPopup::setupActions() {
int iVal;
bVal = config->readBoolEntry("Active", true);
- actActive = new KToggleAction(i18n("&Active"), 0, coll, "active");
+ actActive = new TDEToggleAction(i18n("&Active"), 0, coll, "active");
actActive->setChecked(bVal);
connect(actActive, TQT_SIGNAL(toggled(bool)), TQT_TQOBJECT(this), TQT_SLOT(setActive(bool)));
- actClearHistory = new KAction(i18n("&Clear"), "editdelete", 0,
+ actClearHistory = new TDEAction(i18n("&Clear"), "editdelete", 0,
TQT_TQOBJECT(this), TQT_SLOT(clearHistory()), coll, "clear");
speed = config->readNumEntry("Speed", DEFAULT_SPEED);
- actSpeed = new KAction(i18n("&Speed..."), "speedarrow", 0,
+ actSpeed = new TDEAction(i18n("&Speed..."), "speedarrow", 0,
TQT_TQOBJECT(this), TQT_SLOT(selectSpeed()), coll, "speed");
if (supportSplit) {
@@ -395,13 +395,13 @@ void StatPopup::setupActions() {
color[0] = defaultDockColor(0);
color[0] = config->readColorEntry("Color0", color);
- actColor0 = new KAction(TQString(i18n("Color (%1)...")).arg(dockName(0)),
+ actColor0 = new TDEAction(TQString(i18n("Color (%1)...")).arg(dockName(0)),
"color0", 0, TQT_TQOBJECT(this), TQT_SLOT(selectColor0()), coll, "color0");
actColor0->setEnabled(false);
color[1] = defaultDockColor(1);
color[1] = config->readColorEntry("Color1", color + 1);
- actColor1 = new KAction(TQString(i18n("Color (%1)...")).arg(dockName(1)),
+ actColor1 = new TDEAction(TQString(i18n("Color (%1)...")).arg(dockName(1)),
"color1", 0, TQT_TQOBJECT(this), TQT_SLOT(selectColor1()), coll, "color1");
actColor1->setEnabled(false);
diff --git a/knetload/statpopup.h b/knetload/statpopup.h
index be6d8c9..121080d 100644
--- a/knetload/statpopup.h
+++ b/knetload/statpopup.h
@@ -16,13 +16,13 @@
#include <tqwidget.h>
-class KAction;
-class KActionCollection;
+class TDEAction;
+class TDEActionCollection;
class TDEConfig;
-class KPopupMenu;
-class KRadioAction;
-class KSelectAction;
-class KToggleAction;
+class TDEPopupMenu;
+class TDERadioAction;
+class TDESelectAction;
+class TDEToggleAction;
class TQTimer;
class StatDock;
@@ -88,7 +88,7 @@ public:
* created, though in general this will be done automatically by the
* StatDock constructor.
*/
- virtual void initDock(StatDock* target, KPopupMenu* menu, int whichDock);
+ virtual void initDock(StatDock* target, TDEPopupMenu* menu, int whichDock);
/**
* Performs any cleaning up required before the given system tray
@@ -170,7 +170,7 @@ protected:
*
* This routine will be called during initDock().
*/
- virtual void insertCustomItems(KPopupMenu*) {}
+ virtual void insertCustomItems(TDEPopupMenu*) {}
/**
* Propagates any properties specific to subclasses of StatPopup to
@@ -240,7 +240,7 @@ protected:
StatDock* dock[2];
/**< The two system tray windows maintained by this pop-up.
Either of these pointers may be null. */
- KActionCollection* coll;
+ TDEActionCollection* coll;
/**< The collection of all application-level actions. */
/**
@@ -302,18 +302,18 @@ private:
/**
* Actions
*/
- KToggleAction* actActive;
- KAction* actClearHistory;
- KAction* actSpeed;
- KToggleAction* actSplit;
- KToggleAction* actFillLines;
- KToggleAction* actFillBars;
- KToggleAction* actFillShaded;
- KToggleAction* actSoft;
- KToggleAction* actLabelled;
- KToggleAction* actGrid;
- KAction* actColor0;
- KAction* actColor1;
+ TDEToggleAction* actActive;
+ TDEAction* actClearHistory;
+ TDEAction* actSpeed;
+ TDEToggleAction* actSplit;
+ TDEToggleAction* actFillLines;
+ TDEToggleAction* actFillBars;
+ TDEToggleAction* actFillShaded;
+ TDEToggleAction* actSoft;
+ TDEToggleAction* actLabelled;
+ TDEToggleAction* actGrid;
+ TDEAction* actColor0;
+ TDEAction* actColor1;
};
inline int StatPopup::getSpeed() const {