mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-07 10:33:24 -08:00
34 lines
786 B
C++
34 lines
786 B
C++
/**
|
|
* @file home_styled_button.h
|
|
* @ingroup Widgets
|
|
*/
|
|
//! \todo Document this file.
|
|
|
|
#ifndef HOME_STYLED_BUTTON_H
|
|
#define HOME_STYLED_BUTTON_H
|
|
#include <QColor>
|
|
#include <QPair>
|
|
#include <QPushButton>
|
|
#include <QString>
|
|
#include <qtmetamacros.h>
|
|
|
|
class QWidget;
|
|
|
|
class HomeStyledButton : public QPushButton
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
HomeStyledButton(const QString &text, QPair<QColor, QColor> gradientColors, QWidget *parent = nullptr);
|
|
void updateStylesheet(const QPair<QColor, QColor> &colors);
|
|
QString generateButtonStylesheet(const QPair<QColor, QColor> &colors);
|
|
public slots:
|
|
void paintEvent(QPaintEvent *event) override;
|
|
|
|
private slots:
|
|
void applyInterfaceDefaultFont();
|
|
|
|
private:
|
|
QPair<QColor, QColor> gradientColors;
|
|
};
|
|
|
|
#endif // HOME_STYLED_BUTTON_H
|