2017-05-16 21:46:45 +03:00
|
|
|
#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:
|
2020-02-04 06:58:43 +03:00
|
|
|
explicit RaisedButton(QWidget *parent = nullptr);
|
|
|
|
explicit RaisedButton(const QString &text, QWidget *parent = nullptr);
|
2017-09-10 12:59:21 +03:00
|
|
|
~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
|
|
|
};
|