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

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

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

@ -54,7 +54,7 @@ void StatPopup::Reading::Init(int which, StatPopup* popup)
color = popup->defaultDockColor(which); color = popup->defaultDockColor(which);
color = popup->config->readColorEntry(colorid, &color); 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); "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 // 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);
@ -114,7 +114,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);
@ -126,7 +126,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);
@ -332,15 +332,15 @@ void StatPopup::setupActions() {
bool bVal; bool bVal;
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) {

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

Loading…
Cancel
Save