Added new (dummy) SettingsWidget
[qcpufreq] / src / mainwindow.h
old mode 100755 (executable)
new mode 100644 (file)
index 13eae27..dd2d172
 #include <QMainWindow>
 #include <QGraphicsScene>
 #include <QTimer>
+#include <QProcess>
+#include <QStringList>
+
+#include "helpwindow.h"
+#include "settingswidget.h"
 
 namespace Ui {
     class MainWindow;
@@ -40,12 +45,16 @@ public slots:
     void adjustFreq();
     void orientationChanged();
     void refresh();
-    void setAutoRotaion();
+    void setAutoRotation();
+    void setOverclocking();
     void setSmartReflex();
+    void showHelp();
+    void showSettings();
 
 
 private:
     Ui::MainWindow *ui;
+    bool allowOverclocking;
     int callHelper( QString action, QString param );
     QString getCPUTemp();
     int getMaxFreq();
@@ -55,11 +64,26 @@ private:
     int getScalingStep( int freq );
     int getScalingSteps();
     int getSmartReflexState();
+    //! The helper process
+    QProcess helperProcess;
+    //! The help window
+    HelpWindow helpWindow;
+    //! Initializes the application
+    void init();
+    int minFreq;
+    //! Are we using a power kernel?
+    bool powerKernel;
     QString readSysFile( QString sys_file );
     //! the timer for refreshing the UI
-    QTimer *refreshTimer;
+    QTimer refreshTimer;
+    //! The amount of scaling steps
+    int scalingSteps;
+    //! The available scaling frequencies
+    QStringList scalingFrequencies;
     //! the QGraphicsScene will contain the large chip icon displayed in the UI
-    QGraphicsScene *scene;
+    QGraphicsScene scene;
+    bool showSudoError;
+    SettingsWidget settings;
     bool usePortrait();
 };