BmpWidget.h 542 B

123456789101112131415161718192021222324
  1. #ifndef BMPWIDGET_H
  2. #define BMPWIDGET_H
  3. #include <QWidget>
  4. #include <QScopedPointer>
  5. class BmpWidgetPrivate;
  6. class BmpWidget : public QWidget
  7. {
  8. Q_OBJECT
  9. Q_DISABLE_COPY(BmpWidget)
  10. public:
  11. explicit BmpWidget(QWidget *parent = NULL);
  12. ~BmpWidget();
  13. void setBackgroundBmpPath(const QString &path);
  14. void setBackgroundBmpImage(QImage& image, const QString& path);
  15. protected:
  16. void styleChange();
  17. void paintEvent(QPaintEvent* event);
  18. private:
  19. QScopedPointer<BmpWidgetPrivate> m_Private;
  20. };
  21. #endif // BMPWIDGET_H