nheko/src/ui/RaisedButton.h

33 lines
702 B
C
Raw Normal View History

2021-03-05 00:35:15 +01:00
// SPDX-FileCopyrightText: 2021 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later
#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:
2020-02-04 04:58:43 +01:00
explicit RaisedButton(QWidget *parent = nullptr);
explicit RaisedButton(const QString &text, QWidget *parent = nullptr);
2020-02-04 15:18:26 +01:00
~RaisedButton() override;
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
};