qt-material-widgets/components/qtmaterialslider_p.h

52 lines
1.2 KiB
C
Raw Normal View History

2017-09-29 13:53:18 +00:00
#ifndef QTMATERIALSLIDER_P_H
#define QTMATERIALSLIDER_P_H
#include <QtGlobal>
#include <QColor>
#include <QRectF>
2022-02-17 02:51:42 +00:00
namespace md
{
2017-09-29 13:53:18 +00:00
2022-02-17 02:51:42 +00:00
class Slider;
class SliderThumb;
class SliderTrack;
class SliderStateMachine;
2017-09-29 13:53:18 +00:00
2022-02-17 02:51:42 +00:00
class SliderPrivate
2017-09-29 13:53:18 +00:00
{
2022-02-17 02:51:42 +00:00
Q_DISABLE_COPY(SliderPrivate)
Q_DECLARE_PUBLIC(Slider)
2017-09-29 13:53:18 +00:00
public:
2022-02-17 02:51:42 +00:00
SliderPrivate(Slider *q);
~SliderPrivate();
2017-09-29 13:53:18 +00:00
void init();
QRectF trackBoundingRect() const;
QRectF thumbBoundingRect() const;
int valueFromPosition(const QPoint &pos) const;
void setHovered(bool status);
2022-02-17 02:51:42 +00:00
Slider *const q_ptr;
SliderThumb *thumb;
SliderTrack *track;
SliderStateMachine *stateMachine;
2017-09-29 13:53:18 +00:00
QColor thumbColor;
QColor trackColor;
QColor disabledColor;
int stepTo;
int oldValue;
int trackWidth;
bool hoverTrack;
bool hoverThumb;
bool hover;
bool step;
bool pageStepMode;
bool useThemeColors;
};
2022-02-17 02:51:42 +00:00
}
2017-09-29 13:53:18 +00:00
#endif // QTMATERIALSLIDER_P_H