Merge pull request #11195 from alalek:fix_qt_build

pull/11198/head
Alexander Alekhin 7 years ago
commit dbcb454917
  1. 98
      modules/highgui/src/window_QT.h
  2. 14
      samples/opengl/opengl_interop.cpp

@ -278,9 +278,9 @@ public:
QPointer<QBoxLayout> myLayout;
private:
void closeEvent ( QCloseEvent * e );
void showEvent ( QShowEvent * event ) ;
void hideEvent ( QHideEvent * event ) ;
void closeEvent ( QCloseEvent * e ) CV_OVERRIDE;
void showEvent ( QShowEvent * event ) CV_OVERRIDE;
void hideEvent ( QHideEvent * event ) CV_OVERRIDE;
};
@ -339,7 +339,7 @@ public:
QPointer<QLabel> myStatusBar_msg;
protected:
virtual void keyPressEvent(QKeyEvent* event);
virtual void keyPressEvent(QKeyEvent* event) CV_OVERRIDE;
private:
@ -414,8 +414,8 @@ class OCVViewPort : public ViewPort
{
public:
explicit OCVViewPort();
~OCVViewPort() {};
void setMouseCallBack(CvMouseCallback callback, void* param);
~OCVViewPort() CV_OVERRIDE {};
void setMouseCallBack(CvMouseCallback callback, void* param) CV_OVERRIDE;
protected:
void icvmouseEvent(QMouseEvent* event, type_mouse_event category);
@ -433,38 +433,38 @@ class OpenGlViewPort : public QGLWidget, public OCVViewPort
{
public:
explicit OpenGlViewPort(QWidget* parent);
~OpenGlViewPort();
~OpenGlViewPort() CV_OVERRIDE;
QWidget* getWidget();
QWidget* getWidget() CV_OVERRIDE;
void writeSettings(QSettings& settings);
void readSettings(QSettings& settings);
void writeSettings(QSettings& settings) CV_OVERRIDE;
void readSettings(QSettings& settings) CV_OVERRIDE;
double getRatio();
void setRatio(int flags);
double getRatio() CV_OVERRIDE;
void setRatio(int flags) CV_OVERRIDE;
void updateImage(const CvArr* arr);
void updateImage(const CvArr* arr) CV_OVERRIDE;
void startDisplayInfo(QString text, int delayms);
void startDisplayInfo(QString text, int delayms) CV_OVERRIDE;
void setOpenGlDrawCallback(CvOpenGlDrawCallback callback, void* userdata);
void makeCurrentOpenGlContext();
void updateGl();
void setOpenGlDrawCallback(CvOpenGlDrawCallback callback, void* userdata) CV_OVERRIDE;
void makeCurrentOpenGlContext() CV_OVERRIDE;
void updateGl() CV_OVERRIDE;
void setSize(QSize size_);
void setSize(QSize size_) CV_OVERRIDE;
protected:
void initializeGL();
void resizeGL(int w, int h);
void paintGL();
void initializeGL() CV_OVERRIDE;
void resizeGL(int w, int h) CV_OVERRIDE;
void paintGL() CV_OVERRIDE;
void wheelEvent(QWheelEvent* event);
void mouseMoveEvent(QMouseEvent* event);
void mousePressEvent(QMouseEvent* event);
void mouseReleaseEvent(QMouseEvent* event);
void mouseDoubleClickEvent(QMouseEvent* event);
void wheelEvent(QWheelEvent* event) CV_OVERRIDE;
void mouseMoveEvent(QMouseEvent* event) CV_OVERRIDE;
void mousePressEvent(QMouseEvent* event) CV_OVERRIDE;
void mouseReleaseEvent(QMouseEvent* event) CV_OVERRIDE;
void mouseDoubleClickEvent(QMouseEvent* event) CV_OVERRIDE;
QSize sizeHint() const;
QSize sizeHint() const CV_OVERRIDE;
private:
QSize size;
@ -482,25 +482,25 @@ class DefaultViewPort : public QGraphicsView, public OCVViewPort
public:
DefaultViewPort(CvWindow* centralWidget, int arg2);
~DefaultViewPort();
~DefaultViewPort() CV_OVERRIDE;
QWidget* getWidget();
QWidget* getWidget() CV_OVERRIDE;
void writeSettings(QSettings& settings);
void readSettings(QSettings& settings);
void writeSettings(QSettings& settings) CV_OVERRIDE;
void readSettings(QSettings& settings) CV_OVERRIDE;
double getRatio();
void setRatio(int flags);
double getRatio() CV_OVERRIDE;
void setRatio(int flags) CV_OVERRIDE;
void updateImage(const CvArr* arr);
void updateImage(const CvArr* arr) CV_OVERRIDE;
void startDisplayInfo(QString text, int delayms);
void startDisplayInfo(QString text, int delayms) CV_OVERRIDE;
void setOpenGlDrawCallback(CvOpenGlDrawCallback callback, void* userdata);
void makeCurrentOpenGlContext();
void updateGl();
void setOpenGlDrawCallback(CvOpenGlDrawCallback callback, void* userdata) CV_OVERRIDE;
void makeCurrentOpenGlContext() CV_OVERRIDE;
void updateGl() CV_OVERRIDE;
void setSize(QSize size_);
void setSize(QSize size_) CV_OVERRIDE;
public slots:
//reference:
@ -520,15 +520,15 @@ public slots:
void saveView();
protected:
void contextMenuEvent(QContextMenuEvent* event);
void resizeEvent(QResizeEvent* event);
void paintEvent(QPaintEvent* paintEventInfo);
void contextMenuEvent(QContextMenuEvent* event) CV_OVERRIDE;
void resizeEvent(QResizeEvent* event) CV_OVERRIDE;
void paintEvent(QPaintEvent* paintEventInfo) CV_OVERRIDE;
void wheelEvent(QWheelEvent* event);
void mouseMoveEvent(QMouseEvent* event);
void mousePressEvent(QMouseEvent* event);
void mouseReleaseEvent(QMouseEvent* event);
void mouseDoubleClickEvent(QMouseEvent* event);
void wheelEvent(QWheelEvent* event) CV_OVERRIDE;
void mouseMoveEvent(QMouseEvent* event) CV_OVERRIDE;
void mousePressEvent(QMouseEvent* event) CV_OVERRIDE;
void mouseReleaseEvent(QMouseEvent* event) CV_OVERRIDE;
void mouseDoubleClickEvent(QMouseEvent* event) CV_OVERRIDE;
private:
int param_keepRatio;
@ -552,7 +552,7 @@ private:
bool isSameSize(IplImage* img1,IplImage* img2);
QSize sizeHint() const;
QSize sizeHint() const CV_OVERRIDE;
QPointer<CvWindow> centralWidget;
QPointer<QTimer> timerDisplay;
bool drawInfo;
@ -566,7 +566,7 @@ private:
void drawStatusBar();
void controlImagePosition();
void icvmouseProcessing(QPointF pt, int cv_event, int flags);
void icvmouseProcessing(QPointF pt, int cv_event, int flags) CV_OVERRIDE;
private slots:
void stopDisplayInfo();

@ -32,6 +32,8 @@
# pragma comment(lib, "glu32.lib")
#endif
using namespace cv;
/*
// Press key to
// 1 processing on CPU
@ -64,7 +66,7 @@ public:
~GLWinApp() {}
virtual void cleanup()
virtual void cleanup() CV_OVERRIDE
{
m_shutdown = true;
#if defined(__linux__)
@ -75,7 +77,7 @@ public:
}
#if defined(_WIN32)
virtual LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
virtual LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) CV_OVERRIDE
{
switch (message)
{
@ -121,7 +123,7 @@ public:
#endif
#if defined(__linux__)
int handle_event(XEvent& e)
int handle_event(XEvent& e) CV_OVERRIDE
{
switch(e.type)
{
@ -167,7 +169,7 @@ public:
}
#endif
int init()
int init() CV_OVERRIDE
{
#if defined(_WIN32)
m_hDC = GetDC(m_hWnd);
@ -258,12 +260,12 @@ public:
#endif
}
void idle()
void idle() CV_OVERRIDE
{
render();
}
int render()
int render() CV_OVERRIDE
{
try
{

Loading…
Cancel
Save