[qet] [4428] Improve AboutQET Widget |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/qet Archives
]
Revision: 4428
Author: scorpio810
Date: 2016-04-07 04:06:11 +0200 (Thu, 07 Apr 2016)
Log Message:
-----------
Improve AboutQET Widget
Modified Paths:
--------------
trunk/sources/aboutqet.cpp
trunk/sources/aboutqet.h
Modified: trunk/sources/aboutqet.cpp
===================================================================
--- trunk/sources/aboutqet.cpp 2016-04-07 01:24:54 UTC (rev 4427)
+++ trunk/sources/aboutqet.cpp 2016-04-07 02:06:11 UTC (rev 4428)
@@ -33,8 +33,7 @@
AboutQET::AboutQET(QWidget *parent) : QDialog(parent) {
// Titre, taille, comportement...
setWindowTitle(tr("À propos de QElectrotech", "window title"));
- setMinimumWidth(680);
- setMinimumHeight(600);
+ setFixedSize (690, 610);
setModal(true);
// Trois onglets
@@ -43,6 +42,7 @@
tabs -> addTab(authorsTab(), tr("A&uteurs", "tab title"));
tabs -> addTab(translatorsTab(), tr("&Traducteurs", "tab title"));
tabs -> addTab(contributorsTab(), tr("&Contributeurs", "tab title"));
+ tabs -> addTab(titleTab(), tr("&Version", "tab title"));
tabs -> addTab(licenseTab(), tr("&Accord de licence", "tab title"));
// Un bouton pour fermer la boite de dialogue
@@ -52,9 +52,7 @@
// Le tout dans une disposition verticale
QVBoxLayout *vlayout = new QVBoxLayout();
- vlayout -> addWidget(title());
vlayout -> addWidget(tabs);
- vlayout -> addWidget(buttons);
setLayout(vlayout);
QScrollArea* scrollArea = new QScrollArea(this);
@@ -74,11 +72,7 @@
/**
@return The title QElectroTech with its icon
*/
-QWidget *AboutQET::title() const {
- QWidget *icon_and_title = new QWidget();
- // icone
- QLabel *icon = new QLabel();
- icon -> setPixmap(QET::Icons::QETOxygenLogo.pixmap(48, 48));
+QWidget *AboutQET::titleTab() const {
// label "QElectroTech"
QLabel *title = new QLabel("<span style=\"font-weight:0;font-size:16pt;\">QElectroTech V " + QET::displayedVersion + "</span>");
QString compilation_info = "<br />" + tr("Compilation : ");
@@ -87,15 +81,10 @@
compilation_info += " - built with Qt " + QString(QT_VERSION_STR);
compilation_info += " - run with Qt "+ QString(qVersion());
#endif
+ title -> setAlignment(Qt::AlignCenter);
title -> setText(title->text() + compilation_info);
title -> setTextFormat(Qt::RichText);
-
- QHBoxLayout *hlayout = new QHBoxLayout();
- hlayout -> addWidget(icon);
- hlayout -> addWidget(title);
- hlayout -> addStretch();
- icon_and_title -> setLayout(hlayout);
- return(icon_and_title);
+ return(title);
}
/**
@@ -105,7 +94,7 @@
QLabel *about = new QLabel(
tr("QElectroTech, une application de réalisation de schémas électriques.", "about tab, description line") +
"<br><br>" +
- tr("2006-2015 Les développeurs de QElectroTech", "about tab, developers line") +
+ tr("2006-2016 Les développeurs de QElectroTech", "about tab, developers line") +
"<br><br>"
"<a href=\"http://qelectrotech.org/\">http://qelectrotech.org/</a>"
"<br><br>" +
Modified: trunk/sources/aboutqet.h
===================================================================
--- trunk/sources/aboutqet.h 2016-04-07 01:24:54 UTC (rev 4427)
+++ trunk/sources/aboutqet.h 2016-04-07 02:06:11 UTC (rev 4428)
@@ -35,7 +35,7 @@
// methods
private:
- QWidget *title() const;
+ QWidget *titleTab() const;
QWidget *aboutTab() const;
QWidget *authorsTab() const;
QWidget *translatorsTab() const;