forked from RunnanZhang/MagicAssistant
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathToolBar.cpp
More file actions
60 lines (51 loc) · 1.56 KB
/
ToolBar.cpp
File metadata and controls
60 lines (51 loc) · 1.56 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
#include "ToolBar.h"
#include "ui_ToolBar.h"
ToolBar::ToolBar(QWidget *parent) :
QWidget(parent),
ui(new Ui::ToolBar)
{
ui->setupUi(this);
setWindowFlags(Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint | Qt::Tool);
setAttribute(Qt::WA_TranslucentBackground);
//初始化ToolButton的Pixmap.
ui->toolButton->setPixmap(":/images/update_32.png", ":/images/update_64.png");
ui->toolButton->setToolTip("update");
ui->toolButton2->setPixmap(":/images/build_32.png", ":/images/build_64.png");
ui->toolButton2->setToolTip("build");
ui->pOpenBtn->setPixmap(":/images/search_32.png", ":/images/search_64.png");
ui->pOpenBtn->setToolTip("open");
ui->pCommandBtn->setPixmap(":/images/command_32.png", ":/images/command_64.png");
ui->pCommandBtn->setToolTip("command");
ui->pScreenshotBtn->setPixmap(":/images/screenshot_32.png", ":/images/screenshot_64.png");
ui->pScreenshotBtn->setToolTip("screenshot");
ui->pShutdownBtn->setPixmap(":/images/shutdown_32.png", ":/images/shutdown_64.png");
ui->pShutdownBtn->setToolTip("shutdown");
}
ToolBar::~ToolBar()
{
delete ui;
}
void ToolBar::on_toolButton_clicked()
{
emit updateMetaDataRequested();
}
void ToolBar::on_toolButton2_clicked()
{
emit vsbuildRequested();
}
void ToolBar::on_pOpenBtn_clicked()
{
emit openProjectDirRequested();
}
void ToolBar::on_pCommandBtn_clicked()
{
emit openCommandRequested();
}
void ToolBar::on_pScreenshotBtn_clicked()
{
emit screenShotRequested();
}
void ToolBar::on_pShutdownBtn_clicked()
{
emit shutdownRequested();
}