#include #include #include #include #include #include "Informations.hpp" Informations::Informations (QString &ftl, QString &fts):QMainWindow(),fileToLoad(ftl), fileToSave(fts) { setWindowTitle (tr ("DSL - Draw Strength Line")); QWidget *central= new QWidget(this); setCentralWidget (central); QVBoxLayout *layoutV = new QVBoxLayout(central); central->setLayout(layoutV); // First line of the interface QHBoxLayout *layoutH1 = new QHBoxLayout(central); layoutV->addLayout(layoutH1); nameL = new QLabel("Nom : ", central); layoutH1->addWidget(nameL); nameT = new QTextEdit(central); layoutH1->addWidget(nameT); // Second line of the interface QHBoxLayout *layoutH2 = new QHBoxLayout(central); layoutV->addLayout(layoutH2); surnameL = new QLabel("Prénom : ", central); layoutH2->addWidget(surnameL); surnameT = new QTextEdit(central); layoutH2->addWidget(surnameT); readyB = new QPushButton("Prêt !"); connect(readyB, SIGNAL(clicked(bool)), this, SLOT(ready())); layoutV->addWidget(readyB); } void Informations::ready(){ qDebug() << "Je suis prêt" << Qt::endl; fileToLoad = "filetoLoad.json"; fileToSave = "fileToSave.json"; close(); }