#define APPNAME "QCPUFreq"
#define APPVERSION "0.3.99"
+
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow),
ui->setupUi(this);
+ //Settings widget
+ settings = new Settings;
+ settings->hide();
+
init();
refresh();
#endif
helpWindow.setWindowFlags( windowFlags() | Qt::Window );
- //Settings widget
- settings = new Settings;
- settings->hide();
-
//show errors about the sudo setup only once
showSudoError = true;
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()));
}
/**
* Saves the changes and hides the SettingsWidget.
+ *
+ * @emits: settingsChanged()
*/
void Settings::save()
{
settings.sync();
hide();
+
+ emit settingsChanged();
}