29 lines
569 B
C++
Executable File
29 lines
569 B
C++
Executable File
#ifndef MYICONLABEL_H
|
|
#define MYICONLABEL_H
|
|
|
|
#include <QLabel>
|
|
|
|
class MyIconLabel : public QLabel
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit MyIconLabel(QWidget *parent = nullptr);
|
|
virtual ~MyIconLabel();
|
|
|
|
void setThemeIcon(const QString &themeIconName, const QString &defaultIconName = "");
|
|
|
|
void setDesplayText(const QString &text);
|
|
|
|
public slots:
|
|
void changePalette(bool checked);
|
|
|
|
private:
|
|
QLabel *m_iconLabel;
|
|
QLabel *m_textLabel;
|
|
QString m_themeIconName;
|
|
QString m_defaultIconName;
|
|
QString m_originalText;
|
|
};
|
|
|
|
#endif // MYICONLABEL_H
|