grid->addWidget(a, c/maxc, c%maxc, 1, 1, Qt::AlignJustify| Qt::AlignVCenter | Qt::AlignHCenter);
QObject::connect(a, SIGNAL(released()), signalmap, SLOT(map()));
signalmap->setMapping(a, key);
-
+ if(c==(maxc*maxl)-1)return 1;
//p*(ml*mc)+c nombre de boutons en tout osef,
/* if((c==((maxc*maxl)-1))&&(!np)){
QList<QString> tmp({x, c});
label->setText(a);
exec(tmp);
- int labCol = 0;//r.indexOf("label");
- int actCol = 1;//r.indexOf("action");
- int i=0;
- qDebug()<<"bcl to add buttons";
- if(page){
- addWidget(QString("prevpage"), new CLabel(trUtf8("Prev."), *conf));
- }
- //grid->count()%(maxl*maxc)!=0) here
while(q->next()){
- int tmp=addWidget(q->value(actCol).toString(), new CLabel(q->value(labCol).toString(), *conf));
- if(tmp==1)break;
- i++;
- };
- grid->update();
- //scroll->updateGeometry();
- screen->updateGeometry();
- qDebug()<<"end getButtons : "<<i<<" button(s) way.size()"<<way.size()<<" page : "<<page;
+ printItem();
+ }
}
void MainWindow::chooseDB(){
QString b;
videoWidget = new QVideoWidget;
video->setVideoOutput(videoWidget);
- videoWidget->show();
grid->addWidget(videoWidget,0,0,1,-1);
connect(video, SIGNAL(videoAvailableChanged(bool)), video, SLOT(play()));
QList<QString> b({"delete from buttons;"});
exec(b);
}
-bool MainWindow::printItem(const QString & key, const CLabel * a){
+bool MainWindow::printItem(){
+ int labCol = 0;//r.indexOf("label");
+ int actCol = 1;//r.indexOf("action");
+ int i=0;
+ qDebug()<<"bcl to add buttons";
+ 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;
+ i++;
+ };
+ grid->update();
+ //scroll->updateGeometry();
+ screen->updateGeometry();
+ qDebug()<<"end getButtons : "<<i<<" button(s) way.size()"<<way.size()<<" page : "<<page;
}