-
-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathutils.cpp
46 lines (38 loc) · 983 Bytes
/
utils.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
#include "utils.hpp"
#include <qevent.h>
LockedCheckBox::LockedCheckBox()
{
setProperty("lockCheckBox", true);
setProperty("class", "indicator-lock");
}
LockedCheckBox::LockedCheckBox(QWidget *parent) : QCheckBox(parent)
{
setProperty("lockCheckBox", true);
setProperty("class", "indicator-lock");
}
MuteCheckBox::MuteCheckBox()
{
setProperty("muteCheckBox", true);
setProperty("class", "indicator-mute");
}
MuteCheckBox::MuteCheckBox(QWidget *parent) : QCheckBox(parent)
{
setProperty("muteCheckBox", true);
setProperty("class", "indicator-mute");
}
SliderIgnoreScroll::SliderIgnoreScroll(QWidget *parent) : QSlider(parent)
{
setFocusPolicy(Qt::StrongFocus);
}
SliderIgnoreScroll::SliderIgnoreScroll(Qt::Orientation orientation, QWidget *parent) : QSlider(parent)
{
setFocusPolicy(Qt::StrongFocus);
setOrientation(orientation);
}
void SliderIgnoreScroll::wheelEvent(QWheelEvent *event)
{
if (!hasFocus())
event->ignore();
else
QSlider::wheelEvent(event);
}