-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathAbout.cpp
More file actions
63 lines (49 loc) · 2.09 KB
/
About.cpp
File metadata and controls
63 lines (49 loc) · 2.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#include "About.h"
#include <QtWidgets>
About::About(QWidget *parent) :
QWidget(parent)
{
this->setFixedHeight(300);
this->setFixedWidth(500);
QHBoxLayout* mainLayout = new QHBoxLayout(this);
QVBoxLayout* leftLayout = new QVBoxLayout(this);
QVBoxLayout* rightLayout = new QVBoxLayout(this);
QLabel* title = new QLabel("CometFTP 0.0.1");
QLabel* build = new QLabel("Built on Windows using MinGW 4.8");
QLabel* license = new QLabel("Licensed under GPL v3.0");
QLabel* thanks = new QLabel("Powered by Qt 5.2.0, Libssh and OpenSSL");
QLabel* icons = new QLabel("Some Icons licensed under CC by flaticon.com. Author: Appzgear");
QLabel* warranty = new QLabel("The program is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.");
warranty->setWordWrap(true);
icons->setWordWrap(true);
QImage qt = QImage(":/images/qt-logo.png");
QImage libssh = QImage(":/images/libssh-logo.png");
QImage openssl = QImage(":/images/openssl-logo.png");
QPixmap qtMap = QPixmap::fromImage(qt);
QPixmap libsshMap = QPixmap::fromImage(libssh);
QPixmap opensslMap = QPixmap::fromImage(openssl);
qtMap = qtMap.scaledToWidth(50);
libsshMap = libsshMap.scaledToWidth(100);
opensslMap = opensslMap.scaledToWidth(100);
QLabel* qtLbl = new QLabel();
QLabel* libsshLbl = new QLabel();
QLabel* opensslLbl = new QLabel();
qtLbl->setPixmap(qtMap);
libsshLbl->setPixmap(libsshMap);
opensslLbl->setPixmap(opensslMap);
qtLbl->setFixedWidth(50);
libsshLbl->setFixedWidth(100);
opensslLbl->setFixedWidth(100);
leftLayout->addWidget(qtLbl);
leftLayout->addWidget(libsshLbl);
leftLayout->addWidget(opensslLbl);
rightLayout->addWidget(title);
rightLayout->addWidget(build);
rightLayout->addWidget(license);
rightLayout->addWidget(icons);
rightLayout->addWidget(thanks);
rightLayout->addWidget(warranty);
mainLayout->addLayout(leftLayout);
mainLayout->addLayout(rightLayout);
this->setLayout(mainLayout);
}