nheko/include/ui/RaisedButton.h

29 lines
581 B
C
Raw Normal View History

#pragma once
2017-04-06 01:06:42 +02:00
#include <QGraphicsDropShadowEffect>
#include <QState>
#include <QStateMachine>
#include "FlatButton.h"
class RaisedButton : public FlatButton
{
2017-09-10 11:59:21 +02:00
Q_OBJECT
2017-04-06 01:06:42 +02:00
public:
2017-09-10 11:59:21 +02:00
explicit RaisedButton(QWidget *parent = 0);
explicit RaisedButton(const QString &text, QWidget *parent = 0);
~RaisedButton();
2017-04-06 01:06:42 +02:00
protected:
2017-09-10 11:59:21 +02:00
bool event(QEvent *event) override;
2017-04-06 01:06:42 +02:00
private:
2017-09-10 11:59:21 +02:00
void init();
2017-04-06 01:06:42 +02:00
2017-09-10 11:59:21 +02:00
QStateMachine *shadow_state_machine_;
QState *normal_state_;
QState *pressed_state_;
QGraphicsDropShadowEffect *effect_;
2017-04-06 01:06:42 +02:00
};