forked from m-garanin/zgui-qt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmenubarwidget.cpp
55 lines (44 loc) · 1.28 KB
/
menubarwidget.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
#include "menubarwidget.h"
#include "ui_menubarwidget.h"
MenuBarWidget::MenuBarWidget(QWidget *parent) :
QWidget(parent),
ui(new Ui::MenuBarWidget)
{
ui->setupUi(this);
connect(this, SIGNAL(setRecordIndicatorText(QString)), ui->startRecordBtn, SLOT(setIndicatorText(QString)));
connect(this, SIGNAL(setAirIndicatorText(QString)), ui->startAirBtn, SLOT(setIndicatorText(QString)));
//connect(this, SIGNAL(setAirIndicatorText(QString)), this, SLOT(resizeWidget()));
}
MenuBarWidget::~MenuBarWidget()
{
delete ui;
}
void MenuBarWidget::on_startRecordBtn_clicked()
{
emit startRecordBtnClicked(ui->startRecordBtn->getState());
}
void MenuBarWidget::on_startAirBtn_clicked()
{
emit startAirBtnClicked(ui->startAirBtn->getState());
}
void MenuBarWidget::recordStarting()
{
ui->startRecordBtn->setState(MenuIndicator::Progress);
}
void MenuBarWidget::recordStoping()
{
ui->startRecordBtn->setState(MenuIndicator::Idle);
}
void MenuBarWidget::airStarting()
{
ui->startAirBtn->setState(MenuIndicator::Progress);
}
void MenuBarWidget::airStoping()
{
ui->startAirBtn->setState(MenuIndicator::Idle);
}
void MenuBarWidget::resizeWidget()
{
//this->resize(ui->startRecordBtn->width() + ui->startAirBtn->width(), this->height());
//this->updateGeometry();
}