summaryrefslogtreecommitdiffstats
path: root/superkaramba/src
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-02-01 15:14:58 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-02-01 15:14:58 -0600
commit9e5c87c89567a98c3344c90e392a27715437334c (patch)
tree6c1dd96ae0ba38b7e8f0a492d591881f44f474da /superkaramba/src
parent53904b41cf005abbae3d468532db9adc2b04a9b4 (diff)
downloadtdeutils-9e5c87c89567a98c3344c90e392a27715437334c.tar.gz
tdeutils-9e5c87c89567a98c3344c90e392a27715437334c.zip
Rename a number of classes to enhance compatibility with KDE4
Diffstat (limited to 'superkaramba/src')
-rw-r--r--superkaramba/src/karamba.cpp34
-rw-r--r--superkaramba/src/karamba.h22
-rw-r--r--superkaramba/src/karamba_python.cpp2
-rw-r--r--superkaramba/src/karamba_python.h4
-rw-r--r--superkaramba/src/karambaapp.cpp4
-rw-r--r--superkaramba/src/menu_python.cpp20
6 files changed, 43 insertions, 43 deletions
diff --git a/superkaramba/src/karamba.cpp b/superkaramba/src/karamba.cpp
index e32ce00..e4116f1 100644
--- a/superkaramba/src/karamba.cpp
+++ b/superkaramba/src/karamba.cpp
@@ -159,7 +159,7 @@ karamba::karamba(TQString fn, TQString name, bool reloading, int instance,
connect(&taskManager, TQT_SIGNAL(startupRemoved(Startup*)), this,
TQT_SLOT(startupRemoved(Startup*)) );
- themeConfMenu = new KPopupMenu( this);
+ themeConfMenu = new TDEPopupMenu( this);
themeConfMenu -> setCheckable(true);
/* XXX - need to be able to delete all these DesktopChangeSlot objects */
@@ -167,7 +167,7 @@ karamba::karamba(TQString fn, TQString name, bool reloading, int instance,
int mid;
- toDesktopMenu = new KPopupMenu (this);
+ toDesktopMenu = new TDEPopupMenu (this);
toDesktopMenu -> setCheckable(true);
mid = toDesktopMenu -> insertItem (i18n("&All Desktops"),
dslot = new DesktopChangeSlot(TQT_TQOBJECT(this),0),
@@ -186,15 +186,15 @@ karamba::karamba(TQString fn, TQString name, bool reloading, int instance,
}
- kpop = new KPopupMenu( this );
+ kpop = new TDEPopupMenu( this );
kpop -> setCheckable(true);
- accColl = new KActionCollection( this );
- menuAccColl = new KActionCollection( this );
+ accColl = new TDEActionCollection( this );
+ menuAccColl = new TDEActionCollection( this );
kpop->insertItem( SmallIconSet("reload"),i18n("Update"), this,
TQT_SLOT(updateSensors()), Key_F5 );
- toggleLocked = new KToggleAction ( i18n("Toggle &Locked Position"),
+ toggleLocked = new TDEToggleAction ( i18n("Toggle &Locked Position"),
SmallIconSet("locked"),
CTRL+Key_L, TQT_TQOBJECT(this),
TQT_SLOT( slotToggleLocked() ),
@@ -204,7 +204,7 @@ karamba::karamba(TQString fn, TQString name, bool reloading, int instance,
toggleLocked->plug(kpop);
- toggleFastTransforms = new KToggleAction(i18n("Use &Fast Image Scaling"),
+ toggleFastTransforms = new TDEToggleAction(i18n("Use &Fast Image Scaling"),
CTRL+Key_F, TQT_TQOBJECT(this),
TQT_SLOT( slotToggleFastTransforms() ),
accColl, "Fast transformations");
@@ -1780,7 +1780,7 @@ void karamba::addMenuConfigOption(TQString key, TQString name)
kpop -> setItemEnabled(THEMECONF, true);
SignalBridge* action = new SignalBridge(TQT_TQOBJECT(this), key, menuAccColl);
- KToggleAction* confItem = new KToggleAction (name, KShortcut::null(),
+ TDEToggleAction* confItem = new TDEToggleAction (name, TDEShortcut::null(),
action, TQT_SLOT(receive()),
menuAccColl, key.ascii());
confItem -> setName(key.ascii());
@@ -1801,7 +1801,7 @@ void karamba::addMenuConfigOption(TQString key, TQString name)
bool karamba::setMenuConfigOption(TQString key, bool value)
{
//tqDebug("karamba::setMenuConfigOption");
- KToggleAction* menuAction = ((KToggleAction*)menuAccColl -> action(key.ascii()));
+ TDEToggleAction* menuAction = ((TDEToggleAction*)menuAccColl -> action(key.ascii()));
if (menuAction == NULL)
{
tqWarning("Menu action %s not found.", key.ascii());
@@ -1817,7 +1817,7 @@ bool karamba::setMenuConfigOption(TQString key, bool value)
bool karamba::readMenuConfigOption(TQString key)
{
//tqDebug("karamba::readMenuConfigOption");
- KToggleAction* menuAction = ((KToggleAction*)menuAccColl -> action(key.ascii()));
+ TDEToggleAction* menuAction = ((TDEToggleAction*)menuAccColl -> action(key.ascii()));
if (menuAction == NULL)
{
tqWarning("Menu action %s not found.", key.ascii());
@@ -1835,17 +1835,17 @@ void karamba::passMenuItemClicked(int id)
//Everything below is to call the python callback function
if (pythonIface && pythonIface->isExtensionLoaded())
{
- KPopupMenu* menu = 0;
+ TDEPopupMenu* menu = 0;
for(int i = 0; i < (int)menuList->count(); i++)
{
- KPopupMenu* tmp;
+ TDEPopupMenu* tmp;
if(i==0)
{
- tmp = (KPopupMenu*) menuList->first();
+ tmp = (TDEPopupMenu*) menuList->first();
}
else
{
- tmp = (KPopupMenu*) menuList->next();
+ tmp = (TDEPopupMenu*) menuList->next();
}
if(tmp != 0)
{
@@ -1992,7 +1992,7 @@ void karamba::toggleWidgetUpdate( bool b)
widgetUpdate = b;
}
-SignalBridge::SignalBridge(TQObject* parent, TQString name, KActionCollection* ac)
+SignalBridge::SignalBridge(TQObject* parent, TQString name, TDEActionCollection* ac)
: TQObject(parent, name.ascii()), collection(ac)
{
setName(name.ascii());
@@ -2000,7 +2000,7 @@ SignalBridge::SignalBridge(TQObject* parent, TQString name, KActionCollection* a
void SignalBridge::receive()
{
- emit enabled(name(), ((KToggleAction*)collection -> action(name())) ->
+ emit enabled(name(), ((TDEToggleAction*)collection -> action(name())) ->
isChecked());
}
@@ -2031,7 +2031,7 @@ int DesktopChangeSlot::menuId()
void karamba::showMenuExtension()
{
- kglobal = new KPopupMenu(this);
+ kglobal = new TDEPopupMenu(this);
trayMenuToggleId = kglobal->insertItem(SmallIconSet("superkaramba"),
i18n("Show System Tray Icon"), this,
diff --git a/superkaramba/src/karamba.h b/superkaramba/src/karamba.h
index 682457f..870423a 100644
--- a/superkaramba/src/karamba.h
+++ b/superkaramba/src/karamba.h
@@ -130,8 +130,8 @@ public:
TQString findSensorFromMap(Sensor* sensor);
void deleteMeterFromSensors(Meter* meter);
Sensor* findSensorFromList(Meter* meter);
- KPopupMenu* keditpop;
- KPopupMenu *kpop;
+ TDEPopupMenu* keditpop;
+ TDEPopupMenu *kpop;
TQBitmap* widgetMask;
KarambaRootPixmap *kroot;
TaskManager taskManager;
@@ -225,9 +225,9 @@ private:
// use only the first occurance of KARAMBA in a config file
bool foundKaramba;
- KPopupMenu* themeConfMenu;
- KPopupMenu* toDesktopMenu;
- KPopupMenu* kglobal;
+ TDEPopupMenu* themeConfMenu;
+ TDEPopupMenu* toDesktopMenu;
+ TDEPopupMenu* kglobal;
DCOPClient *client;
TQCString appId;
@@ -237,11 +237,11 @@ private:
TQPainter p;
TQPoint clickPos;
- KActionCollection* accColl;
- KActionCollection* menuAccColl;
- KToggleAction *toggleLocked;
+ TDEActionCollection* accColl;
+ TDEActionCollection* menuAccColl;
+ TDEToggleAction *toggleLocked;
// use highquality scale and rotate algorithms
- KToggleAction *toggleFastTransforms;
+ TDEToggleAction *toggleFastTransforms;
// Python module references
KarambaPython* pythonIface;
@@ -351,7 +351,7 @@ class SignalBridge : public TQObject
public:
- SignalBridge(TQObject* parent, TQString, KActionCollection*);
+ SignalBridge(TQObject* parent, TQString, TDEActionCollection*);
signals:
void enabled(TQString, bool);
@@ -360,7 +360,7 @@ class SignalBridge : public TQObject
void receive();
private:
- KActionCollection* collection;
+ TDEActionCollection* collection;
};
#endif // _KARAMBA_H_
diff --git a/superkaramba/src/karamba_python.cpp b/superkaramba/src/karamba_python.cpp
index 8431cd3..969a278 100644
--- a/superkaramba/src/karamba_python.cpp
+++ b/superkaramba/src/karamba_python.cpp
@@ -520,7 +520,7 @@ bool KarambaPython::menuOptionChanged(karamba* k, TQString key, bool value)
return callObject("menuOptionChanged", pArgs);
}
-bool KarambaPython::menuItemClicked(karamba* k, KPopupMenu* menu, long id)
+bool KarambaPython::menuItemClicked(karamba* k, TDEPopupMenu* menu, long id)
{
PyObject* pArgs = Py_BuildValue((char*)"(lll)", k, menu, id);
return callObject("menuItemClicked", pArgs);
diff --git a/superkaramba/src/karamba_python.h b/superkaramba/src/karamba_python.h
index dbb1620..b3f7a0a 100644
--- a/superkaramba/src/karamba_python.h
+++ b/superkaramba/src/karamba_python.h
@@ -26,7 +26,7 @@
#define KARAMBA_PYTHON_H
class TQString;
-class KPopupMenu;
+class TDEPopupMenu;
class Task;
class Startup;
class karamba;
@@ -67,7 +67,7 @@ public:
bool widgetClicked(karamba* k, int x, int y, int button);
bool keyPressed(karamba* k, const Meter* meter, const TQString& text);
bool widgetMouseMoved(karamba* k, int x, int y, int button);
- bool menuItemClicked(karamba* k, KPopupMenu* menu, long id);
+ bool menuItemClicked(karamba* k, TDEPopupMenu* menu, long id);
bool activeTaskChanged(karamba* k, Task* t);
bool taskAdded(karamba* k, Task* t);
bool taskRemoved(karamba* k, Task* t);
diff --git a/superkaramba/src/karambaapp.cpp b/superkaramba/src/karambaapp.cpp
index 95f810d..b85137c 100644
--- a/superkaramba/src/karambaapp.cpp
+++ b/superkaramba/src/karambaapp.cpp
@@ -129,7 +129,7 @@ void KarambaApplication::checkSuperKarambaDir()
void KarambaApplication::setUpSysTray(TDEAboutData* about)
{
//kdDebug() << k_funcinfo << endl;
- KAction* action;
+ TDEAction* action;
//Create theme list window.
//This will function as the main window for the tray icon
@@ -138,7 +138,7 @@ void KarambaApplication::setUpSysTray(TDEAboutData* about)
//Set up systray icon
sysTrayIcon = new KSystemTray(themeListWindow);
- KPopupMenu *menu = sysTrayIcon->contextMenu();
+ TDEPopupMenu *menu = sysTrayIcon->contextMenu();
menu->insertItem(SmallIconSet("superkaramba"),
i18n("Hide System Tray Icon"), this,
TQT_SLOT(globalHideSysTray()));
diff --git a/superkaramba/src/menu_python.cpp b/superkaramba/src/menu_python.cpp
index e32a2bb..fb103ac 100644
--- a/superkaramba/src/menu_python.cpp
+++ b/superkaramba/src/menu_python.cpp
@@ -37,7 +37,7 @@ long createMenu(long widget)
{
karamba* currTheme = (karamba*)widget;
- KPopupMenu* tmp = new KPopupMenu(currTheme);
+ TDEPopupMenu* tmp = new TDEPopupMenu(currTheme);
currTheme->menuList->append( TQT_TQOBJECT(tmp) );
currTheme->connect(tmp, TQT_SIGNAL(activated(int)), currTheme,
@@ -54,20 +54,20 @@ PyObject* py_create_menu(PyObject *, PyObject *args)
return Py_BuildValue((char*)"l", createMenu(widget));
}
-bool menuExists(karamba* currTheme, KPopupMenu* menu)
+bool menuExists(karamba* currTheme, TDEPopupMenu* menu)
{
bool foundMenu = false;
- KPopupMenu* tmp;
+ TDEPopupMenu* tmp;
for(int i = 0; i < (int)currTheme->menuList->count(); i++)
{
if(i==0)
{
- tmp = (KPopupMenu*) currTheme->menuList->first();
+ tmp = (TDEPopupMenu*) currTheme->menuList->first();
}
else
{
- tmp = (KPopupMenu*) currTheme->menuList->next();
+ tmp = (TDEPopupMenu*) currTheme->menuList->next();
}
if(tmp != 0)
{
@@ -84,7 +84,7 @@ bool menuExists(karamba* currTheme, KPopupMenu* menu)
long deleteMenu(long widget, long menu)
{
karamba* currTheme = (karamba*)widget;
- KPopupMenu* tmp = (KPopupMenu*)menu;
+ TDEPopupMenu* tmp = (TDEPopupMenu*)menu;
currTheme->menuList->removeRef(TQT_TQOBJECT(tmp));
@@ -102,7 +102,7 @@ PyObject* py_delete_menu(PyObject *, PyObject *args)
long addMenuItem(long widget, long menu, TQString text, TQString icon)
{
karamba* currTheme = (karamba*)widget;
- KPopupMenu* tmp = (KPopupMenu*)menu;
+ TDEPopupMenu* tmp = (TDEPopupMenu*)menu;
long id = 0;
if(menuExists(currTheme, tmp))
@@ -129,7 +129,7 @@ PyObject* py_add_menu_item(PyObject *, PyObject *args)
long addMenuSeparator(long widget, long menu)
{
karamba* currTheme = (karamba*)widget;
- KPopupMenu* tmp = (KPopupMenu*)menu;
+ TDEPopupMenu* tmp = (TDEPopupMenu*)menu;
long id = 0;
if(menuExists(currTheme, tmp))
@@ -153,7 +153,7 @@ PyObject* py_add_menu_separator(PyObject *, PyObject *args)
long removeMenuItem(long widget, long menu, long id)
{
karamba* currTheme = (karamba*)widget;
- KPopupMenu* tmp = (KPopupMenu*)menu;
+ TDEPopupMenu* tmp = (TDEPopupMenu*)menu;
if(menuExists(currTheme,tmp))
{
@@ -177,7 +177,7 @@ PyObject* py_remove_menu_item(PyObject *, PyObject *args)
long popupMenu(long widget, long menu, long x, long y)
{
karamba* currTheme = (karamba*)widget;
- KPopupMenu* tmp = (KPopupMenu*)menu;
+ TDEPopupMenu* tmp = (TDEPopupMenu*)menu;
if(menuExists(currTheme,tmp))
{