X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=src%2Fmainwindow.h;h=93c39c5602b5e6ba77eb483c19905f781f1f5df4;hb=ce8836f797ca80b4b0bdf188ec00bd5bcfb55145;hp=91a0c29bb1012f72e467a158cff38d2a5f3ec5a8;hpb=952f28dc507ef04df1d546561a7d8c71f146e0b8;p=qcpufreq diff --git a/src/mainwindow.h b/src/mainwindow.h old mode 100755 new mode 100644 index 91a0c29..93c39c5 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -1,6 +1,6 @@ /* * QCPUFreq - a simple cpufreq GUI - * Copyright (C) 2010 Daniel Klaffenbach + * Copyright (C) 2010 Daniel Klaffenbach * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -21,6 +21,13 @@ #include #include +#include +#include +#include + +#include "helpwindow.h" +#include "loadpreset.h" +#include "settings.h" namespace Ui { class MainWindow; @@ -37,22 +44,49 @@ public: public slots: void about(); void adjustFreq(); + void applySettings(); + void loadPreset(QString presetName); void orientationChanged(); void refresh(); - void setAutoRotaion(); + void save(); + void setAdvancedTemperature(); + void setAutoRotation(); + void setSmartReflex(); + void showHelp(); + //void showLoadPresetDialog(); + void showSettings(); private: Ui::MainWindow *ui; + int callHelper( QString action, QString param ); + QString getCPUTemp(); int getMaxFreq(); int getMinFreq(); int getScalingFreq( int step ); QString getScalingGovernor(); int getScalingStep( int freq ); int getScalingSteps(); + int getSmartReflexState(); + //! The helper process + QProcess helperProcess; + //! The help window + HelpWindow helpWindow; + //! Initializes the application + void init(); + LoadPreset *loadPresetDialog; + int minFreq; QString readSysFile( QString sys_file ); + //! the timer for refreshing the UI + 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; + Settings *settings; bool usePortrait(); };