flush();
QStringList tmp=conf->allKeys();
for(int a=0; a<tmp.size();a++){
- CLabel * b=new CLabel(tmp[a]);
- addWidget(tmp[a], b);
+ //CLabel * b=new CLabel(tmp[a]);
+ addWidget(tmp[a], new CLabel(tmp[a]));
}
FileMenu=new QMenu(QString("&File"), this);
FileMenu->addAction(trUtf8("&Start..."), this, SLOT(start()),QKeySequence(trUtf8("Ctrl+S", "Start")));
FileMenu->addAction(trUtf8("&Back"), this, SLOT(back()),QKeySequence(trUtf8("Ctrl+B", "Back")));
- FileMenu->addAction(trUtf8("&Download"), this, SLOT(updateUi()),QKeySequence(trUtf8("Ctrl+D", "Downlad")));
+ FileMenu->addAction(trUtf8("&Download"), this, SLOT(updateUi()),QKeySequence(trUtf8("Ctrl+W", "Downlad")));
FileMenu->addAction(trUtf8("Up&load"), this, SLOT(sendUi()),QKeySequence(trUtf8("Ctrl+L", "Upload")));
FileMenu->addAction(trUtf8("&Quit..."), this, SLOT(quit()),QKeySequence(trUtf8("Ctrl+Q", "Quit")));
menuBar()->addMenu(FileMenu);
EditMenu->addAction(trUtf8("Sa&v buttons"), this, SLOT(savButtons()), QKeySequence(trUtf8("Ctrl+V", "Buttons|Save")));
EditMenu->addAction(trUtf8("&Edit buttons"), this, SLOT(editButtonDB()), QKeySequence(trUtf8("Ctrl+E", "Buttons|&Edit")));
EditMenu->addAction(trUtf8("&View/Hide menu"), this, SLOT(toggleMenu()), QKeySequence(trUtf8("Ctrl+T", "Buttons|View menu")));
- EditMenu->addAction(trUtf8("Re&set database"), this, SLOT(resetDB()), QKeySequence(trUtf8("Ctrl+S", "Buttons|ResetDB")));
+ EditMenu->addAction(trUtf8("Reset database"), this, SLOT(resetDB()), QKeySequence(trUtf8("Ctrl+Z", "Buttons|ResetDB")));
menuBar()->addMenu(EditMenu);
HelpMenu=new QMenu(QString("&Help"));
HelpMenu->addAction(tr("About Qt"), qApp, SLOT(aboutQt()), QKeySequence(tr("ctrl+H", "About Qt")));
for(int i=0;i<way.size(); i++){
a+=way[i];
a.chop(1);
- a+=" ";
+ a+="_";
qDebug()<<"a="<<a<<" i="<<i;
}
b=QInputDialog::getText(this, QString("keyword"), QString("Entrez ses mots clé (no limit !)"), QLineEdit::Normal, cur, &ok);
qDebug()<<"sendUi() : "<<conf->value(QString("upload")).toString();
QUrl upload(conf->value(QString("upload")).toString());
net=new QNetworkAccessManager(this);
- //qDebug()<<"net->put : "<<net->put(QNetworkRequest(upload), data);
- rep=net->put(QNetworkRequest(upload),data);
- connect(rep, SIGNAL(finished(QNetworkReply&)), this, SLOT(datasend(QNetworkReply&)));
+ rep=net->put(QNetworkRequest(upload), data);
+ qDebug()<<"net->put : "<<rep;
+ //rep=net->put(QNetworkRequest(upload),data);
+ connect(rep, SIGNAL(finished()), this, SLOT(datasend()));
}
void MainWindow::back(){
flush();
data=in;
emit datafilled();
}
-void MainWindow::datasend(QNetworkReply *a){
+void MainWindow::datasend(){
+ qDebug()<<"datasend";
+ QString texte="Update finish"/*, s=m->downloadedData().size()*/;
+ //texte=texte+s.toInt()+" byte)";
+ qDebug()<<"texte : "<<texte;
- qDebug()<<"data send :"<<m->downloadedData().size()<<" byte.";
+ QMessageBox::information(this, "update", texte);
}
void MainWindow::resetDB(){
exec(QList<QString>({"delete from ui;"}));