ui->setupUi(this);\r
settings = new QSettings(WILLEM_LIU, EASY_LIST);\r
\r
- /* Make a call every x milliseconds */\r
- QTimer *timer = new QTimer(this);\r
- connect(timer, SIGNAL(timeout()), this, SLOT(Keep_backlight_on()));\r
- timer->start(30000);\r
+ /* Make a call every x milliseconds */\r
+ timer = new QTimer(this);\r
+ connect(timer, SIGNAL(timeout()), this, SLOT(Keep_backlight_on()));\r
\r
requestWebpage = new RequestWebpage(this);\r
connect(requestWebpage, SIGNAL(finished(QNetworkReply*)), this, SLOT(slotSyncList(QNetworkReply*)));\r
aboutText.append(QDate::currentDate().toString("yyyy"));\r
aboutText.append("<br><br>");\r
aboutText.append("Created by Willem Liu.<br>");\r
+ aboutText.append("Thanks to Ade.<br>");\r
aboutText.append("Created with QtCreator.<br><br>");\r
aboutText.append("Please <a href='http://www.willemliu.nl/donate'>donate</a> any amount you deem this app is worthy to keep me going on.<br><br>");\r
aboutText.append("</body></html>");\r
void MainForm::on_actionKeep_backlight_on_triggered()\r
{\r
bool setBacklight = ui->actionKeep_backlight_on->isChecked();\r
+ if(setBacklight)\r
+ {\r
+ if(timer->isActive() == false)\r
+ {\r
+ timer->start(5000);\r
+ }\r
+ }\r
+ else\r
+ {\r
+ qDebug() << "Backlight: " << setBacklight;\r
+ timer->stop();\r
+ }\r
qDebug() << "Checked Backlight" << setBacklight;\r
settings->setValue(CHECKED_BACKLIGHT, setBacklight);\r
}\r
bool setBacklight = ui->actionKeep_backlight_on->isChecked();\r
if(setBacklight)\r
{\r
- /* qDebug() << "Backlight: " << setBacklight; */\r
+ qDebug() << "Backlight: " << setBacklight;\r
QString strUnlock = "dbus-send --system --type=method_call --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_display_blanking_pause";\r
QProcess::startDetached(strUnlock);\r
}\r