]> git.nothing2do.fr Git - diary-mobile.git/commitdiff
mistake again ...
authorNorbert Moutarde <norbert.moutarde@nothing2do.eu>
Wed, 28 May 2014 09:16:36 +0000 (11:16 +0200)
committerNorbert Moutarde <norbert.moutarde@nothing2do.eu>
Wed, 28 May 2014 09:16:36 +0000 (11:16 +0200)
README.md
android/AndroidManifest.xml [new file with mode: 0644]
diary-mobile.pro
jean_victor_balin_book.png [new file with mode: 0644]
mainwindow.cpp

index 5ab6559b3e13eb18eea38caab315aa55e7572b1a..cd3e00be1d4c75e0b67047e4ae06822e6b360b0c 100644 (file)
--- a/README.md
+++ b/README.md
@@ -12,4 +12,4 @@ ftp://[user]:[pass]@[hostname]/[filename]
 
 todo :
 
-add autoupdate feature, buttons <URL> in action, and ...
+add autoupdate feature, and ...
diff --git a/android/AndroidManifest.xml b/android/AndroidManifest.xml
new file mode 100644 (file)
index 0000000..e4b8cda
--- /dev/null
@@ -0,0 +1,48 @@
+<?xml version="1.0"?>
+<manifest package="eu.nothing2do.diarymobile" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="0.2" android:versionCode="1" android:installLocation="auto">
+    <application android:hardwareAccelerated="true" android:name="org.qtproject.qt5.android.bindings.QtApplication" android:label="diary-mobile" android:icon="@drawable/icon">
+        <activity android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|locale|fontScale|keyboard|keyboardHidden|navigation" android:name="org.qtproject.qt5.android.bindings.QtActivity" android:label="@string/app_name" android:screenOrientation="unspecified" android:launchMode="singleTop">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN"/>
+                <category android:name="android.intent.category.LAUNCHER"/>
+            </intent-filter>
+            <meta-data android:name="android.app.lib_name" android:value="diary-mobile"/>
+            <meta-data android:name="android.app.qt_sources_resource_id" android:resource="@array/qt_sources"/>
+            <meta-data android:name="android.app.repository" android:value="default"/>
+            <meta-data android:name="android.app.qt_libs_resource_id" android:resource="@array/qt_libs"/>
+            <meta-data android:name="android.app.bundled_libs_resource_id" android:resource="@array/bundled_libs"/>
+            <!-- Deploy Qt libs as part of package -->
+            <meta-data android:name="android.app.bundle_local_qt_libs" android:value="-- %%BUNDLE_LOCAL_QT_LIBS%% --"/>
+            <meta-data android:name="android.app.bundled_in_lib_resource_id" android:resource="@array/bundled_in_lib"/>
+            <meta-data android:name="android.app.bundled_in_assets_resource_id" android:resource="@array/bundled_in_assets"/>
+            <!-- Run with local libs -->
+            <meta-data android:name="android.app.use_local_qt_libs" android:value="-- %%USE_LOCAL_QT_LIBS%% --"/>
+            <meta-data android:name="android.app.libs_prefix" android:value="/data/local/tmp/qt/"/>
+            <meta-data android:name="android.app.load_local_libs" android:value="-- %%INSERT_LOCAL_LIBS%% --"/>
+            <meta-data android:name="android.app.load_local_jars" android:value="-- %%INSERT_LOCAL_JARS%% --"/>
+            <meta-data android:name="android.app.static_init_classes" android:value="-- %%INSERT_INIT_CLASSES%% --"/>
+            <!--  Messages maps -->
+            <meta-data android:value="@string/ministro_not_found_msg" android:name="android.app.ministro_not_found_msg"/>
+            <meta-data android:value="@string/ministro_needed_msg" android:name="android.app.ministro_needed_msg"/>
+            <meta-data android:value="@string/fatal_error_msg" android:name="android.app.fatal_error_msg"/>
+            <!--  Messages maps -->
+
+            <!-- Splash screen -->
+            <!--
+            <meta-data android:name="android.app.splash_screen_drawable" android:resource="@drawable/logo"/>
+            -->
+            <!-- Splash screen -->
+        </activity>
+    </application>
+    <uses-sdk android:minSdkVersion="11" android:targetSdkVersion="17"/>
+    <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.
+         Remove the comment if you do not require these default permissions. -->
+    <!-- %%INSERT_PERMISSIONS -->
+
+    <!-- The following comment will be replaced upon deployment with default features based on the dependencies of the application.
+         Remove the comment if you do not require these default features. -->
+    <!-- %%INSERT_FEATURES -->
+
+</manifest>
index 8979512cec5fbb126662dcaac6e6c380eeee96da..c683f3ea2ef12ef22a9ca7802a2e66649fa4e567 100644 (file)
@@ -32,6 +32,8 @@ ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android
 OTHER_FILES += \
     android/AndroidManifest.xml \
     ui.sql \
-    README.md
+    README.md \
+    android/AndroidManifest.xml \
+    jean_victor_balin_book.png
 
 ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android
diff --git a/jean_victor_balin_book.png b/jean_victor_balin_book.png
new file mode 100644 (file)
index 0000000..e8902f5
Binary files /dev/null and b/jean_victor_balin_book.png differ
index 6919dd7eb386a691b74e034aed1d891ed1017070..3e7515c7d990236cf05fd26347351a45c3d4ce55 100644 (file)
@@ -350,12 +350,12 @@ void MainWindow::firstrun(){
     conf->setValue(QString("maxcolumn"), QVariant(2));
     conf->setValue(QString("maxline"), QVariant(5));
     conf->setValue(QString("SQLsettings"), QVariant("connect_timeout=10000"));
-    conf->setValue(QString("button"), QVariant("background-color: yellow;border-style: outset;border-width: 7px;border-radius: 10px;border-color: beige;font: bold 15px;padding: 6px;"));
+    conf->setValue(QString("button"), QVariant("background-color: red;border-style: outset;border-width: 7px;border-radius: 10px;border-color: beige;font: bold 15px;padding: 6px;"));
     conf->setValue(QString("menu"), QVariant(1));
-    conf->setValue(QString("download"), QVariant("http://gaby:sha1sum@www.nothing2do.eu/diary/ui.sql"));
-    conf->setValue(QString("uploadRAW"), QVariant("ftp://nothing2do.eu_diary:200386@ftp.alwaysdata.com/raw"));
-    conf->setValue(QString("uploadUi"), QVariant("ftp://nothing2do.eu_diary:200386@ftp.alwaysdata.com/ui.sql"));
-    conf->setValue(QString("start"), QVariant("Montpellier"));
+    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("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 label;"));
@@ -369,11 +369,7 @@ void MainWindow::firstrun(){
     conf->setValue(QString("deletebutton"), QVariant("delete from ui where id=?"));
     conf->setValue(QString("testbuttons"), QVariant("select id,keyword from ui where label=? and action=?;"));
     conf->setValue(QString("volumdown"), QVariant("back"));
-<<<<<<< HEAD
     conf->setValue(QString("volumup"), QVariant("Montpellier"));
-=======
-    conf->setValue(QString("volumup"), QVariant("begin"));
->>>>>>> 388baafb8a2a686f467cd1605a7ba5037fb1fe0c
     qDebug()<<"firstrun() finished";
 }
 QString &MainWindow::get(int row, int column){
@@ -434,7 +430,7 @@ void MainWindow::addButtonDB(){
     if ((b=="")||(ok==0))return;
     a=QInputDialog::getText(this, QString("action"), QString("Entrez son action"), QLineEdit::Normal, c, &ok);
     if ((a=="")||(ok==0))return;
-    insertbutton(b, c, a);
+    insertButton(b, c, a);
     return;
 }
 void MainWindow::getButtons(const QString &b){
@@ -491,7 +487,7 @@ void MainWindow::editButtonDB(const QString & a){
     if(!ok)return;
     if((keyword=="")||(label=="")||(action=="")){
         //exec(QList<QString>({conf->value(QString("deletebuttons")).toString(), a}));
-        removebutton(keyword, label, action);
+        removeButton(keyword, label, action);
         return;
         }
     exec(QList<QString>({conf->value(QString("updatebuttons")).toString(), keyword, label, action, a}));
@@ -609,42 +605,6 @@ void MainWindow::readButtons(const QByteArray &in){
         qDebug()<<"q->exec() : "<<q->exec()<<" lastError()="<<q->lastError();
 
     };
-<<<<<<< HEAD
-=======
-
-    /*QDomDocument a("buttons");
-    if (!a.setContent(in)){
-            qDebug()<<"a.setcontent failed";
-            return;
-    }
-    QDomElement root = a.documentElement();
-    QDomNode n = root.firstChild();
-    QList<QString> cmd;
-    while(!n.isNull()) {
-        QDomNode e = n.firstChild();
-        //if((cmd.size()<1)&&(n.isText()))e.toText().nodeValue();
-        qDebug()<<"n.nodeName()="<<n.nodeName()<<" e.nodevalue="<<qPrintable(e.nodeValue());
-        if(e.nodeName()=="sql"){
-            cmd.insert(0, e.nodeValue());
-            qDebug()<<"cmd[0]="<<cmd[0];
-            }
-        else if(e.nodeName()=="b"){
-            QDomNode f=e.firstChild();
-            while(!f.isNull()){
-                qDebug()<<"f.nodeName()="<<f.nodeName()<<" e.nodeValue()="<<qPrintable(e.nodeValue())<<" e.nodeType()="<<e.nodeType();
-                f=f.nextSibling();
-            }
-        }
-        while(!e.isNull()){
-            qDebug()<<"e.nodeName = "<<e.nodeName()<<" e.nodevalue="<<e.nodeValue();
-
-            e=e.nextSibling();
-
-            }
-        n=n.nextSibling();
-        }*/
-
->>>>>>> 388baafb8a2a686f467cd1605a7ba5037fb1fe0c
     db.commit();
     flush();
     emit datafilled();
@@ -726,7 +686,7 @@ void MainWindow::insertButton(const QString & keyword, const QString & label, co
 
     }
 }
-void MainWindow::removebutton(const QString & keyword, const QString &label, const QString &action){
+void MainWindow::removeButton(const QString & keyword, const QString &label, const QString &action){
     QList<QString> tmp;
     tmp.append(conf->value(QString("testbuttons")).toString());
     tmp.append(label);
@@ -746,23 +706,3 @@ void MainWindow::removebutton(const QString & keyword, const QString &label, con
 
     }
 }
-void MainWindow::removeButton(const QString & keyword, const QString & label, const QString &action){
-    QList<QString> tmp;
-    tmp.append(conf->value(QString("testbuttons")).toString());
-    tmp.append(label);
-    tmp.append(action);
-    exec(tmp);
-    q->first();
-    int count=0;
-    QString key=keyword, id=q->value(0).toString();
-    while(q->isValid()){
-        count++;
-        QString cur=q->value(1).toString();
-        if(key!=cur)key=key+" "+cur;
-        q->next();
-    }
-    if(count==1)exec(QList<QString>({conf->value(QString("deletebuttons")).toString(), id}));
-    else{exec(QList<QString>({conf->value(QString("updatebuttons")).toString(), key, label, action, id}));
-
-    }
-}