|
|
@ -33,7 +33,7 @@ LMSensorsDock::LMSensorsDock(bool fNoDock, TQObject *parent, const char *name):
|
|
|
|
sensors= new LMSensors;
|
|
|
|
sensors= new LMSensors;
|
|
|
|
sensors->setMonitorized(true);
|
|
|
|
sensors->setMonitorized(true);
|
|
|
|
|
|
|
|
|
|
|
|
connect(sensors,SIGNAL(configChanged(const char *)),this,SLOT(updateItemDock(const char *)));
|
|
|
|
connect(sensors,TQ_SIGNAL(configChanged(const char *)),this,TQ_SLOT(updateItemDock(const char *)));
|
|
|
|
|
|
|
|
|
|
|
|
createAlarmControl();
|
|
|
|
createAlarmControl();
|
|
|
|
createWidgets();
|
|
|
|
createWidgets();
|
|
|
@ -65,17 +65,17 @@ LMSensorsDock::~LMSensorsDock()
|
|
|
|
void LMSensorsDock::createMenu()
|
|
|
|
void LMSensorsDock::createMenu()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
helpmenu=new TDEPopupMenu;
|
|
|
|
helpmenu=new TDEPopupMenu;
|
|
|
|
helpmenu->insertItem(SmallIcon("help"), i18n("&KSensors Handbook"), this, SLOT(showHandbook()));
|
|
|
|
helpmenu->insertItem(SmallIcon("help"), i18n("&KSensors Handbook"), this, TQ_SLOT(showHandbook()));
|
|
|
|
helpmenu->insertItem(kapp->miniIcon(), i18n("&About KSensors"), this, SLOT(showAbout()));
|
|
|
|
helpmenu->insertItem(kapp->miniIcon(), i18n("&About KSensors"), this, TQ_SLOT(showAbout()));
|
|
|
|
|
|
|
|
|
|
|
|
menu= new TDEPopupMenu;
|
|
|
|
menu= new TDEPopupMenu;
|
|
|
|
menu->insertTitle(kapp->miniIcon(),"KSensors");
|
|
|
|
menu->insertTitle(kapp->miniIcon(),"KSensors");
|
|
|
|
menu->insertItem(SmallIcon("configure"),i18n("&Configure"), this, SLOT(createConfigWidget() ) ,0,101 );
|
|
|
|
menu->insertItem(SmallIcon("configure"),i18n("&Configure"), this, TQ_SLOT(createConfigWidget() ) ,0,101 );
|
|
|
|
menu->insertSeparator();
|
|
|
|
menu->insertSeparator();
|
|
|
|
helpmenu_id=menu->insertItem(SmallIcon("help"), i18n("&Help"), helpmenu);
|
|
|
|
helpmenu_id=menu->insertItem(SmallIcon("help"), i18n("&Help"), helpmenu);
|
|
|
|
menu->insertSeparator();
|
|
|
|
menu->insertSeparator();
|
|
|
|
if(!noDock) menu->insertItem(sensorsWidget ? i18n("&Minimize"):i18n("&Restore"), this, SLOT(minimizeRestoreWidget() ) ,0,100 );
|
|
|
|
if(!noDock) menu->insertItem(sensorsWidget ? i18n("&Minimize"):i18n("&Restore"), this, TQ_SLOT(minimizeRestoreWidget() ) ,0,100 );
|
|
|
|
menu->insertItem(SmallIcon("system-log-out"),i18n("&Exit"), this, SLOT(close()),0,102);
|
|
|
|
menu->insertItem(SmallIcon("system-log-out"),i18n("&Exit"), this, TQ_SLOT(close()),0,102);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void LMSensorsDock::createWidgets()
|
|
|
|
void LMSensorsDock::createWidgets()
|
|
|
@ -141,8 +141,8 @@ void LMSensorsDock::createShowWidget(int desktop)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if(!sensorsWidget) {
|
|
|
|
if(!sensorsWidget) {
|
|
|
|
sensorsWidget= new LMSensorsWidget(sensors);
|
|
|
|
sensorsWidget= new LMSensorsWidget(sensors);
|
|
|
|
connect( sensorsWidget, SIGNAL(rightMouseClicked(TQMouseEvent *)), this, SLOT(mouseEventReceived(TQMouseEvent *)) );
|
|
|
|
connect( sensorsWidget, TQ_SIGNAL(rightMouseClicked(TQMouseEvent *)), this, TQ_SLOT(mouseEventReceived(TQMouseEvent *)) );
|
|
|
|
connect( sensorsWidget, SIGNAL(destroyed()), this, SLOT(updateMenu()) );
|
|
|
|
connect( sensorsWidget, TQ_SIGNAL(destroyed()), this, TQ_SLOT(updateMenu()) );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if ((desktop != 0) && (desktop <= KWin::numberOfDesktops())) KWin::setOnDesktop(sensorsWidget->winId(), desktop);
|
|
|
|
if ((desktop != 0) && (desktop <= KWin::numberOfDesktops())) KWin::setOnDesktop(sensorsWidget->winId(), desktop);
|
|
|
|
sensorsWidget->show();
|
|
|
|
sensorsWidget->show();
|
|
|
@ -181,7 +181,7 @@ void LMSensorsDock::createDockSensor(Sensor *sensor)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
const char *name= sensor ? sensor->name() : 0;
|
|
|
|
const char *name= sensor ? sensor->name() : 0;
|
|
|
|
LMSensorDockPanel *dock= new LMSensorDockPanel(sensor,name);
|
|
|
|
LMSensorDockPanel *dock= new LMSensorDockPanel(sensor,name);
|
|
|
|
connect( dock, SIGNAL(mouseEvent(TQMouseEvent *)), this, SLOT(mouseEventReceived(TQMouseEvent *)) );
|
|
|
|
connect( dock, TQ_SIGNAL(mouseEvent(TQMouseEvent *)), this, TQ_SLOT(mouseEventReceived(TQMouseEvent *)) );
|
|
|
|
insertChild(dock);
|
|
|
|
insertChild(dock);
|
|
|
|
dock->show();
|
|
|
|
dock->show();
|
|
|
|
if(name) countSensors++;
|
|
|
|
if(name) countSensors++;
|
|
|
|