-
Notifications
You must be signed in to change notification settings - Fork 1
/
controlwidget.cpp
51 lines (43 loc) · 1.1 KB
/
controlwidget.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
#include "controlwidget.h"
#include "ui_controlwidget.h"
#include <QPainter>
ControlWidget::ControlWidget(QWidget *parent) :
QWidget(parent),
ui(new Ui::ControlWidget)
{
ui->setupUi(this);
setFocusPolicy(Qt::NoFocus);
ui->pushButtonAntiClock->setFocusPolicy(Qt::NoFocus);
ui->pushButtonLeft->setFocusPolicy(Qt::NoFocus);;
ui->pushButtonFitSize->setFocusPolicy(Qt::NoFocus);;
ui->pushButtonRight->setFocusPolicy(Qt::NoFocus);;
ui->pushButtonClock->setFocusPolicy(Qt::NoFocus);;
}
ControlWidget::~ControlWidget()
{
delete ui;
}
void ControlWidget::paintEvent ( QPaintEvent * event ){
QPainter p(this);
p.fillRect(rect(), QBrush(QColor(255,255,255,128)));
}
QPushButton *ControlWidget::pushButtonAntiClock()
{
return ui->pushButtonAntiClock;
}
QPushButton *ControlWidget::pushButtonLeft()
{
return ui->pushButtonLeft;
}
QPushButton *ControlWidget::pushButtonFitSize()
{
return ui->pushButtonFitSize;
}
QPushButton *ControlWidget::pushButtonRight()
{
return ui->pushButtonRight;
}
QPushButton *ControlWidget::pushButtonClock()
{
return ui->pushButtonClock;
}