]> git.nothing2do.fr Git - diary-mobile.git/commitdiff
almost nothing
authorNorbert Moutarde <norbert.moutarde@nothing2do.eu>
Tue, 5 Jul 2016 19:41:32 +0000 (21:41 +0200)
committerNorbert Moutarde <norbert.moutarde@nothing2do.eu>
Tue, 5 Jul 2016 19:41:32 +0000 (21:41 +0200)
android/AndroidManifest.xml
mainwindow.cpp

index 9d6e77a806bcf9a300f592445799f208c7d0c469..8332b8519e3c3a53773e24e5e83d17d5a506716a 100644 (file)
@@ -34,7 +34,7 @@
             <!-- Splash screen -->
         </activity>
     </application>
-    <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="21"/>
+    <uses-sdk android:minSdkVersion="16" android:targetSdkVersion="23"/>
     <supports-screens android:largeScreens="true" android:normalScreens="true" android:anyDensity="true" android:smallScreens="true"/>
 
     <!-- The following comment will be replaced upon deployment with default permissions based on the dependencies of the application.
index 7f1477d8e7aed00e9d8db26c9a5bcd5e846df97e..1e9511b740c7be37a030c0550473be8acb2397e6 100644 (file)
@@ -71,7 +71,8 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
     setCentralWidget(screen);
     createMenuBar();
     connectDB();
-    showFullScreen();
+    screen->showFullScreen();
+    resizeEvent();
     if((conf->value(QString("first")).toInt()==1)){
         qDebug()<<"second";
         bool ok;
@@ -889,7 +890,7 @@ void MainWindow::back(){
 }
 void MainWindow::keyReleaseEvent(QKeyEvent *event)
 {
-    static bool accepted=false;
+    static bool accepted=true;
 
     int k=event->key();
     QString tmp;
@@ -897,8 +898,8 @@ void MainWindow::keyReleaseEvent(QKeyEvent *event)
     qDebug()<<"key released="<<k;
     if(deb)QMessageBox::information(this, trUtf8("key released", "box title to debug keyReleaseEvent"), "key : "+tmp);
     if (k==Qt::Key_Menu){
-        const QString a=conf->value(QString("actionmenu")).toString();
-        if(a!="")accepted=true;
+        const QString a=conf->value(QString("actionmenu"), QString("")).toString();
+        if(a=="")accepted++;
         if(a!=lastprint){
             beforekey=lastprint;
             action(a);
@@ -907,7 +908,7 @@ void MainWindow::keyReleaseEvent(QKeyEvent *event)
         };
     }else if(k==Qt::Key_Back){
         const QString a=conf->value(QString("menuback"), QString("")).toString();
-        if(a!="")accepted=true;
+        if(a!="")accepted++;
         if(a!=lastprint){
             beforekey=lastprint;
             action(a);
@@ -916,8 +917,8 @@ void MainWindow::keyReleaseEvent(QKeyEvent *event)
         };
     }else if(k==Qt::Key_VolumeDown){
         qDebug()<<"keyvolumdown";
-        const QString a=conf->value(QString("volumdown")).toString();
-        if(a!="")accepted=true;
+        const QString a=conf->value(QString("volumdown"), QString("")).toString();
+        if(a!="")accepted++;
         if(a!=lastprint){
             beforekey=lastprint;
             action(a);
@@ -925,8 +926,8 @@ void MainWindow::keyReleaseEvent(QKeyEvent *event)
             action(beforekey);
         };
     }else if(k==Qt::Key_VolumeUp){
-        const QString a=conf->value(QString("volumup")).toString();
-        if(a!="")accepted=true;
+        const QString a=conf->value(QString("volumup"), QString("")).toString();
+        if(a!="")accepted++;
         if(a!=lastprint){
             beforekey=lastprint;
             action(a);