matrixion/include/ui/RaisedButton.h

29 lines
581 B
C
Raw Normal View History

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