logowidget.h 634 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #ifndef LOGOWIDGET_H
  2. #define LOGOWIDGET_H
  3. #include <QWidget>
  4. #include <QPainter>
  5. #include <QPixmap>
  6. #include <QDebug>
  7. namespace Ui
  8. {
  9. class LogoWidget;
  10. }
  11. class LogoWidget : public QWidget
  12. {
  13. Q_OBJECT
  14. public:
  15. explicit LogoWidget(QWidget* parent = nullptr);
  16. ~LogoWidget();
  17. QString filePath() const;
  18. void setFilePath(const QString& filePath);
  19. protected:
  20. void paintEvent(QPaintEvent* event);
  21. void focusInEvent(QFocusEvent* event);
  22. void focusOutEvent(QFocusEvent* event);
  23. void mouseMoveEvent(QMouseEvent* event);
  24. private:
  25. Ui::LogoWidget* ui;
  26. QString m_filePath;
  27. };
  28. #endif // LOGOWIDGET_H