X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=src%2Fmainwindow.h;h=8be058e531209763326b5061411b26c21ec3ad95;hb=1941cdfbeecd91428054170276d34196c5a6fdc3;hp=448aa53e04969fcf1449284faf61e38f3f3ef0bf;hpb=413d3e851aa5ddae729856c15af42a88201f4a85;p=qcpufreq diff --git a/src/mainwindow.h b/src/mainwindow.h old mode 100755 new mode 100644 index 448aa53..8be058e --- 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,12 @@ #include #include +#include +#include +#include + +#include "helpwindow.h" +#include "settingswidget.h" namespace Ui { class MainWindow; @@ -39,12 +45,17 @@ 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(); int getMinFreq(); @@ -53,9 +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; + //! 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(); };