13#include <QtGui/qimage.h>
14#include <QtWidgets/qframe.h>
25 virtual QWidget*
getQWidget(
void)
override {
return this; };
26 virtual const QWidget*
getQWidget(
void)
const override {
return this; };
28 virtual void paintEvent(QPaintEvent* _event)
override;
30 virtual QSize sizeHint(
void)
const override;
32 virtual void wheelEvent(QWheelEvent* _event)
override;
34 virtual void keyPressEvent(QKeyEvent* _event)
override;
36 virtual void mousePressEvent(QMouseEvent* _event)
override;
38 void setImage(
const QImage& _image);
39 const QImage&
image(
void)
const {
return m_image; };
41 void setImageMargins(
const QMargins& _margins);
51 bool m_enabledResizing;
54 QMargins m_imageMargins;
Definition ImagePreview.h:18
void setEnableResizing(bool _enable)
Definition ImagePreview.h:44
virtual QWidget * getQWidget(void) override
Returns a pointer to the root widget of this object.
Definition ImagePreview.h:25
virtual const QWidget * getQWidget(void) const override
Definition ImagePreview.h:26
const QMargins & getImageMargins(void) const
Definition ImagePreview.h:42
void imagePixedClicked(const QPoint &_px)
const QImage & image(void) const
Definition ImagePreview.h:39
bool getEnableResizing(void) const
Definition ImagePreview.h:45