settings = new Settings;
settings->hide();
+ //applies the settings from the settings dialog
+ applySettings();
+
init();
refresh();
- // setup auto rotation
- setAutoRotation();
-
//initialize orientation
orientationChanged();
connect(ui->sr_box, SIGNAL(clicked()), this, SLOT(setSmartReflex()));
connect(&refreshTimer, SIGNAL(timeout()), this, SLOT(refresh()));
connect(ui->actionSettings, SIGNAL(triggered()), this, SLOT(showSettings()));
- connect(settings, SIGNAL(settingsChanged()), this, SLOT(setAutoRotation()));
+ connect(settings, SIGNAL(settingsChanged()), this, SLOT(applySettings()));
}
/**
+ * SLOT: applies the settings from the Settings dialog.
+ */
+void MainWindow::applySettings()
+{
+ setAutoRotation();
+ setAdvancedTemperature();
+}
+
+
+/**
* Calls the QCPUFreq helper script with "sudo action param"
*
* @param action : the action of the helper script
/**
+ * Checks the settings if the "bq27x00_battery" needs to be loaded.
+ */
+void MainWindow::setAdvancedTemperature()
+{
+ if (settings->usePowerKernel() && settings->useAdvancedTemperature()) {
+ callHelper( "load_bq27", "null" );
+ }
+}
+
+
+/**
* Enables or disables the auto-rotation feature of Maemo5 devices.
*/
void MainWindow::setAutoRotation()