yhkylin-backup-tools/kybackup/component/myiconlabel.h

29 lines
569 B
C
Raw Normal View History

2021-09-16 16:05:46 +08:00
#ifndef MYICONLABEL_H
#define MYICONLABEL_H
#include <QLabel>
class MyIconLabel : public QLabel
{
Q_OBJECT
public:
explicit MyIconLabel(QWidget *parent = nullptr);
virtual ~MyIconLabel();
2021-10-13 16:31:58 +08:00
void setThemeIcon(const QString &themeIconName, const QString &defaultIconName = "");
2021-09-16 16:05:46 +08:00
void setDesplayText(const QString &text);
2021-09-23 11:21:58 +08:00
public slots:
void changePalette(bool checked);
2021-09-16 16:05:46 +08:00
private:
QLabel *m_iconLabel;
QLabel *m_textLabel;
QString m_themeIconName;
2021-10-13 16:31:58 +08:00
QString m_defaultIconName;
2021-09-23 11:21:58 +08:00
QString m_originalText;
2021-09-16 16:05:46 +08:00
};
#endif // MYICONLABEL_H