]> git.nothing2do.fr Git - diary-mobile.git/commitdiff
when an action contains "idem", it is changed by the label of the
authorNorbert Moutarde <norbert.moutarde@nothing2do.eu>
Wed, 22 Oct 2014 19:32:50 +0000 (21:32 +0200)
committerNorbert Moutarde <norbert.moutarde@nothing2do.eu>
Wed, 22 Oct 2014 19:32:50 +0000 (21:32 +0200)
buttons (proud of that altought it was easy to implement)

mainwindow.cpp

index c7cb90ad76e53c66b8f71eeb5e29b81553ebfd87..01b69232ef30cb3bc9b3c6644013fe68bc58451a 100644 (file)
@@ -151,6 +151,9 @@ void MainWindow::quit(){
 }
 const CLabel* MainWindow::addWidget(const QString &key, const CLabel *a){
     qDebug()<<"addWidget("<<key<<")";
+    if(key.contains(QString("idem"))){
+        key.replace(QString("idem"), a->text());
+    }
     int c=grid->count();
     int maxc=conf->value(QString("maxcolumn")).toInt();
     grid->addWidget(a, c/maxc, c%maxc, 1, 1, Qt::AlignJustify| Qt::AlignVCenter | Qt::AlignHCenter);