forked from leuat/TRSE
-
Notifications
You must be signed in to change notification settings - Fork 0
/
formtutorialitem.cpp
55 lines (49 loc) · 1.25 KB
/
formtutorialitem.cpp
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
#include "formtutorialitem.h"
#include "ui_formtutorialitem.h"
FormTutorialItem::FormTutorialItem(QWidget *parent) :
QWidget(parent),
ui(new Ui::FormTutorialItem)
{
ui->setupUi(this);
}
FormTutorialItem::~FormTutorialItem()
{
delete ui;
}
void FormTutorialItem::Initialise(QString name, QString description, QString image, QString file)
{
m_tutorialFile = file;
/* ui->lblName->setText(name);
ui->lblDesc->setText(description);
m_tutorialFile = file;
ui->lblImage->setPixmap(QPixmap(file));*/
QString style="<html><head><style>"\
"img {"\
" display: block;"\
" margin-left: auto;"\
" margin-right: auto;"\
"}"\
"h2 {"\
" color: rgb(255,255,220);"\
" margin-left: 0px;"\
"}"\
"</style></head>";
ui->txtInfo->setText(style+description);
// setMouseTracking(true);
// ui->lblText->setText(description);
}
/*
void FormTutorialItem::leaveEvent(QEvent *event)
{
ui->txtInfo->setStyleSheet("background-color: rgb(30,30,30);");
}
void FormTutorialItem::enterEvent(QEnterEvent *event)
{
// ui->txtInfo->setStyleSheet("background-color: red;");
ui->txtInfo->setStyleSheet("background-color: rgb(40,40,40);;");
}
*/
void FormTutorialItem::on_pushButton_clicked()
{
emit emitLoadTutorialProject(m_tutorialFile);
}