]> git.nothing2do.fr Git - diary-mobile.git/commitdiff
added help->getbuttons,
authorNorbert Moutarde <norbert.moutarde@nothing2do.eu>
Tue, 8 Apr 2014 06:29:13 +0000 (08:29 +0200)
committerNorbert Moutarde <norbert.moutarde@nothing2do.eu>
Tue, 8 Apr 2014 06:29:13 +0000 (08:29 +0200)
mainwindow.cpp
mainwindow.h

index 35a2c92623a649e5b58a0bcb2e8998ee1b717ed7..d131ed697797eea6738a63f09decba39a5c01a0c 100644 (file)
@@ -166,7 +166,8 @@ void MainWindow::createMenuBar(){
     EditMenu->addAction(trUtf8("&View/Hide menu"), this, SLOT(toggleMenu()), QKeySequence(trUtf8("Ctrl+T", "Buttons|View menu")));
     menuBar()->addMenu(EditMenu);
     HelpMenu=new QMenu(QString("&Help"));
-    HelpMenu->addAction(trUtf8("nouvelle entré"), this, SLOT(entry()), QKeySequence());
+    HelpMenu->addAction(trUtf8("Nouvelle entré"), this, SLOT(entry()));
+    HelpMenu->addAction(trUtf8("getButtons"), this, SLOT(getButtons()), QKeySequence(""));
     HelpMenu->addAction(trUtf8("About Qt"), qApp, SLOT(aboutQt()), QKeySequence(tr("ctrl+H", "Help|About Qt")));
     EditMenu->addAction(trUtf8("C&reate Database"), this, SLOT(createDB()), QKeySequence(trUtf8("Ctrl+R", "Help|CreateDB")));
     menuBar()->addMenu(HelpMenu);
@@ -288,8 +289,8 @@ void MainWindow::entry(const QString &a){
     }
     context.append(way[way.size()-1]);
     //qDebug()<<"context="<<context;
-    if(a=="")label=time+" "+context+" : ";
-    else label=time+" "+context+", "+a+" : ";
+    if(a=="")label=" + ";
+    else label=a+" : ";
     entry=QInputDialog::getText(this, QString("nouvelle entrée"), label, QLineEdit::Normal, "", &ok);
     if(ok==0)return;
     QString c;
@@ -335,7 +336,8 @@ void MainWindow::addButtonDB(){
     return;
 }
 void MainWindow::getButtons(const QString &a){
-    if(a==conf->value(QString("start"), QVariant("begin")).toString())way.clear();
+    if(a==conf->value(QString("start")).toString())way.clear();
+
     qDebug()<<"getButtons("<<a<<") way.size()"<<way.size();
     flush();
     if(updatelocker.tryLock(60000))updatelocker.unlock();
@@ -542,3 +544,7 @@ void MainWindow::Uisent(){
 void MainWindow::resetRAW(){
     exec(QList<QString>({"delete from raw;"}));
 }
+void MainWindow::getButtons(){
+    const QString a=QInputDialog::getText(this, QString("getButtons"), QString("Entrez le mots-clé : "));
+    getButtons(a);
+}
index 2be71a8236f5944619d36965cf07dde58c3984d0..b29115fdd634538309c644f66609efd4c6d04e2b 100644 (file)
@@ -117,6 +117,7 @@ private slots:
     void writeDB();
     void editButtonDB();
     void getButtons(const QString &);
+    void getButtons();
     void downloadUi();
     void writeUi();
     void sendRAW();