12 #include <QtGui/QWidget> 13 #include <QtGui/QPaintEvent> 14 #include <QtGui/QPainter> 15 #include <QtGui/QImage> 17 #include <QtCore/QByteArray> 18 #include <QtCore/QList> 19 #include <QtGui/qfiledialog.h> 20 #include <QtGui/QMenu> 21 #include <QtCore/QString> 22 #include <QtDesigner/QDesignerExportWidget> 25 #include <frame_helper/FrameQImageConverter.h> 77 Q_CLASSINFO(
"Author",
"Alexander Duda")
78 Q_PROPERTY(
bool Use_OpenGL READ onOpenGL WRITE openGL USER false)
79 Q_PROPERTY(
bool Aspect_Ratio READ getAspectRatio WRITE setAspectRatio USER false)
89 ImageViewOld(QWidget *parent = NULL,
bool use_openGL = false);
95 void contextMenuEvent ( QContextMenuEvent * event );
96 int heightForWidth(
int w ) {
return w*image.height()/image.width(); };
97 void mouseDoubleClickEvent ( QMouseEvent * event );
99 void clickImage(
int x,
int y);
103 void emitUserExport();
106 void setDefaultImage();
108 void setZoomEnabled(
bool enabled);
110 virtual void openGL(
bool flag);
116 image_view_gl->setAspectRatio(value);
121 void saveImage(
bool overlay=
true);
122 bool saveImage2(QString path,
bool overlay=
true);
123 bool saveImage3(
const QString &mode,
int pixel_size,
int width,
int height,
const char* pbuffer, QString path,QString format);
129 void crop(
int x,
int y,
int w,
int h);
148 void addRawImage(
const QString &mode,
int pixel_size,
int width,
int height,
const char* pbuffer,
const int size);
149 void addFrame(
const base::samples::frame::Frame &frame);
155 void addImage(
const QImage &image);
157 void setGroupStatus(
int groupNr,
bool enable);
176 virtual void resizeEvent(QResizeEvent *event);
178 void mousePressEvent(QMouseEvent *event);
179 void mouseReleaseEvent(QMouseEvent *event);
180 void calculateRects();
181 std::pair<QPoint, bool> toImage(QPoint
const& p);
frame_helper::FrameQImageConverter frame_converter
ImageViewOldGL * image_view_gl
QAction * user_export_act
void setAspectRatio(bool value)