-diary-mobile-android
+diary-mobile
====================
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 this soft is launched, it will ask an URL to download the buttons
-(read ui.sql to undertand what is expected).<br>
+(read ui.sql to understand 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]
todo :
-add autoupdate feature, and ...
+add autoupdate feature, buttons <URL> in action, and ...
}
const CLabel* MainWindow::addWidget(const QString &key, const CLabel *a){
qDebug()<<"addWidget("<<key<<")";
- int maxc=conf->value(QString("maxcolumn")).toInt();
- int maxl=conf->value(QString("maxline")).toInt();
int c=grid->count();
+ int maxc=conf->value(QString("maxcolumn")).toInt();
+ /*int maxl=conf->value(QString("maxline")).toInt();
if(c>=maxc*maxl){
QMessageBox::information(this, QString("lourd !"), QString("il y a trop de boutons sur cette page"));
return 0;
- }
+ }*/
grid->addWidget(a, c/maxc, c%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()));
conf->setValue(QString("updatebuttons"), QVariant("update ui set keyword=?, label=?, action=? where id=?;"));
conf->setValue(QString("deletebuttons"), 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("config"));
+ conf->setValue(QString("volumdown"), QVariant("back"));
conf->setValue(QString("volumup"), QVariant("begin"));
qDebug()<<"firstrun() finished";
}
if(a=="")c=context+" : "+entry;
else c=context+", "+a+" : "+entry;
QList<QString> d({"INSERT INTO raw (date, texte) VALUES (:date, :txt);", time, c});
- if(!exec(d))qDebug()<<"exec don't works (l370)";
+ if(!exec(d))qDebug()<<"exec don't works (entry(QString))";
QSqlError b=q->lastError();
if (b.isValid())qDebug()<<"q->lastError():"<<b.text();
}
}
void MainWindow::savButtons(){
exec(QList<QString> ({conf->value(QString("selectbuttons")).toString()}));
- QFile a(conf->value(QString("buttonfile"), QVariant("ui.sql")).toString());
- a.open(QIODevice::WriteOnly|QIODevice::Text);
- QTextStream b(&a);
- b<<conf->value("firstline", "INSERT INTO ui (keyword, label, action) VALUES(?, ?, ?);").toString()<<"\n";
+ QTextStream b;
+ b<<conf->value("firstline").toString()<<"\n";
while (q->next()) {
for (int i=0; i<2; i++){
b<<q->value(i).toString()<<"$";
}
b<<q->value(2).toString()<<"\n";
}
- a.close();
- qDebug()<<"a.open()="<<a.open(QIODevice::ReadOnly | QIODevice::Text);
QUrl upload(conf->value(QString("uploadUi")).toString());
net=new QNetworkAccessManager(this);
- rep=net->put(QNetworkRequest(upload), a.readAll());
+ rep=net->put(QNetworkRequest(upload), b.device());
qDebug()<<"net->put : "<<rep<< " upload : "<<upload.url();
connect(rep, SIGNAL(finished()), this, SLOT(Uisent()));
}