Rename a number of classes to enhance compatibility with KDE4

pull/1/head
Timothy Pearson 11 years ago
parent 71f85d8dc5
commit ab695c12f9

@ -16,9 +16,9 @@
IconToggleAction::IconToggleAction( IconToggleAction::IconToggleAction(
const TQString& useTextUnchecked, const TQString& useIconUnchecked, const TQString& useTextUnchecked, const TQString& useIconUnchecked,
const TQString& useTextChecked, const TQString& useIconChecked, 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) : TQObject* parent, const char* name) :
KToggleAction(useTextUnchecked, useIconUnchecked, cut, receiver, TDEToggleAction(useTextUnchecked, useIconUnchecked, cut, receiver,
slot, parent, name), slot, parent, name),
textChecked(useTextChecked), textUnchecked(useTextUnchecked), textChecked(useTextChecked), textUnchecked(useTextUnchecked),
iconChecked(useIconChecked), iconUnchecked(useIconUnchecked) { iconChecked(useIconChecked), iconUnchecked(useIconUnchecked) {
@ -26,9 +26,9 @@ IconToggleAction::IconToggleAction(
IconToggleAction::IconToggleAction(const TQString& useText, IconToggleAction::IconToggleAction(const TQString& useText,
const TQString& useIconUnchecked, const TQString& useIconChecked, 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) : TQObject* parent, const char* name) :
KToggleAction(useText, useIconUnchecked, cut, receiver, TDEToggleAction(useText, useIconUnchecked, cut, receiver,
slot, parent, name), slot, parent, name),
textChecked(useText), textUnchecked(useText), textChecked(useText), textUnchecked(useText),
iconChecked(useIconChecked), iconUnchecked(useIconUnchecked) { iconChecked(useIconChecked), iconUnchecked(useIconUnchecked) {
@ -37,16 +37,16 @@ IconToggleAction::IconToggleAction(const TQString& useText,
IconToggleAction::IconToggleAction( IconToggleAction::IconToggleAction(
const TQString& useTextUnchecked, const TQString& useIconUnchecked, const TQString& useTextUnchecked, const TQString& useIconUnchecked,
const TQString& useTextChecked, const TQString& useIconChecked, const TQString& useTextChecked, const TQString& useIconChecked,
const KShortcut& cut, TQObject* parent, const char* name) : const TDEShortcut& cut, TQObject* parent, const char* name) :
KToggleAction(useTextUnchecked, useIconUnchecked, cut, parent, name), TDEToggleAction(useTextUnchecked, useIconUnchecked, cut, parent, name),
textChecked(useTextChecked), textUnchecked(useTextUnchecked), textChecked(useTextChecked), textUnchecked(useTextUnchecked),
iconChecked(useIconChecked), iconUnchecked(useIconUnchecked) { iconChecked(useIconChecked), iconUnchecked(useIconUnchecked) {
} }
IconToggleAction::IconToggleAction(const TQString& useText, IconToggleAction::IconToggleAction(const TQString& useText,
const TQString& useIconUnchecked, const TQString& useIconChecked, const TQString& useIconUnchecked, const TQString& useIconChecked,
const KShortcut& cut, TQObject* parent, const char* name) : const TDEShortcut& cut, TQObject* parent, const char* name) :
KToggleAction(useText, useIconUnchecked, cut, parent, name), TDEToggleAction(useText, useIconUnchecked, cut, parent, name),
textChecked(useText), textUnchecked(useText), textChecked(useText), textUnchecked(useText),
iconChecked(useIconChecked), iconUnchecked(useIconUnchecked) { iconChecked(useIconChecked), iconUnchecked(useIconUnchecked) {
} }
@ -57,7 +57,7 @@ void IconToggleAction::setChecked(bool value) {
setIcon(value ? iconChecked : iconUnchecked); setIcon(value ? iconChecked : iconUnchecked);
} }
KToggleAction::setChecked(value); TDEToggleAction::setChecked(value);
} }
#include "icontoggleaction.moc" #include "icontoggleaction.moc"

@ -20,7 +20,7 @@
* A toggle action that uses different labels and pixmaps in its * A toggle action that uses different labels and pixmaps in its
* different states. * different states.
*/ */
class IconToggleAction : public KToggleAction { class IconToggleAction : public TDEToggleAction {
Q_OBJECT Q_OBJECT
@ -31,20 +31,20 @@ class IconToggleAction : public KToggleAction {
IconToggleAction( IconToggleAction(
const TQString& useTextUnchecked, const TQString& useIconUnchecked, const TQString& useTextUnchecked, const TQString& useIconUnchecked,
const TQString& useTextChecked, const TQString& useIconChecked, 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); TQObject* parent, const char* name = 0);
IconToggleAction(const TQString& useText, IconToggleAction(const TQString& useText,
const TQString& useIconUnchecked, const TQString& useIconChecked, 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); TQObject* parent, const char* name = 0);
IconToggleAction( IconToggleAction(
const TQString& useTextUnchecked, const TQString& useIconUnchecked, const TQString& useTextUnchecked, const TQString& useIconUnchecked,
const TQString& useTextChecked, const TQString& useIconChecked, const TQString& useTextChecked, const TQString& useIconChecked,
const KShortcut& cut = KShortcut(), TQObject* parent = 0, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0,
const char* name = 0); const char* name = 0);
IconToggleAction(const TQString& useText, IconToggleAction(const TQString& useText,
const TQString& useIconUnchecked, const TQString& useIconChecked, const TQString& useIconUnchecked, const TQString& useIconChecked,
const KShortcut& cut = KShortcut(), TQObject* parent = 0, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0,
const char* name = 0); const char* name = 0);
/** /**

@ -243,10 +243,10 @@ void KNetLoad::setupCustomActions() {
scaleOut = config->readNumEntry("ScaleOut", 0 /* same as in */); 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 // Device menu. The menu item IDs are indices into the
// stockDevice[] array. // stockDevice[] array.
KPopupMenu* deviceMenu = new KPopupMenu(menu); TDEPopupMenu* deviceMenu = new TDEPopupMenu(menu);
deviceMenus.append(deviceMenu); deviceMenus.append(deviceMenu);
deviceMenu->setCheckable(true); deviceMenu->setCheckable(true);
for (int i = 0; i < stockDevice.count(); i++) 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 // Scale menus. The menu item IDs are the scales themselves (in bits
// per second), to make event handling sane. // per second), to make event handling sane.
KPopupMenu* scaleInMenu = new KPopupMenu(menu); TDEPopupMenu* scaleInMenu = new TDEPopupMenu(menu);
scaleInMenus.append(scaleInMenu); scaleInMenus.append(scaleInMenu);
scaleInMenu->setCheckable(true); scaleInMenu->setCheckable(true);
scaleInMenu->insertItem(i18n("28.8KBit/s"), 28800); 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))); connect(scaleInMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(setScaleIn(int)));
menu->insertItem(SmallIcon("scalein"), i18n("&Scale (In)"), scaleInMenu); menu->insertItem(SmallIcon("scalein"), i18n("&Scale (In)"), scaleInMenu);
KPopupMenu* scaleOutMenu = new KPopupMenu(menu); TDEPopupMenu* scaleOutMenu = new TDEPopupMenu(menu);
scaleOutMenus.append(scaleOutMenu); scaleOutMenus.append(scaleOutMenu);
scaleOutMenu->setCheckable(true); scaleOutMenu->setCheckable(true);
scaleOutMenu->insertItem(i18n("28.8KBit/s"), 28800); 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())); .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(); const TQString& dev = proc->getDevice();
// Update the checked/unchecked states of menu items. // Update the checked/unchecked states of menu items.
@ -375,12 +375,12 @@ void KNetLoad::updateDeviceMenu(KPopupMenu* menu) {
} }
void KNetLoad::updateDeviceMenus() { void KNetLoad::updateDeviceMenus() {
for (KPopupMenu* menu = deviceMenus.first(); menu; for (TDEPopupMenu* menu = deviceMenus.first(); menu;
menu = deviceMenus.next()) menu = deviceMenus.next())
updateDeviceMenu(menu); updateDeviceMenu(menu);
} }
void KNetLoad::updateScaleInMenu(KPopupMenu* menu) { void KNetLoad::updateScaleInMenu(TDEPopupMenu* menu) {
// Update the checked/unchecked states of menu items. // Update the checked/unchecked states of menu items.
bool found = false; bool found = false;
int id; int id;
@ -413,12 +413,12 @@ void KNetLoad::updateScaleInMenu(KPopupMenu* menu) {
} }
void KNetLoad::updateScaleInMenus() { void KNetLoad::updateScaleInMenus() {
for (KPopupMenu* menu = scaleInMenus.first(); menu; for (TDEPopupMenu* menu = scaleInMenus.first(); menu;
menu = scaleInMenus.next()) menu = scaleInMenus.next())
updateScaleInMenu(menu); updateScaleInMenu(menu);
} }
void KNetLoad::updateScaleOutMenu(KPopupMenu* menu) { void KNetLoad::updateScaleOutMenu(TDEPopupMenu* menu) {
// Update the checked/unchecked states of menu items. // Update the checked/unchecked states of menu items.
bool found = false; bool found = false;
int id; int id;
@ -451,7 +451,7 @@ void KNetLoad::updateScaleOutMenu(KPopupMenu* menu) {
} }
void KNetLoad::updateScaleOutMenus() { void KNetLoad::updateScaleOutMenus() {
for (KPopupMenu* menu = scaleOutMenus.first(); menu; for (TDEPopupMenu* menu = scaleOutMenus.first(); menu;
menu = scaleOutMenus.next()) menu = scaleOutMenus.next())
updateScaleOutMenu(menu); updateScaleOutMenu(menu);
} }

@ -18,9 +18,9 @@
#include <tqptrlist.h> #include <tqptrlist.h>
class KAction; class TDEAction;
class KNetProc; class KNetProc;
class KPopupMenu; class TDEPopupMenu;
/** /**
* The specific pop-up window used by KNetLoad. * The specific pop-up window used by KNetLoad.
@ -52,18 +52,18 @@ protected:
virtual TQString dockName(int which) const; virtual TQString dockName(int which) const;
virtual TQColor defaultDockColor(int which) const; virtual TQColor defaultDockColor(int which) const;
virtual void setupCustomActions(); virtual void setupCustomActions();
virtual void insertCustomItems(KPopupMenu* menu); virtual void insertCustomItems(TDEPopupMenu* menu);
virtual void takeReadingInternal(); virtual void takeReadingInternal();
private: private:
/** /**
* Updating menus to reflect the current configuration. * Updating menus to reflect the current configuration.
*/ */
void updateDeviceMenu(KPopupMenu* menu); void updateDeviceMenu(TDEPopupMenu* menu);
void updateDeviceMenus(); void updateDeviceMenus();
void updateScaleInMenu(KPopupMenu* menu); void updateScaleInMenu(TDEPopupMenu* menu);
void updateScaleInMenus(); void updateScaleInMenus();
void updateScaleOutMenu(KPopupMenu* menu); void updateScaleOutMenu(TDEPopupMenu* menu);
void updateScaleOutMenus(); void updateScaleOutMenus();
private: private:
@ -85,9 +85,9 @@ private:
/** /**
* Lists of menus that must be kept up-to-date. * Lists of menus that must be kept up-to-date.
*/ */
TQPtrList<KPopupMenu> deviceMenus; TQPtrList<TDEPopupMenu> deviceMenus;
TQPtrList<KPopupMenu> scaleInMenus; TQPtrList<TDEPopupMenu> scaleInMenus;
TQPtrList<KPopupMenu> scaleOutMenus; TQPtrList<TDEPopupMenu> scaleOutMenus;
TQStringList stockDevice; TQStringList stockDevice;
TQStringList stockDeviceIconOn; TQStringList stockDeviceIconOn;

@ -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 // Prepare for actions and the config file, but don't actually add
// any actions or read the configuration. // any actions or read the configuration.
config = TDEGlobal::config(); config = TDEGlobal::config();
coll = new KActionCollection(this); coll = new TDEActionCollection(this);
// Set up a timer for our periodic updates. // Set up a timer for our periodic updates.
timer = new TQTimer(this); timer = new TQTimer(this);
@ -91,7 +91,7 @@ void StatPopup::savePopupState() {
config->sync(); config->sync();
} }
void StatPopup::initDock(StatDock* target, KPopupMenu* menu, int whichDock) { void StatPopup::initDock(StatDock* target, TDEPopupMenu* menu, int whichDock) {
// Initialise the menus. // Initialise the menus.
actActive->plug(menu); actActive->plug(menu);
actClearHistory->plug(menu); actClearHistory->plug(menu);
@ -103,7 +103,7 @@ void StatPopup::initDock(StatDock* target, KPopupMenu* menu, int whichDock) {
insertCustomItems(menu); insertCustomItems(menu);
KPopupMenu* fillMenu = new KPopupMenu(menu); TDEPopupMenu* fillMenu = new TDEPopupMenu(menu);
actFillLines->plug(fillMenu); actFillLines->plug(fillMenu);
actFillBars->plug(fillMenu); actFillBars->plug(fillMenu);
actFillShaded->plug(fillMenu); actFillShaded->plug(fillMenu);
@ -342,15 +342,15 @@ void StatPopup::setupActions() {
int iVal; int iVal;
bVal = config->readBoolEntry("Active", true); bVal = config->readBoolEntry("Active", true);
actActive = new KToggleAction(i18n("&Active"), 0, coll, "active"); actActive = new TDEToggleAction(i18n("&Active"), 0, coll, "active");
actActive->setChecked(bVal); actActive->setChecked(bVal);
connect(actActive, TQT_SIGNAL(toggled(bool)), TQT_TQOBJECT(this), TQT_SLOT(setActive(bool))); 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"); TQT_TQOBJECT(this), TQT_SLOT(clearHistory()), coll, "clear");
speed = config->readNumEntry("Speed", DEFAULT_SPEED); 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"); TQT_TQOBJECT(this), TQT_SLOT(selectSpeed()), coll, "speed");
if (supportSplit) { if (supportSplit) {
@ -395,13 +395,13 @@ void StatPopup::setupActions() {
color[0] = defaultDockColor(0); color[0] = defaultDockColor(0);
color[0] = config->readColorEntry("Color0", color); 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"); "color0", 0, TQT_TQOBJECT(this), TQT_SLOT(selectColor0()), coll, "color0");
actColor0->setEnabled(false); actColor0->setEnabled(false);
color[1] = defaultDockColor(1); color[1] = defaultDockColor(1);
color[1] = config->readColorEntry("Color1", color + 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"); "color1", 0, TQT_TQOBJECT(this), TQT_SLOT(selectColor1()), coll, "color1");
actColor1->setEnabled(false); actColor1->setEnabled(false);

@ -16,13 +16,13 @@
#include <tqwidget.h> #include <tqwidget.h>
class KAction; class TDEAction;
class KActionCollection; class TDEActionCollection;
class TDEConfig; class TDEConfig;
class KPopupMenu; class TDEPopupMenu;
class KRadioAction; class TDERadioAction;
class KSelectAction; class TDESelectAction;
class KToggleAction; class TDEToggleAction;
class TQTimer; class TQTimer;
class StatDock; class StatDock;
@ -88,7 +88,7 @@ public:
* created, though in general this will be done automatically by the * created, though in general this will be done automatically by the
* StatDock constructor. * 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 * Performs any cleaning up required before the given system tray
@ -170,7 +170,7 @@ protected:
* *
* This routine will be called during initDock(). * This routine will be called during initDock().
*/ */
virtual void insertCustomItems(KPopupMenu*) {} virtual void insertCustomItems(TDEPopupMenu*) {}
/** /**
* Propagates any properties specific to subclasses of StatPopup to * Propagates any properties specific to subclasses of StatPopup to
@ -240,7 +240,7 @@ protected:
StatDock* dock[2]; StatDock* dock[2];
/**< The two system tray windows maintained by this pop-up. /**< The two system tray windows maintained by this pop-up.
Either of these pointers may be null. */ Either of these pointers may be null. */
KActionCollection* coll; TDEActionCollection* coll;
/**< The collection of all application-level actions. */ /**< The collection of all application-level actions. */
/** /**
@ -302,18 +302,18 @@ private:
/** /**
* Actions * Actions
*/ */
KToggleAction* actActive; TDEToggleAction* actActive;
KAction* actClearHistory; TDEAction* actClearHistory;
KAction* actSpeed; TDEAction* actSpeed;
KToggleAction* actSplit; TDEToggleAction* actSplit;
KToggleAction* actFillLines; TDEToggleAction* actFillLines;
KToggleAction* actFillBars; TDEToggleAction* actFillBars;
KToggleAction* actFillShaded; TDEToggleAction* actFillShaded;
KToggleAction* actSoft; TDEToggleAction* actSoft;
KToggleAction* actLabelled; TDEToggleAction* actLabelled;
KToggleAction* actGrid; TDEToggleAction* actGrid;
KAction* actColor0; TDEAction* actColor0;
KAction* actColor1; TDEAction* actColor1;
}; };
inline int StatPopup::getSpeed() const { inline int StatPopup::getSpeed() const {

Loading…
Cancel
Save