#pragma once #include #include "buttonstruct.h" #include "ui_minibutton.h" class MiniButton : public QPushButton { Q_OBJECT signals: void click1(QString op, QString func, QString path, QString url); void click2(QString orig_name,QString op); void click0(); public: MiniButton(QString orig_name, QString op, QWidget* parent = nullptr); MiniButton(ButtonStruct button_struct, QWidget *parent = nullptr); ~MiniButton(); protected: void paintEvent(QPaintEvent* event) override; void mouseReleaseEvent(QMouseEvent* event) override; private: QString orig_name; QString op; QColor q_color; Ui::MiniButtonClass ui; bool checked = false; ButtonStruct button_struct; public slots: void onclick1(); void onclick2(); };