-
Notifications
You must be signed in to change notification settings - Fork 0
/
bossform.cpp
62 lines (53 loc) · 1.65 KB
/
bossform.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
55
56
57
58
59
60
61
#include "bossform.h"
#include "ui_bossform.h"
BossForm::BossForm(QWidget *parent) :
QWidget(parent),
ui(new Ui::BossForm)
{
ui->setupUi(this);
this->setWindowFlags(Qt::FramelessWindowHint);
this->initConn();
this->bossHomePage = new BossPrimeWidget;
this->soldDetailsPage = new BossSoldDetails;
this->bossGoBuyPage = new BossGoBuy;
this->commentPage = new ShowComment;
ui->stackedWidget->addWidget(bossHomePage);
ui->stackedWidget->addWidget(soldDetailsPage);
ui->stackedWidget->addWidget(bossGoBuyPage);
ui->stackedWidget->addWidget(commentPage);
ui->stackedWidget->setCurrentWidget(bossHomePage);
}
BossForm::~BossForm()
{
delete ui;
delete bossHomePage;
delete soldDetailsPage;
delete bossGoBuyPage;
delete commentPage;
}
void BossForm::initConn()
{
connect(ui->btnHome, SIGNAL(clicked()), this, SLOT(onBtnHomeClicked()));
connect(ui->btnBuy, SIGNAL(clicked()), this, SLOT(onBtnBuyClicked()));
connect(ui->btnSoldDetails, SIGNAL(clicked()), this, SLOT(onBtnSoldDetailsClicked()));
connect(ui->btnComment, SIGNAL(clicked()), this, SLOT(onBtnCommentClicked()));
}
void BossForm::onBtnHomeClicked()
{
delete bossHomePage;
bossHomePage = new BossPrimeWidget;
ui->stackedWidget->addWidget(bossHomePage);
ui->stackedWidget->setCurrentWidget(this->bossHomePage);
}
void BossForm::onBtnBuyClicked()
{
ui->stackedWidget->setCurrentWidget(this->bossGoBuyPage);
}
void BossForm::onBtnSoldDetailsClicked()
{
ui->stackedWidget->setCurrentWidget(this->soldDetailsPage);
}
void BossForm::onBtnCommentClicked()
{
ui->stackedWidget->setCurrentWidget(this->commentPage);
}