insert boilerplate class definition
This commit is contained in:
parent
c0ceddafa4
commit
401bf7a95a
|
@ -1 +1,19 @@
|
||||||
|
#include <QAbstractButton>
|
||||||
#include "toggle.h"
|
#include "toggle.h"
|
||||||
|
#include "../lib/rippleoverlay.h"
|
||||||
|
|
||||||
|
Toggle::Toggle(QWidget *parent)
|
||||||
|
: QAbstractButton(parent),
|
||||||
|
_overlay(new RippleOverlay(this))
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
Toggle::~Toggle()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void Toggle::paintEvent(QPaintEvent *event)
|
||||||
|
{
|
||||||
|
Q_UNUSED(event)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,23 @@
|
||||||
#ifndef TOGGLE_H
|
#ifndef TOGGLE_H
|
||||||
#define TOGGLE_H
|
#define TOGGLE_H
|
||||||
|
|
||||||
|
#include <QAbstractButton>
|
||||||
|
|
||||||
|
class RippleOverlay;
|
||||||
|
|
||||||
|
class Toggle : public QAbstractButton
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit Toggle(QWidget *parent = 0);
|
||||||
|
~Toggle();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE;
|
||||||
|
|
||||||
|
private:
|
||||||
|
RippleOverlay *const _overlay;
|
||||||
|
};
|
||||||
|
|
||||||
#endif // TOGGLE_H
|
#endif // TOGGLE_H
|
||||||
|
|
Loading…
Reference in New Issue