VAPOR3
3.9.4
apps
vaporgui
QMontereySlider.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <QStylePainter>
4
#include <QStyleOptionSlider>
5
#include <QStyleOptionComplex>
6
#include <QSlider>
7
#include <QColor>
8
#include "math.h"
9
10
class
QMontereySlider
:
public
QSlider {
11
public
:
12
explicit
QMontereySlider
(Qt::Orientation orientation, QWidget *parent =
nullptr
) : QSlider(orientation, parent){};
13
explicit
QMontereySlider
(QWidget *parent =
nullptr
) : QSlider(parent)
14
{
15
this->setStyleSheet(
"\
16
QSlider::groove:horizontal {\
17
height: 8px; /* the groove expands to the size of the slider by default. by giving it a height, it has a fixed size */ \
18
background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #B1B1B1, stop:1 #c4c4c4);\
19
margin: 2px 0;\
20
}\
21
\
22
QSlider::handle:horizontal {\
23
background: qlineargradient(x1:0, y1:0, x2:1, y2:1, stop:0 #b4b4b4, stop:1 #8f8f8f);\
24
border: 1px solid #5c5c5c;\
25
width: 18px;\
26
margin: -2px 0; /* handle is placed by default on the contents rect of the groove. Expand outside the groove */ \
27
border-radius: 3px;\
28
}"
);
29
};
30
};
QMontereySlider
Definition:
QMontereySlider.h:10
QMontereySlider::QMontereySlider
QMontereySlider(Qt::Orientation orientation, QWidget *parent=nullptr)
Definition:
QMontereySlider.h:12
QMontereySlider::QMontereySlider
QMontereySlider(QWidget *parent=nullptr)
Definition:
QMontereySlider.h:13
Generated by
1.9.6