3 #include <widgets/tgwidget.h>
14 Q_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation NOTIFY orientationChanged)
17 Q_PROPERTY(
int minimum READ minimum WRITE setMinimum NOTIFY minimumChanged)
18 Q_PROPERTY(
int maximum READ maximum WRITE setMaximum NOTIFY maximumChanged)
19 Q_PROPERTY(QString sliderCharacter READ sliderCharacter WRITE setSliderCharacter NOTIFY sliderCharacterChanged)
20 Q_PROPERTY(
Tg::Color sliderColor READ sliderColor WRITE setSliderColor NOTIFY sliderColorChanged)
21 Q_PROPERTY(
Tg::Color sliderActiveColor READ sliderActiveColor WRITE setSliderActiveColor NOTIFY sliderActiveColorChanged)
22 Q_PROPERTY(
Tg::Color sliderInactiveColor READ sliderInactiveColor WRITE setSliderInactiveColor NOTIFY sliderInactiveColorChanged)
24 Q_PROPERTY(
Tg::Color sliderBackgroundColor READ sliderBackgroundColor WRITE setSliderBackgroundColor NOTIFY sliderBackgroundColorChanged)
25 Q_PROPERTY(
Tg::Color sliderActiveBackgroundColor READ sliderActiveBackgroundColor WRITE setSliderActiveBackgroundColor NOTIFY sliderActiveBackgroundColorChanged)
26 Q_PROPERTY(
Tg::Color sliderInactiveBackgroundColor READ sliderInactiveBackgroundColor WRITE setSliderInactiveBackgroundColor NOTIFY sliderInactiveBackgroundColorChanged)
29 Q_PROPERTY(QString backwardArrowUpCharacter READ backwardArrowUpCharacter WRITE setBackwardArrowUpCharacter NOTIFY backwardArrowUpCharacterChanged)
30 Q_PROPERTY(QString backwardArrowLeftCharacter READ backwardArrowLeftCharacter WRITE setBackwardArrowLeftCharacter NOTIFY backwardArrowLeftCharacterChanged)
32 Q_PROPERTY(
Tg::Color backwardArrowColor READ backwardArrowColor WRITE setBackwardArrowColor NOTIFY backwardArrowColorChanged)
33 Q_PROPERTY(
Tg::Color backwardArrowActiveColor READ backwardArrowActiveColor WRITE setBackwardArrowActiveColor NOTIFY backwardArrowActiveColorChanged)
34 Q_PROPERTY(
Tg::Color backwardArrowInactiveColor READ backwardArrowInactiveColor WRITE setBackwardArrowInactiveColor NOTIFY backwardArrowInactiveColorChanged)
36 Q_PROPERTY(
Tg::Color backwardArrowBackgroundColor READ backwardArrowBackgroundColor WRITE setBackwardArrowBackgroundColor NOTIFY backwardArrowColorBackgroundChanged)
37 Q_PROPERTY(
Tg::Color backwardArrowActiveBackgroundColor READ backwardArrowActiveBackgroundColor WRITE setBackwardArrowActiveBackgroundColor NOTIFY backwardArrowActiveColorBackgroundChanged)
38 Q_PROPERTY(
Tg::Color backwardArrowInactiveBackgroundColor READ backwardArrowInactiveBackgroundColor WRITE setBackwardArrowInactiveBackgroundColor NOTIFY backwardArrowInactiveColorBackgroundChanged)
41 Q_PROPERTY(QString forwardArrowDownCharacter READ forwardArrowDownCharacter WRITE setForwardArrowDownCharacter NOTIFY forwardArrowDownCharacterChanged)
42 Q_PROPERTY(QString forwardArrowRightCharacter READ forwardArrowRightCharacter WRITE setForwardArrowRightCharacter NOTIFY forwardArrowRightCharacterChanged)
44 Q_PROPERTY(
Tg::Color forwardArrowColor READ forwardArrowColor WRITE setForwardArrowColor NOTIFY forwardArrowColorChanged)
45 Q_PROPERTY(
Tg::Color forwardArrowActiveColor READ forwardArrowActiveColor WRITE setForwardArrowActiveColor NOTIFY forwardArrowActiveColorChanged)
46 Q_PROPERTY(
Tg::Color forwardArrowInactiveColor READ forwardArrowInactiveColor WRITE setForwardArrowInactiveColor NOTIFY forwardArrowInactiveColorChanged)
48 Q_PROPERTY(
Tg::Color forwardArrowBackgroundColor READ forwardArrowBackgroundColor WRITE setForwardArrowBackgroundColor NOTIFY forwardArrowColorBackgroundChanged)
49 Q_PROPERTY(
Tg::Color forwardArrowActiveBackgroundColor READ forwardArrowActiveBackgroundColor WRITE setForwardArrowActiveBackgroundColor NOTIFY forwardArrowActiveColorBackgroundChanged)
50 Q_PROPERTY(
Tg::Color forwardArrowInactiveBackgroundColor READ forwardArrowInactiveBackgroundColor WRITE setForwardArrowInactiveBackgroundColor NOTIFY forwardArrowInactiveColorBackgroundChanged)
58 Qt::Orientation orientation()
const;
65 int sliderPosition()
const;
66 QString sliderCharacter()
const;
71 Tg::Color sliderActiveBackgroundColor()
const;
72 Tg::Color sliderInactiveBackgroundColor()
const;
74 QString backwardArrowUpCharacter()
const;
75 QString backwardArrowLeftCharacter()
const;
77 Tg::Color backwardArrowActiveColor()
const;
78 Tg::Color backwardArrowInactiveColor()
const;
79 Tg::Color backwardArrowBackgroundColor()
const;
80 Tg::Color backwardArrowActiveBackgroundColor()
const;
81 Tg::Color backwardArrowInactiveBackgroundColor()
const;
83 QString forwardArrowDownCharacter()
const;
84 QString forwardArrowRightCharacter()
const;
86 Tg::Color forwardArrowActiveColor()
const;
87 Tg::Color forwardArrowInactiveColor()
const;
88 Tg::Color forwardArrowBackgroundColor()
const;
89 Tg::Color forwardArrowActiveBackgroundColor()
const;
90 Tg::Color forwardArrowInactiveBackgroundColor()
const;
93 void setOrientation(
const Qt::Orientation orientation);
95 void setMinimum(
const int minimum);
96 void setMaximum(
const int maximum);
97 void setValue(
const int value);
98 void setSliderPosition(
const int sliderPosition);
99 void setSliderCharacter(
const QString &sliderCharacter);
100 void setSliderColor(
const Tg::Color &sliderColor);
101 void setSliderActiveColor(
const Tg::Color &sliderActiveColor);
102 void setSliderInactiveColor(
const Tg::Color &sliderInactiveColor);
103 void setSliderBackgroundColor(
const Tg::Color &sliderBackgroundColor);
104 void setSliderActiveBackgroundColor(
const Tg::Color &sliderActiveBackgroundColor);
105 void setSliderInactiveBackgroundColor(
const Tg::Color &sliderInactiveBackgroundColor);
107 void setBackwardArrowUpCharacter(
const QString &backwardArrowUpCharacter);
108 void setBackwardArrowLeftCharacter(
const QString &backwardArrowLeftCharacter);
109 void setBackwardArrowColor(
const Tg::Color &backwardArrowColor);
110 void setBackwardArrowActiveColor(
const Tg::Color &backwardArrowActiveColor);
111 void setBackwardArrowInactiveColor(
const Tg::Color &backwardArrowInactiveColor);
112 void setBackwardArrowBackgroundColor(
const Tg::Color &backwardArrowBackgroundColor);
113 void setBackwardArrowActiveBackgroundColor(
const Tg::Color &backwardArrowActiveBackgroundColor);
114 void setBackwardArrowInactiveBackgroundColor(
const Tg::Color &backwardArrowInactiveBackgroundColor);
116 void setForwardArrowDownCharacter(
const QString &forwardArrowDownCharacter);
117 void setForwardArrowRightCharacter(
const QString &forwardArrowRightCharacter);
118 void setForwardArrowColor(
const Tg::Color &forwardArrowColor);
119 void setForwardArrowActiveColor(
const Tg::Color &forwardArrowActiveColor);
120 void setForwardArrowInactiveColor(
const Tg::Color &forwardArrowInactiveColor);
121 void setForwardArrowBackgroundColor(
const Tg::Color &forwardArrowBackgroundColor);
122 void setForwardArrowActiveBackgroundColor(
const Tg::Color &forwardArrowActiveBackgroundColor);
123 void setForwardArrowInactiveBackgroundColor(
const Tg::Color &forwardArrowInactiveBackgroundColor);
126 void backwardArrowClicked()
const;
127 void forwardArrowClicked()
const;
129 void orientationChanged(
const Qt::Orientation orientation)
const;
131 void minimumChanged(
const int minimum)
const;
132 void maximumChanged(
const int maximum)
const;
133 void sliderPositionChanged(
const int sliderPosition)
const;
134 void sliderCharacterChanged(
const QString &sliderCharacter)
const;
135 void sliderColorChanged(
const Tg::Color &sliderColor)
const;
136 void sliderActiveColorChanged(
const Tg::Color &sliderActiveColor)
const;
137 void sliderInactiveColorChanged(
const Tg::Color &sliderInactiveColor)
const;
138 void sliderBackgroundColorChanged(
const Tg::Color &sliderBackgroundColor)
const;
139 void sliderActiveBackgroundColorChanged(
const Tg::Color &sliderActiveBackgroundColor)
const;
140 void sliderInactiveBackgroundColorChanged(
const Tg::Color &sliderInactiveBackgroundColor)
const;
142 void backwardArrowUpCharacterChanged(
const QString &backwardArrowUpCharacter)
const;
143 void backwardArrowLeftCharacterChanged(
const QString &backwardArrowLeftCharacter)
const;
144 void backwardArrowColorChanged(
const Tg::Color &backwardArrowColor)
const;
145 void backwardArrowActiveColorChanged(
const Tg::Color &backwardArrowActiveColor)
const;
146 void backwardArrowInactiveColorChanged(
const Tg::Color &backwardArrowInactiveColor)
const;
147 void backwardArrowColorBackgroundChanged(
const Tg::Color &backwardArrowBackgroundColor)
const;
148 void backwardArrowActiveColorBackgroundChanged(
const Tg::Color &backwardArrowActiveBackgroundColor)
const;
149 void backwardArrowInactiveColorBackgroundChanged(
const Tg::Color &backwardArrowInactiveBackgroundColor)
const;
151 void forwardArrowDownCharacterChanged(
const QString &forwardArrowDownCharacter)
const;
152 void forwardArrowRightCharacterChanged(
const QString &forwardArrowRightCharacter)
const;
153 void forwardArrowColorChanged(
const Tg::Color &forwardArrowColor)
const;
154 void forwardArrowActiveColorChanged(
const Tg::Color &forwardArrowActiveColor)
const;
155 void forwardArrowInactiveColorChanged(
const Tg::Color &forwardArrowInactiveColor)
const;
156 void forwardArrowColorBackgroundChanged(
const Tg::Color &forwardArrowBackgroundColor)
const;
157 void forwardArrowActiveColorBackgroundChanged(
const Tg::Color &forwardArrowActiveBackgroundColor)
const;
158 void forwardArrowInactiveColorBackgroundChanged(
const Tg::Color &forwardArrowInactiveBackgroundColor)
const;
161 void enforceProperSize();
164 void init()
override;
166 QString
drawPixel(
const QPoint &pixel)
const override;
167 QString linearPixel(
const int pixel,
const int length)
const;
170 Qt::Orientation _orientation = Qt::Orientation::Vertical;
174 int _sliderPosition = 3;
175 QString _sliderCharacter;
181 Tg::Color _sliderInactiveBackgroundColor;
182 QTimer _sliderPressTimer;
184 QString _backwardArrowUpCharacter;
185 QString _backwardArrowLeftCharacter;
190 Tg::Color _backwardArrowActiveBackgroundColor;
191 Tg::Color _backwardArrowInactiveBackgroundColor;
192 QTimer _backwardArrowPressTimer;
194 QString _forwardArrowDownCharacter;
195 QString _forwardArrowRightCharacter;
200 Tg::Color _forwardArrowActiveBackgroundColor;
201 Tg::Color _forwardArrowInactiveBackgroundColor;
202 QTimer _forwardArrowPressTimer;