qt-material-widgets/components/qtmaterialtoggle_p.h

46 lines
1.1 KiB
C
Raw Normal View History

2017-09-29 16:52:33 +00:00
#ifndef QTMATERIALTOGGLE_P_H
#define QTMATERIALTOGGLE_P_H
#include <QtWidgets/QApplication>
#include <QStateMachine>
#include <QSignalTransition>
#include <QPropertyAnimation>
#include <QColor>
2022-02-17 03:12:00 +00:00
namespace md
{
2017-09-29 16:52:33 +00:00
2022-02-17 03:12:00 +00:00
class Toggle;
class ToggleTrack;
class ToggleThumb;
class ToggleRippleOverlay;
2017-09-29 16:52:33 +00:00
2022-02-17 03:12:00 +00:00
class TogglePrivate
2017-09-29 16:52:33 +00:00
{
2022-02-17 03:12:00 +00:00
Q_DISABLE_COPY(TogglePrivate)
Q_DECLARE_PUBLIC(Toggle)
2017-09-29 16:52:33 +00:00
public:
2022-02-17 03:12:00 +00:00
TogglePrivate(Toggle *q);
~TogglePrivate();
2017-09-29 16:52:33 +00:00
void init();
void setupProperties();
2022-02-17 03:12:00 +00:00
Toggle *const q_ptr;
ToggleTrack *track;
ToggleThumb *thumb;
ToggleRippleOverlay *rippleOverlay;
2017-09-29 16:52:33 +00:00
QStateMachine *stateMachine;
QState *offState;
QState *onState;
Qt::Orientation orientation;
QColor disabledColor;
QColor activeColor;
QColor inactiveColor;
QColor trackColor;
bool useThemeColors;
};
2022-02-17 03:12:00 +00:00
}
2017-09-29 16:52:33 +00:00
#endif // QTMATERIALTOGGLE_P_H