qtmaterialslider_p.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #ifndef QTMATERIALSLIDER_P_H
  2. #define QTMATERIALSLIDER_P_H
  3. #include <QtGlobal>
  4. #include <QColor>
  5. #include <QRectF>
  6. class QtMaterialSlider;
  7. class QtMaterialSliderThumb;
  8. class QtMaterialSliderTrack;
  9. class QtMaterialSliderStateMachine;
  10. class QtMaterialSliderPrivate
  11. {
  12. Q_DISABLE_COPY(QtMaterialSliderPrivate)
  13. Q_DECLARE_PUBLIC(QtMaterialSlider)
  14. public:
  15. QtMaterialSliderPrivate(QtMaterialSlider *q);
  16. ~QtMaterialSliderPrivate();
  17. void init();
  18. QRectF trackBoundingRect() const;
  19. QRectF thumbBoundingRect() const;
  20. int valueFromPosition(const QPoint &pos) const;
  21. void setHovered(bool status);
  22. QtMaterialSlider *const q_ptr;
  23. QtMaterialSliderThumb *thumb;
  24. QtMaterialSliderTrack *track;
  25. QtMaterialSliderStateMachine *stateMachine;
  26. QColor thumbColor;
  27. QColor trackColor;
  28. QColor disabledColor;
  29. int stepTo;
  30. int oldValue;
  31. int trackWidth;
  32. bool hoverTrack;
  33. bool hoverThumb;
  34. bool hover;
  35. bool step;
  36. bool pageStepMode;
  37. bool useThemeColors;
  38. };
  39. #endif // QTMATERIALSLIDER_P_H