diff options
Diffstat (limited to 'src/lmsensorsdock.cpp')
-rw-r--r-- | src/lmsensorsdock.cpp | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/src/lmsensorsdock.cpp b/src/lmsensorsdock.cpp index 5429883..b5321ab 100644 --- a/src/lmsensorsdock.cpp +++ b/src/lmsensorsdock.cpp @@ -17,16 +17,16 @@ #include "lmsensorsdock.h" -#include <qobjectlist.h> -#include <klocale.h> +#include <ntqobjectlist.h> +#include <tdelocale.h> #include <kiconloader.h> #include <kapp.h> -#include <kaboutapplication.h> +#include <tdeaboutapplication.h> -#include <kwin.h> +#include <twin.h> #include <netwm.h> -LMSensorsDock::LMSensorsDock(bool fNoDock, QObject *parent, const char *name): QObject(parent,name) +LMSensorsDock::LMSensorsDock(bool fNoDock, TQObject *parent, const char *name): TQObject(parent,name) { noDock= fNoDock; @@ -55,7 +55,7 @@ LMSensorsDock::~LMSensorsDock() void LMSensorsDock::createMenu() { - menu= new KPopupMenu; + menu= new TDEPopupMenu; menu->insertTitle(kapp->miniIcon(),"KSensors"); menu->insertItem(SmallIcon("configure"),i18n("&Configure"), this, SLOT(createConfigWidget() ) ,0,101 ); menu->insertSeparator(); @@ -67,32 +67,32 @@ void LMSensorsDock::createMenu() void LMSensorsDock::createWidgets() { - KGlobal::config()->setGroup("General"); + TDEGlobal::config()->setGroup("General"); if(noDock) createShowWidget(); - else if(KGlobal::config()->readBoolEntry("showWidget",false)) { - int desktop = KGlobal::config()->readNumEntry("desktop", 0); + else if(TDEGlobal::config()->readBoolEntry("showWidget",false)) { + int desktop = TDEGlobal::config()->readNumEntry("desktop", 0); createShowWidget(desktop); } } void LMSensorsDock::saveConfig() { - KGlobal::config()->setGroup("General"); - KGlobal::config()->writeEntry("showWidget",(bool)sensorsWidget); + TDEGlobal::config()->setGroup("General"); + TDEGlobal::config()->writeEntry("showWidget",(bool)sensorsWidget); if(sensorsWidget) { - NETWinInfo wm_client(qt_xdisplay(), sensorsWidget->winId(), qt_xrootwin(), NET::WMDesktop); - KGlobal::config()->writeEntry("desktop", wm_client.desktop()); + NETWinInfo wm_client(tqt_xdisplay(), sensorsWidget->winId(), tqt_xrootwin(), NET::WMDesktop); + TDEGlobal::config()->writeEntry("desktop", wm_client.desktop()); } } void LMSensorsDock::createDockWidgets() { -QObjectList *chips= sensors->getSensorsChips(); +TQObjectList *chips= sensors->getSensorsChips(); countSensors= 0; if(chips) for(LMSensorsChip *chip= (LMSensorsChip *)chips->first(); chip!=0; chip= (LMSensorsChip *)chips->next()) { - QObjectList *list= (QObjectList *)chip->getSensors(); + TQObjectList *list= (TQObjectList *)chip->getSensors(); if(list) { for(LMSensor *sensor= (LMSensor *)list->first(); sensor!=0; sensor= (LMSensor *)list->next()) { if( LMSensorDockPanel::readShowInDock(sensor->name()) ) @@ -128,7 +128,7 @@ void LMSensorsDock::createShowWidget(int desktop) { if(!sensorsWidget) { sensorsWidget= new LMSensorsWidget(sensors); - connect( sensorsWidget, SIGNAL(rightMouseClicked(QMouseEvent *)), this, SLOT(mouseEventReceived(QMouseEvent *)) ); + connect( sensorsWidget, SIGNAL(rightMouseClicked(TQMouseEvent *)), this, SLOT(mouseEventReceived(TQMouseEvent *)) ); connect( sensorsWidget, SIGNAL(destroyed()), this, SLOT(updateMenu()) ); } if ((desktop != 0) && (desktop <= KWin::numberOfDesktops())) KWin::setOnDesktop(sensorsWidget->winId(), desktop); @@ -150,9 +150,9 @@ void LMSensorsDock::close() delete this; } -void LMSensorsDock::mouseEventReceived(QMouseEvent *e) +void LMSensorsDock::mouseEventReceived(TQMouseEvent *e) { - if(e->type()==QEvent::MouseButtonRelease) { + if(e->type()==TQEvent::MouseButtonRelease) { if( e->button()==LeftButton ) minimizeRestoreWidget(); if( e->button()==RightButton ) menu->popup(e->globalPos()); } @@ -161,14 +161,14 @@ void LMSensorsDock::mouseEventReceived(QMouseEvent *e) void LMSensorsDock::createDockSensor(Sensor *sensor) { if(countSensors==0) { - QObjectList *list= (QObjectList *)children(); + TQObjectList *list= (TQObjectList *)children(); if(list) for(LMSensorDockPanel *sensor= (LMSensorDockPanel *)list->first(); sensor!=0; sensor= (LMSensorDockPanel *)list->next()) delete sensor; } const char *name= sensor ? sensor->name() : 0; LMSensorDockPanel *dock= new LMSensorDockPanel(sensor,name); - connect( dock, SIGNAL(mouseEvent(QMouseEvent *)), this, SLOT(mouseEventReceived(QMouseEvent *)) ); + connect( dock, SIGNAL(mouseEvent(TQMouseEvent *)), this, SLOT(mouseEventReceived(TQMouseEvent *)) ); insertChild(dock); dock->show(); if(name) countSensors++; @@ -202,9 +202,9 @@ void LMSensorsDock::updateItemDock(const char *name) void LMSensorsDock::showAbout() { -KAboutApplication *dialog; +TDEAboutApplication *dialog; - dialog= new KAboutApplication; + dialog= new TDEAboutApplication; dialog->exec(); delete dialog; } |