#ifndef CONFIGPANELBUTTON_H #define CONFIGPANELBUTTON_H #include namespace Ui { class ConfigPanelButton; } class ConfigPanelButton : public QWidget { Q_OBJECT public: explicit ConfigPanelButton(QWidget *parent = 0); ~ConfigPanelButton(); const QString &text() { return text_; } const QString &value() { return value_; } public slots: void setText(const QString &text); void setValue(const QString &value); void showFavoriteButton(); void hideFavoriteButton(); private: Ui::ConfigPanelButton *ui; QString text_; QString value_; QRect textRect; QRect valueRect; bool showingFavoriteButton; bool isFavorited; private slots: void updateIcon(); signals: void pressed(); void released(); void clicked(); }; #endif // CONFIGPANELBUTTON_H