2016-03-25 21:57:51 +00:00
|
|
|
#ifndef TOGGLE_H
|
|
|
|
#define TOGGLE_H
|
|
|
|
|
2016-03-26 10:37:48 +00:00
|
|
|
#include <QAbstractButton>
|
|
|
|
|
|
|
|
class RippleOverlay;
|
|
|
|
|
|
|
|
class Toggle : public QAbstractButton
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit Toggle(QWidget *parent = 0);
|
|
|
|
~Toggle();
|
|
|
|
|
2016-03-26 12:17:46 +00:00
|
|
|
QSize sizeHint() const { return QSize(32, 32); }
|
|
|
|
|
2016-03-26 10:37:48 +00:00
|
|
|
protected:
|
|
|
|
void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE;
|
|
|
|
|
|
|
|
private:
|
|
|
|
RippleOverlay *const _overlay;
|
|
|
|
};
|
|
|
|
|
2016-03-25 21:57:51 +00:00
|
|
|
#endif // TOGGLE_H
|