}
else if(a.split(QString(" "))[0]=="new"){
QString b="";
- for(int c=0;c<way.size()-1;c++){
+ for(int c=0;c<way.size()-2;c++){
b+=way[c];
b+=" ";
};
b+=way.last();
- b+=" : ";
+ b+=", ";
b+=a.remove(0,4);
entry(b);
}
else return 0;
}
void MainWindow::entry(const QString &a){
- QString time=QDateTime::currentDateTime().toString(QString("yyyy-MM-dd hh:mm:ss")), entry="";
+ QString label, time=QDateTime::currentDateTime().toString(QString("yyyy-MM-dd hh:mm:ss")), entry="";
bool ok=0;
-
- entry=QInputDialog::getText(this, QString("nouvelle entrée"), a, QLineEdit::Normal, "", &ok);
+ if(a=="")label=time+" : ";
+ else label=time+", "+a+" : ";
+ entry=QInputDialog::getText(this, QString("nouvelle entrée"), label, QLineEdit::Normal, "", &ok);
if(ok==0)return;
- QString c=time+" "+entry;
+ QString c=label+entry;
QFile fichier(conf->value(QString("file")).toString());
fichier.open(QIODevice::Append | QIODevice::Text);
QTextStream flux(&fichier);
- flux << c << endl;
+ flux << time << c << endl;
fichier.close();
QList<QString> d({"INSERT INTO raw (date, texte) VALUES (:date, :txt);"});
d.append(time);
- d.append(entry);
+ d.append(c);
exec(d);
//sql.unlock();
QSqlError b=q->lastError();
a+=" ";
}
a+=way.last();
- a.chop(1);
+ //a.chop(1);
b=a+" "+b;
a=QInputDialog::getText(this, QString("keyword"), QString("Entrez ses mots clé (no limit !)"), QLineEdit::Normal, cur, &ok);
if ((a=="")||(ok==0))return;
INSERT INTO ui (keyword, label, action) VALUES(?, ?, ?);
-begin$new$new
-begin$config$config
-begin$odysseum$odysseum
-odysseum$oliver's pub$oliver's pub
-odysseum$gaumont$odysseum-gaumont
-odysseum$subway$odysseum-subway
-oliver's pub$audrey$audrey zanella
-oliver's pub$chloé$chloé EN
-oliver's pub$clochette$odysseum oliver's pub chloé
-oliver's pub$valentine$odysseum oliver's pub valentine
-audrey zanella$Pourquoi vous me prenez pour un perver ?$begi-olive-audre-perver
-begi-lie-olive-audre-perver$"On ne te prends pas pour un perver."$begi-olive-audre-perve-non
-begi-lie-olive-audre-perve-non$Pourquoi vous refusez qu'on se voit hors d'ici alors ?$begi-olive-audre-perve-non-hors
config$max column$setint maxcolumn
config$host$settext host
config$port$setint port