}
else if(b[0]==QString("sav")){
Msav.lock();
-
sav(c);
+
}
else if(b[0]==QString("back")){
if(way.size()>1){
for(int b=0; b<way.size()-1;b++){
qDebug()<<"way["<<b<<"]="<<way[b];
context.append(way[b]);
- context.append(" ");
+ context.append("<br>");
}
context.append(way.last());
if(a=="")label=context+" : ";
else label=context+", "+a+" : ";
- entry=QInputDialog::getText(this, trUtf8("New entry"), label, QLineEdit::Normal, "", &ok);
+ //entry=QInputDialog::getText(this, trUtf8("New entry"), label, QLineEdit::Normal, "", &ok);
+ entry=QInputDialog::getMultiLineText(this, trUtf8("New entry"), label, QString(""), &ok);
if(!ok)return;
QString c;
if(a=="")c=context+" : "+entry;
//count++;
key=q->value(1).toString()+" "+key;
}
- if(!key.contains(keyword))key=key+" "+keyword;// it is possible to have 2 buttons with same label and action ? I've sayd "no"
+ if(!key.contains(keyword)){// it isn't possible to have 2 buttons with same label and action
+ key=key+" "+keyword;
+
+ }else{
+ if(deb)QMessageBox::information(this, trUtf8("key.contain(keyword)", "box title to debug insert"), trUtf8("la chaine est déja dans le bouton"));
+ }
if(deb)QMessageBox::information(this, trUtf8("action", "box title to debug insert"), trUtf8("insert : key="+key.toLocal8Bit()+" label="+label.toLocal8Bit()+" action="+action.toLocal8Bit(), "label to debug insert"));
if(!id.isValid())exec(QList<QString>({conf->value(QString("add")+type).toString(), key, label, action}));
else{exec(QList<QString>({conf->value(QString("update")+type).toString(), key, label, action, id.toString()}));
int actCol = 1;//r.indexOf("action");
int i=0;
qDebug()<<"bcl to add buttons";
- if(page){
+ /*if(page){
addWidget(QString("prevpage"), new CLabel(trUtf8("Prev."), *conf));
- }
+ }*/
while(q->next()){
int tmp=addWidget(q->value(actCol).toString(), new CLabel(q->value(labCol).toString(), *conf));
- if(tmp==1)break;
+ //if(tmp==1)return 1;
i++;
};
grid->update();
//scroll->updateGeometry();
screen->updateGeometry();
+ return 0;
qDebug()<<"end getButtons : "<<i<<" button(s) way.size()"<<way.size()<<" page : "<<page;
}