VAPOR3 3.9.4
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
10class QMontereySlider : public QSlider {
11public:
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(Qt::Orientation orientation, QWidget *parent=nullptr)
QMontereySlider(QWidget *parent=nullptr)