Rename a number of classes to enhance compatibility with KDE4

pull/1/head
Timothy Pearson 11 years ago
parent 4d4b4d8917
commit 05dbfd2d57

@ -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"

@ -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);
/**

@ -89,7 +89,7 @@ void KCPULoad::setupCustomActions() {
}
}
void KCPULoad::insertCustomItems(KPopupMenu* menu) {
void KCPULoad::insertCustomItems(TDEPopupMenu* menu) {
if (supportSMP) {
actSMP->plug(menu);
menu->insertSeparator();

@ -17,7 +17,7 @@
#include "statpopup.h"
class KCPUProc;
class KToggleAction;
class TDEToggleAction;
/**
* The specific pop-up window used by KCPULoad.
@ -46,7 +46,7 @@ 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:
@ -66,7 +66,7 @@ private:
/**
* Actions.
*/
KToggleAction* actSMP;
TDEToggleAction* actSMP;
};
#endif

@ -54,7 +54,7 @@ void StatPopup::Reading::Init(int which, StatPopup* popup)
color = popup->defaultDockColor(which);
color = popup->config->readColorEntry(colorid, &color);
actColor = new KAction(i18n("Color (%1)...").arg(popup->dockName(which)),
actColor = new TDEAction(i18n("Color (%1)...").arg(popup->dockName(which)),
"color", 0, TQT_TQOBJECT(popup), TQT_SLOT(selectColor()), popup->coll, colorid);
}
@ -80,7 +80,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);
@ -114,7 +114,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);
@ -126,7 +126,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);
@ -332,15 +332,15 @@ void StatPopup::setupActions() {
bool bVal;
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) {

@ -17,13 +17,13 @@
#include <tqwidget.h>
#include <vector> // sorry, TQValueVector::erase() does not call destructors
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);
/**
* Is this application currently active (i.e., taking periodic
@ -157,7 +157,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
@ -238,7 +238,7 @@ protected:
/**< The lower reading taken during the last reading. */
TQColor color;
/**< The colour used in the system tray diagram. */
KAction* actColor;
TDEAction* actColor;
/**< The menu item to change the colour of this dock. */
Reading();
~Reading();
@ -246,7 +246,7 @@ protected:
};
std::vector<Reading> r;
/**< The readings maintained by this pop-up. */
KActionCollection* coll;
TDEActionCollection* coll;
/**< The collection of all application-level actions. */
TQString fullReading;
@ -297,16 +297,16 @@ private:
/**
* Actions
*/
KToggleAction* actActive;
KAction* actClearHistory;
KAction* actSpeed;
KToggleAction* actSplit;
KToggleAction* actFillLines;
KToggleAction* actFillBars;
KToggleAction* actFillShaded;
KToggleAction* actSoft;
KToggleAction* actLabelled;
KToggleAction* actGrid;
TDEToggleAction* actActive;
TDEAction* actClearHistory;
TDEAction* actSpeed;
TDEToggleAction* actSplit;
TDEToggleAction* actFillLines;
TDEToggleAction* actFillBars;
TDEToggleAction* actFillShaded;
TDEToggleAction* actSoft;
TDEToggleAction* actLabelled;
TDEToggleAction* actGrid;
};
inline int StatPopup::getSpeed() const {

Loading…
Cancel
Save