Files
RElicAnalysis/RElicAnalysis/dialogabout.cpp
T
2026-05-01 15:19:10 +02:00

82 lines
2.9 KiB
C++

#include "dialogabout.h"
DialogAbout::DialogAbout(): QDialog() {
setWindowTitle("About RElicAnalysis");
//setStyleSheet("QDialog::border: 1px solid #afafaf;");
QVBoxLayout *mainLayout = new QVBoxLayout;
QLabel *labelTitle = new QLabel("RElicAnalysis 0.1.0");
QFont fontTitle;
fontTitle.setPointSize(15);
fontTitle.setBold(true);
labelTitle->setFont(fontTitle);
mainLayout->addWidget(labelTitle);
QString basedOn = "Based on Qt " + QByteArray(QT_VERSION_STR);
QLabel *labelBasedOn = new QLabel(basedOn);
mainLayout->addWidget(labelBasedOn);
QLabel *labelAuthor = new QLabel("Author: Bucchino Geoffrey");
mainLayout->addWidget(labelAuthor);
QLabel *labelLicense = new QLabel("Under the licence GPL");
mainLayout->addWidget(labelLicense);
QLabel *labelWebsite = new QLabel("Visit https://cryptoshield.bucchino.org/ for more information");
mainLayout->addWidget(labelWebsite);
QHBoxLayout *layoutButtons = new QHBoxLayout;
QPushButton *buttonQuit = new QPushButton("Close");
buttonQuit->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
connect(buttonQuit, SIGNAL(clicked()), this, SLOT(close()));
layoutButtons->addStretch(1);
layoutButtons->addWidget(buttonQuit, 0, Qt::AlignRight);
mainLayout->addLayout(layoutButtons);
mainLayout->addStretch();
setLayout(mainLayout);
}
/*DialogAbout::DialogAbout() : QDialog() {
QVBoxLayout *layout = new QVBoxLayout;
// Informations
QGridLayout *layoutAbout = new QGridLayout;
QLabel *labelLeftName = new QLabel("Nom du programme");
QLabel *labelRightName = new QLabel("Editeur LaTex");
QLabel *labelLeftVersion = new QLabel("Version");
QLabel *labelRightVersion = new QLabel("1.0");
QLabel *labelLeftLicence = new QLabel("Licence");
QLabel *labelRightLicence = new QLabel("GPL");
QLabel *labelLeftAuthor= new QLabel("Auteur");
QLabel *labelRightAuthor = new QLabel("BUCCHINO Geoffrey");
QLabel *labelLeftURL = new QLabel("Adresse Internet");
QLabel *labelRightURL = new QLabel("www.geoffreybucchino.com");
layoutAbout->addWidget(labelLeftName, 0,0);
layoutAbout->addWidget(labelRightName, 0,1);
layoutAbout->addWidget(labelLeftVersion,1,0);
layoutAbout->addWidget(labelRightVersion,1,1);
layoutAbout->addWidget(labelLeftLicence,2,0);
layoutAbout->addWidget(labelRightLicence,2,1);
layoutAbout->addWidget(labelLeftAuthor,3,0);
layoutAbout->addWidget(labelRightAuthor, 3,1);
layoutAbout->addWidget(labelLeftURL,4,0);
layoutAbout->addWidget(labelRightURL,4,1);
// Button
QHBoxLayout *layoutButton = new QHBoxLayout;
layoutButton->setAlignment(Qt::AlignRight);
QPushButton *buttonOk = new QPushButton("Ok");
connect(buttonOk, SIGNAL(clicked()), this, SLOT(close()));
layoutButton->addWidget(buttonOk);
layout->addLayout(layoutAbout);
layout->addLayout(layoutButton);
setLayout(layout);
}*/