Call "kernel-config default" to save the current maximum frequency on
power kernels.
/sbin/modprobe bq27x00_battery
exit 0
;;
/sbin/modprobe bq27x00_battery
exit 0
;;
+ "save")
+ /usr/sbin/kernel-config default
+ exit 0
+ ;;
"set_maxfreq")
#set scaling_max_freq
echo $2 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
"set_maxfreq")
#set scaling_max_freq
echo $2 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
connect(QApplication::desktop(), SIGNAL(resized(int)), this, SLOT(orientationChanged()));
connect(ui->sr_box, SIGNAL(clicked()), this, SLOT(setSmartReflex()));
connect(&refreshTimer, SIGNAL(timeout()), this, SLOT(refresh()));
connect(QApplication::desktop(), SIGNAL(resized(int)), this, SLOT(orientationChanged()));
connect(ui->sr_box, SIGNAL(clicked()), this, SLOT(setSmartReflex()));
connect(&refreshTimer, SIGNAL(timeout()), this, SLOT(refresh()));
+ connect(ui->actionSave, SIGNAL(triggered()), this, SLOT(save()));
connect(ui->actionSettings, SIGNAL(triggered()), this, SLOT(showSettings()));
connect(settings, SIGNAL(settingsChanged()), this, SLOT(applySettings()));
connect(ui->actionSettings, SIGNAL(triggered()), this, SLOT(showSettings()));
connect(settings, SIGNAL(settingsChanged()), this, SLOT(applySettings()));
} else {
this->minFreq = min.toInt();
}
} else {
this->minFreq = min.toInt();
}
+
+ //enable save option on power kernels
+ if (settings->usePowerKernel()) {
+ ui->actionSave->setEnabled(true);
+ }
+ * Saves the current maximim frequency as default (only on power kernel).
+ */
+void MainWindow::save()
+{
+ if (settings->usePowerKernel()) {
+ callHelper( "save", "null" );
+ #if defined(Q_WS_MAEMO_5)
+ QMaemo5InformationBox::information(this, tr( "The current frequency settings have been saved as default." ), QMaemo5InformationBox::DefaultTimeout);
+ #endif
+ }
+}
+
+
+/**
* Checks the settings if the "bq27x00_battery" needs to be loaded.
*/
void MainWindow::setAdvancedTemperature()
* Checks the settings if the "bq27x00_battery" needs to be loaded.
*/
void MainWindow::setAdvancedTemperature()
void applySettings();
void orientationChanged();
void refresh();
void applySettings();
void orientationChanged();
void refresh();
void setAdvancedTemperature();
void setAutoRotation();
void setSmartReflex();
void setAdvancedTemperature();
void setAutoRotation();
void setSmartReflex();