-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathabout.cpp
More file actions
50 lines (42 loc) · 1.65 KB
/
about.cpp
File metadata and controls
50 lines (42 loc) · 1.65 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
#include "about.h"
#include "ui_about.h"
#include <QGraphicsDropShadowEffect>
#include <QApplication>
About::About(QDialog *parent)
: QDialog(parent), ui(new Ui::About)
{
ui->setupUi(this);
QPixmap pixmap("://icon/information.png");
pixmap = pixmap.scaled(ui->picture->size(), Qt::KeepAspectRatioByExpanding, Qt::SmoothTransformation);
QGraphicsDropShadowEffect *effect = new QGraphicsDropShadowEffect;
effect->setBlurRadius(10);
effect->setXOffset(5);
effect->setYOffset(5);
ui->picture->setPixmap(pixmap);
ui->picture->setGraphicsEffect(effect);
ui->Text->setGraphicsEffect(effect);
ui->picture->setAlignment(Qt::AlignCenter);
// we will use HTML to display the information
// couple thanks words, and other stuff
QString t = QString(
"<head/>"
"<html>"
"<body>"
"<h1 align=\"center\" style=\" margin-top:18px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">"
"<span style=\" font-size:xx-large; font-weight:700;\">About</span>"
"</h1>"
"<p align=\"center\"><span>Thank you for using our application</span></p>"
"<p align=\"center\"><span>This Program was built upon 20+ days of consistant Hardwork</span></p>"
"<p align=\"center\"><span>We hope you liked it</span></p>"
"<p align=\"center\"><span>-For more context check the readme file-</span></p>"
"<p align=\"center\"><span>Developed by: </span></p>"
"<p align=\"center\"><span>Manaa Mohaned</span></p>"
// done
"</body>"
"</html>");
ui->Text->setText(t);
}
About::~About()
{
delete ui;
}