IconWidget.h 451 B

12345678910111213141516171819202122232425
  1. #ifndef ICONWIDGET_H
  2. #define ICONWIDGET_H
  3. #include <QWidget>
  4. #include "Common/Icon.h"
  5. class IconWidget : public QWidget
  6. {
  7. Q_OBJECT
  8. public:
  9. explicit IconWidget(FluentIconBase *ficon, QWidget *parent = nullptr);
  10. void setIcon(FluentIconBase *icon);
  11. // QWidget interface
  12. protected:
  13. virtual void paintEvent(QPaintEvent *event) override;
  14. signals:
  15. private:
  16. QScopedPointer<FluentIconBase> m_ficon;
  17. };
  18. #endif // ICONWIDGET_H