imageviewer_moc.h 508 B

12345678910111213141516171819202122232425262728293031
  1. #ifndef IMAGEVIEWER_H
  2. #define IMAGEVIEWER_H
  3. #include <QDialog>
  4. namespace Ui {
  5. class ImageViewer;
  6. }
  7. class ImageViewer : public QDialog
  8. {
  9. Q_OBJECT
  10. public:
  11. explicit ImageViewer(QWidget *parent = 0);
  12. ~ImageViewer();
  13. void setPixmap(QPixmap & pixmap);
  14. static void showPixmap(QPixmap & pixmap, QWidget *parent = 0);
  15. protected:
  16. void mousePressEvent(QMouseEvent * event);
  17. void keyPressEvent(QKeyEvent * event);
  18. QSize calculateWindowSize();
  19. private:
  20. Ui::ImageViewer *ui;
  21. };
  22. #endif // IMAGEVIEWER_H