configpanelbutton.h
834 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#ifndef CONFIGPANELBUTTON_H
#define CONFIGPANELBUTTON_H
#include <QWidget>
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