From: Norbert Moutarde Date: Tue, 15 Sep 2015 21:36:36 +0000 (+0200) Subject: added action("val ?") to get value on the go X-Git-Url: https://git.nothing2do.fr/?a=commitdiff_plain;h=a648963458f94b6dde644a5dcdfdeda86d8a5f60;p=diary-mobile.git added action("val ?") to get value on the go --- diff --git a/mainwindow.cpp b/mainwindow.cpp index b8ebae6..0b6e592 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -446,7 +446,12 @@ void MainWindow::action(const QString &a){ addWidget(QString("box "+tmpkeys[a]), new CLabel(tmpvalues[a], *conf)); if(deb)QMessageBox::information(this, QString("val"), QString(tmpkeys[a]+"=="+tmpvalues[a])); } - }else{ + }else if(b[2]=QString("?")){ + QString val; + val=QInputDialog::getText(this, "set", trUtf8("Variable's name ?", "text to ask value's name before changing it (set)"), QLineEdit::Normal, QString(""), &ok); + if(ok)action(QString("val"+b[1]+" "+val));S + } + else{ for(int a=0;a<((bs-1)/2); a++){ valeur->insert(b[(2*a)+1], b[(2*a)+2]); if(deb)QMessageBox::information(this, QString("val"), QString("val("+b[(2*a)+1]+")=="+b[(2*a)+2]));