ui: updated about window

This commit is contained in:
Eberhard Graether
2015-12-02 14:52:54 +01:00
parent 04196db81d
commit fb7113917d
5 changed files with 93 additions and 23 deletions
+23
View File
@@ -0,0 +1,23 @@
* {
color: white;
font-size: 12px;
font-weight: 100;
}
#small {
font-size: 12px;
}
#closeButton {
background: transparent;
border: none;
color: white;
font-size: 14pt;
height: 20px;
width: 20px;
}
#closeButton:hover {
border: 2px solid white;
border-radius: 10px;
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

+70 -21
View File
@@ -3,7 +3,11 @@
#include <QFormLayout>
#include <QLineEdit>
#include <QLabel>
#include <QHBoxLayout>
#include <QVBoxLayout>
#include "qt/utility/QtDeviceScaledPixmap.h"
#include "qt/utility/utilityQt.h"
#include "utility/Version.h"
QtAbout::QtAbout(QWidget *parent)
@@ -14,39 +18,84 @@ QtAbout::QtAbout(QWidget *parent)
QSize QtAbout::sizeHint() const
{
return QSize(500,500);
return QSize(370, 550);
}
void QtAbout::setup()
{
setupForm();
m_window->setStyleSheet(
m_window->styleSheet() +
"#SettingWindow { "
"background: qlineargradient( x1:0 y1:0.4, x2:0 y2:1, stop:0 #2F3F86, stop:1 #1C7BBC );"
"border: none;"
"}"
);
updateTitle("About Coati");
updateDoneButton("Ok");
hideCancelButton(true);
}
setStyleSheet(utility::getStyleSheet("data/gui/about/about.css").c_str());
QtDeviceScaledPixmap coatiLogo("data/gui/about/logo.png");
coatiLogo.scaleToWidth(180);
QLabel* coatiLogoLabel = new QLabel(this);
coatiLogoLabel->setPixmap(coatiLogo.pixmap());
coatiLogoLabel->resize(coatiLogo.width(), coatiLogo.height());
coatiLogoLabel->move(8, 20);
QLabel* versionLabel = new QLabel(("Version " + Version::getApplicationVersion().toDisplayString()).c_str(), this);
versionLabel->move(210, 181);
QLabel* developerTitle = new QLabel("Developed by:", this);
developerTitle->move(30, 220);
QLabel* companyLabel = new QLabel(
"Coati Software OG\n"
"Schlossallee 7/1\n"
"5412 Puch bei Hallein\n"
"Austria\n"
"support@coati.io\n",
this
);
companyLabel->move(210, 250);
void QtAbout::populateForm(QFormLayout* layout)
{
QLabel* developerName = new QLabel("Developed by:");
developerName->setAlignment(Qt::AlignTop);
QLabel* developerLabel = new QLabel(
"Manuel Dobusch\n"
"Eberhard Gräther\n"
"Malte Langkabel\n"
"Victoria Pfausler\n"
"Andreas Stallinger\n");
developerLabel->setAlignment(Qt::AlignTop);
layout->addRow(developerName, developerLabel);
"Viktoria Pfausler\n"
"Andreas Stallinger\n",
this
);
developerLabel->move(30, 250);
QLabel* acknowledgementsName = new QLabel("Acknowledgements:");
acknowledgementsName->setAlignment(Qt::AlignTop);
QLabel* acknowledgementsLabel = new QLabel("Coati 0.1 was created in the context of education at the University of Applied Sciences Salzburg\n");
acknowledgementsLabel->setWordWrap(true);
acknowledgementsLabel->setAlignment(Qt::AlignTop);
layout->addRow(acknowledgementsName, acknowledgementsLabel);
QLabel* acknowledgementsTitle = new QLabel("Acknowledgements:", this);
acknowledgementsTitle->setObjectName("small");
acknowledgementsTitle->move(30, 355);
layout->addRow(QString("Version:"), new QLabel(Version::getApplicationVersion().toDisplayString().c_str()));
QLabel* acknowledgementsLabel = new QLabel(
"Coati 0.1 was created in the context of education at",
this
);
acknowledgementsLabel->setObjectName("small");
acknowledgementsLabel->move(30, 385);
QtDeviceScaledPixmap fhsLogo("data/gui/about/logo_fhs.png");
fhsLogo.scaleToWidth(150);
QLabel* fhsLabel = new QLabel(this);
fhsLabel->setPixmap(fhsLogo.pixmap());
fhsLabel->resize(fhsLogo.width(), fhsLogo.height());
fhsLabel->move(115, 410);
QLabel* acknowledgementsLabel2 = new QLabel(
"Coati Software OG takes part in the Startup Salzburg\ninitiative.",
this
);
acknowledgementsLabel2->setObjectName("small");
acknowledgementsLabel2->move(30, 465);
QPushButton* closeButton = new QPushButton("X", this);
closeButton->setObjectName("closeButton");
closeButton->move(320, 20);
connect(closeButton, SIGNAL(clicked()), this, SLOT(handleDoneButtonPress()));
}
void QtAbout::handleCancelButtonPress()
-2
View File
@@ -16,8 +16,6 @@ public:
QSize sizeHint() const Q_DECL_OVERRIDE;
virtual void setup() override;
protected:
virtual void populateForm(QFormLayout* layout) override;
private slots:
void handleCancelButtonPress();