]> git.nothing2do.fr Git - diary-mobile.git/commitdiff
added keyvolumeup and ...down to keyrelease event
authorNorbert Moutarde <norbert.moutarde@nothing2do.eu>
Tue, 29 Apr 2014 20:33:11 +0000 (22:33 +0200)
committerNorbert Moutarde <norbert.moutarde@nothing2do.eu>
Tue, 29 Apr 2014 20:33:11 +0000 (22:33 +0200)
mainwindow.cpp

index 798774b30eb98ae9411bbdb282465abd84580c67..fe3217d59b287b440983a4d53b2a0d91a8841448 100644 (file)
@@ -274,8 +274,8 @@ void MainWindow::firstrun(){
     conf->setValue(QString("download"), QVariant("http://www.nothing2do.eu/ui.sql"));
     conf->setValue(QString("uploadRAW"), QVariant("ftp://<user>:<pass>@<server>/raw"));
     conf->setValue(QString("uploadUi"), QVariant("ftp://<user>:<pass>@<server>/ui.sql"));
-    conf->setValue(QString("restore"), QVariant("http://www.abc.de/db"));
     conf->setValue(QString("start"), QVariant("begin"));
+    conf->setValue(QString("restore"), QVariant("http://www.abc.de/db"));
     conf->setValue(QString("db"), QVariant("/data/data/eu.nothing2do.diarymobile/files/db"));
     conf->setValue(QString("selectbuttons"), QVariant("select keyword,label,action from ui order by keyword;"));
     conf->setValue(QString("selectraw"), QVariant("select date,texte from raw;"));
@@ -467,6 +467,12 @@ void MainWindow::keyReleaseEvent(QKeyEvent *event)
         back();
         //accepted=false;// close the app next time when the user press back button
     }
+    else if(k==Qt::Key_VolumeDown){
+        action(conf->value(QString("volumdown")).toString());
+    }
+    else if(k==Qt::Key_VolumeUp){
+        action(conf->value(QString("volumup")).toString());
+    }
     //Qt::Key_VolumeDown Qt::Key_VolumeUp
 
 }