--- /dev/null
+<?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>
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;"));
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){
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){
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}));
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();
}
}
-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);
}
}
-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}));
-
- }
-}