|
|
@ -118,7 +118,7 @@ void LMSensorsCfg::readSensorInfo(int index)
|
|
|
|
|
|
|
|
|
|
|
|
const char *mask= curSensor->getType()==LMSensor::lmVoltage ? "%.2lf":"%.0lf";
|
|
|
|
const char *mask= curSensor->getType()==LMSensor::lmVoltage ? "%.2lf":"%.0lf";
|
|
|
|
|
|
|
|
|
|
|
|
str.sprintf(curSensor->getPrintMask(true), curSensor->getValue());
|
|
|
|
str.sprintf(curSensor->getPrintMask(true).ascii(), curSensor->getValue());
|
|
|
|
editValue->setText(str);
|
|
|
|
editValue->setText(str);
|
|
|
|
|
|
|
|
|
|
|
|
str.sprintf(mask, curSensor->getValueIdeal());
|
|
|
|
str.sprintf(mask, curSensor->getValueIdeal());
|
|
|
@ -185,11 +185,11 @@ void LMSensorsCfg::applySensorChanges()
|
|
|
|
!radioAlarm1->isChecked()
|
|
|
|
!radioAlarm1->isChecked()
|
|
|
|
);
|
|
|
|
);
|
|
|
|
// Apply show in main window configuration
|
|
|
|
// Apply show in main window configuration
|
|
|
|
LMSensorPanel::writeShow(sName,checkShow->isChecked() );
|
|
|
|
LMSensorPanel::writeShow(sName.utf8(), checkShow->isChecked() );
|
|
|
|
// Apply dock configuration
|
|
|
|
// Apply dock configuration
|
|
|
|
LMSensorDockPanel::writeShowInDock(sName,checkShowInDock->isChecked());
|
|
|
|
LMSensorDockPanel::writeShowInDock(sName.utf8(), checkShowInDock->isChecked());
|
|
|
|
LMSensorDockPanel::writeColorNormal(sName,colorNormal->color());
|
|
|
|
LMSensorDockPanel::writeColorNormal(sName.utf8(), colorNormal->color());
|
|
|
|
LMSensorDockPanel::writeColorAlarm(sName,colorAlarm->color());
|
|
|
|
LMSensorDockPanel::writeColorAlarm(sName.utf8(), colorAlarm->color());
|
|
|
|
//
|
|
|
|
//
|
|
|
|
palPanelCfg->savePalette();
|
|
|
|
palPanelCfg->savePalette();
|
|
|
|
//
|
|
|
|
//
|
|
|
@ -259,10 +259,10 @@ void LMSensorsCfg::slotAccept()
|
|
|
|
void LMSensorsCfg::slotTestAlarm()
|
|
|
|
void LMSensorsCfg::slotTestAlarm()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if( radioAlarm2->isChecked() ) {
|
|
|
|
if( radioAlarm2->isChecked() ) {
|
|
|
|
LMSensorsAlarms::playSound(editPlay->text());
|
|
|
|
LMSensorsAlarms::playSound(editPlay->text().local8Bit());
|
|
|
|
} else
|
|
|
|
} else
|
|
|
|
if( radioAlarm3->isChecked() ) {
|
|
|
|
if( radioAlarm3->isChecked() ) {
|
|
|
|
LMSensorsAlarms::runSensorCommand("TEST","100",editLaunch->text());
|
|
|
|
LMSensorsAlarms::runSensorCommand("TEST", "100", editLaunch->text().local8Bit());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|