qt-material-widgets/components/toggle.h

38 lines
674 B
C
Raw Normal View History

2016-03-25 21:57:51 +00:00
#ifndef TOGGLE_H
#define TOGGLE_H
2016-05-29 08:05:08 +00:00
#include <QAbstractButton>
2016-05-29 10:08:55 +00:00
class TogglePrivate;
2016-05-29 08:05:08 +00:00
class Toggle : public QAbstractButton
{
Q_OBJECT
public:
explicit Toggle(QWidget *parent = 0);
~Toggle();
2016-05-29 10:25:14 +00:00
QSize sizeHint() const;
2016-05-29 11:58:20 +00:00
Qt::Orientation orientation() const;
2016-05-29 08:05:08 +00:00
void setOrientation(Qt::Orientation orientation) Q_DECL_OVERRIDE;
2016-05-29 13:42:13 +00:00
void updateOverlayGeometry();
protected slots:
2016-06-05 13:28:01 +00:00
void addRipple();
2016-05-29 13:42:13 +00:00
2016-05-29 08:05:08 +00:00
protected:
2016-05-29 13:42:13 +00:00
bool event(QEvent *event) Q_DECL_OVERRIDE;
2016-05-29 08:05:08 +00:00
void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE;
2016-05-29 10:08:55 +00:00
const QScopedPointer<TogglePrivate> d_ptr;
private:
Q_DISABLE_COPY(Toggle)
Q_DECLARE_PRIVATE(Toggle)
2016-05-29 08:05:08 +00:00
};
2016-03-25 21:57:51 +00:00
#endif // TOGGLE_H