a GUI to use diary-shell on android (or computer, or IOS, or symbian,
or whatever Qt works on if you want, it's so Qt !)
-the first time you run this, you've only one buttons ("config"),
-so click on and on the new page, choose "download". Now you've to write
-the full path to get your full button file (don't forget the "http://"
-like me the first time).<br>
+The first time this soft is launched, it will ask an URL to download the buttons
+(read ui.sql to undertand what is expected).<br>
To upload in real time, you've to set the "upload" to a ftp server where
you've an account with syntax :
ftp://[user]:[pass]@[hostname]/[filename]
void MainWindow::quit(){
qDebug()<<"quit()";
conf->setValue(QString("menu"), menuBar()->isVisible());
+
//savButtons();
db.commit();
db.close();
int maxc=conf->value(QString("maxcolumn")).toInt();
int maxl=conf->value(QString("maxline")).toInt();
grid->addWidget(a, grid->count()/maxc, grid->count()%maxc, 1, 1, Qt::AlignJustify| Qt::AlignVCenter | Qt::AlignHCenter);
- //QObject::connect(a, SIGNAL(pressed()), signalmap, SLOT(map()));
- QObject::connect(a, SIGNAL(released()), signalmap, SLOT(map()));
+ QObject::connect(a, SIGNAL(pressed()), signalmap, SLOT(map()));
+ //QObject::connect(a, SIGNAL(released()), signalmap, SLOT(map()));
signalmap->setMapping(a, key);
return a;
}
conf->setValue(QString("db"), QVariant("/data/data/eu.nothing2do.diarymobile/files/db"));
conf->setValue(QString("selectbuttons"), QVariant("select keyword,label,action from ui;"));
conf->setValue(QString("selectraw"), QVariant("select date,texte from raw;"));
+ conf->setValue(QString("menu"), QVariant("menuback"));
}
QString &MainWindow::get(int row, int column){
q->seek(row);
if(a=="")c=context+" : "+entry;
else c=context+", "+a+" : "+entry;
//qDebug()<<"c="<<c;
- QFile fichier(conf->value(QString("file"), QVariant("raw")).toString());
- fichier.open(QIODevice::Append | QIODevice::Text);
- QTextStream flux(&fichier);
- flux << time << " " << c << endl;
- fichier.close();
QList<QString> d({"INSERT INTO raw (date, texte) VALUES (:date, :txt);", time, c});
exec(d);
QSqlError b=q->lastError();
b<<q->value(1).toString()<<"\n";
}
a.close();
- //QMessageBox::information(this, QString("end"), conf->value(QString("file")).toString());
+
qDebug()<<"a.open()="<<a.open(QIODevice::ReadOnly | QIODevice::Text);
QUrl upload(conf->value(QString("uploadRAW")).toString());
}
void MainWindow::back(){
flush();
- if(way.size()-1>0){
- addWidget(QString("quit"), new CLabel(QString("quitter"), conf->value(QString("button")).toString()));
- for(int i=0; i<way.size(); i++){
- addWidget(QString(way[i]), new CLabel(QString(way[i]), conf->value(QString("button")).toString()));
- }
+ getButtons(conf->value(QString("menu")).toString());
+ for(int i=0; i<way.size(); i++){
+ addWidget(QString(way[i]), new CLabel(QString(way[i]), conf->value(QString("button")).toString()));
}
- else {
- getButtons(conf->value(QString("start")).toString());
- //QMessageBox::information(this, QString("Erreur"), QString("Vous êtes déja au départ."));
- }
-
}
void MainWindow::keyReleaseEvent(QKeyEvent *event)
{
b<<q->value(2).toString()<<"\n";
}
a.close();
- QMessageBox::information(this, QString("end"), conf->value(QString("buttonfile"), QVariant("ui.sql")).toString());
qDebug()<<"a.open()="<<a.open(QIODevice::ReadOnly | QIODevice::Text);
QUrl upload(conf->value(QString("uploadUi")).toString());
net=new QNetworkAccessManager(this);