qt-material-widgets/components/slider_p.h

46 lines
1.0 KiB
C
Raw Normal View History

2016-05-01 19:56:39 +00:00
#ifndef SLIDER_P_H
#define SLIDER_P_H
2016-05-01 21:10:31 +00:00
#include <QPainter>
#include <QApplication>
#include "lib/style.h"
#include "slider.h"
2016-05-29 09:17:06 +00:00
#include "slider_internal.h"
2016-05-01 19:56:39 +00:00
class SliderPrivate
{
Q_DISABLE_COPY(SliderPrivate)
Q_DECLARE_PUBLIC(Slider)
public:
SliderPrivate(Slider *q);
2016-05-17 12:39:20 +00:00
void init();
2016-05-01 19:56:39 +00:00
QRectF trackBoundingRect() const;
QRectF thumbBoundingRect() const;
2016-05-09 20:32:16 +00:00
2016-05-10 14:17:51 +00:00
int valueFromPosition(const QPoint &pos) const;
2016-05-09 20:32:16 +00:00
void setHovered(bool status);
2016-05-12 06:37:30 +00:00
Slider *const q_ptr;
SliderThumb *const thumb;
SliderTrack *const track;
2016-05-17 12:39:20 +00:00
SliderStateMachine *machine;
bool hoverTrack;
bool hoverThumb;
bool hover;
bool step;
bool pageStepMode;
int stepTo;
int oldValue;
int trackWidth;
QColor thumbColor;
QColor trackColor;
QColor disabledColor;
bool useThemeColors;
2016-05-10 14:17:51 +00:00
};
2016-05-09 20:32:16 +00:00
2016-05-13 14:35:04 +00:00
#endif // SLIDER_P_H