Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
82fd00af
Commit
82fd00af
authored
Mar 30, 2018
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix build issues with QT/OpenGL
parent
5195a738
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
57 additions
and
55 deletions
+57
-55
window_QT.h
modules/highgui/src/window_QT.h
+49
-49
opengl_interop.cpp
samples/opengl/opengl_interop.cpp
+8
-6
No files found.
modules/highgui/src/window_QT.h
View file @
82fd00af
...
@@ -278,9 +278,9 @@ public:
...
@@ -278,9 +278,9 @@ public:
QPointer
<
QBoxLayout
>
myLayout
;
QPointer
<
QBoxLayout
>
myLayout
;
private
:
private
:
void
closeEvent
(
QCloseEvent
*
e
);
void
closeEvent
(
QCloseEvent
*
e
)
CV_OVERRIDE
;
void
showEvent
(
QShowEvent
*
event
)
;
void
showEvent
(
QShowEvent
*
event
)
CV_OVERRIDE
;
void
hideEvent
(
QHideEvent
*
event
)
;
void
hideEvent
(
QHideEvent
*
event
)
CV_OVERRIDE
;
};
};
...
@@ -339,7 +339,7 @@ public:
...
@@ -339,7 +339,7 @@ public:
QPointer
<
QLabel
>
myStatusBar_msg
;
QPointer
<
QLabel
>
myStatusBar_msg
;
protected
:
protected
:
virtual
void
keyPressEvent
(
QKeyEvent
*
event
);
virtual
void
keyPressEvent
(
QKeyEvent
*
event
)
CV_OVERRIDE
;
private
:
private
:
...
@@ -414,8 +414,8 @@ class OCVViewPort : public ViewPort
...
@@ -414,8 +414,8 @@ class OCVViewPort : public ViewPort
{
{
public
:
public
:
explicit
OCVViewPort
();
explicit
OCVViewPort
();
~
OCVViewPort
()
{};
~
OCVViewPort
()
CV_OVERRIDE
{};
void
setMouseCallBack
(
CvMouseCallback
callback
,
void
*
param
);
void
setMouseCallBack
(
CvMouseCallback
callback
,
void
*
param
)
CV_OVERRIDE
;
protected
:
protected
:
void
icvmouseEvent
(
QMouseEvent
*
event
,
type_mouse_event
category
);
void
icvmouseEvent
(
QMouseEvent
*
event
,
type_mouse_event
category
);
...
@@ -433,38 +433,38 @@ class OpenGlViewPort : public QGLWidget, public OCVViewPort
...
@@ -433,38 +433,38 @@ class OpenGlViewPort : public QGLWidget, public OCVViewPort
{
{
public
:
public
:
explicit
OpenGlViewPort
(
QWidget
*
parent
);
explicit
OpenGlViewPort
(
QWidget
*
parent
);
~
OpenGlViewPort
();
~
OpenGlViewPort
()
CV_OVERRIDE
;
QWidget
*
getWidget
();
QWidget
*
getWidget
()
CV_OVERRIDE
;
void
writeSettings
(
QSettings
&
settings
);
void
writeSettings
(
QSettings
&
settings
)
CV_OVERRIDE
;
void
readSettings
(
QSettings
&
settings
);
void
readSettings
(
QSettings
&
settings
)
CV_OVERRIDE
;
double
getRatio
();
double
getRatio
()
CV_OVERRIDE
;
void
setRatio
(
int
flags
);
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
setOpenGlDrawCallback
(
CvOpenGlDrawCallback
callback
,
void
*
userdata
)
CV_OVERRIDE
;
void
makeCurrentOpenGlContext
();
void
makeCurrentOpenGlContext
()
CV_OVERRIDE
;
void
updateGl
();
void
updateGl
()
CV_OVERRIDE
;
void
setSize
(
QSize
size_
);
void
setSize
(
QSize
size_
)
CV_OVERRIDE
;
protected
:
protected
:
void
initializeGL
();
void
initializeGL
()
CV_OVERRIDE
;
void
resizeGL
(
int
w
,
int
h
);
void
resizeGL
(
int
w
,
int
h
)
CV_OVERRIDE
;
void
paintGL
();
void
paintGL
()
CV_OVERRIDE
;
void
wheelEvent
(
QWheelEvent
*
event
);
void
wheelEvent
(
QWheelEvent
*
event
)
CV_OVERRIDE
;
void
mouseMoveEvent
(
QMouseEvent
*
event
);
void
mouseMoveEvent
(
QMouseEvent
*
event
)
CV_OVERRIDE
;
void
mousePressEvent
(
QMouseEvent
*
event
);
void
mousePressEvent
(
QMouseEvent
*
event
)
CV_OVERRIDE
;
void
mouseReleaseEvent
(
QMouseEvent
*
event
);
void
mouseReleaseEvent
(
QMouseEvent
*
event
)
CV_OVERRIDE
;
void
mouseDoubleClickEvent
(
QMouseEvent
*
event
);
void
mouseDoubleClickEvent
(
QMouseEvent
*
event
)
CV_OVERRIDE
;
QSize
sizeHint
()
const
;
QSize
sizeHint
()
const
CV_OVERRIDE
;
private
:
private
:
QSize
size
;
QSize
size
;
...
@@ -482,25 +482,25 @@ class DefaultViewPort : public QGraphicsView, public OCVViewPort
...
@@ -482,25 +482,25 @@ class DefaultViewPort : public QGraphicsView, public OCVViewPort
public
:
public
:
DefaultViewPort
(
CvWindow
*
centralWidget
,
int
arg2
);
DefaultViewPort
(
CvWindow
*
centralWidget
,
int
arg2
);
~
DefaultViewPort
();
~
DefaultViewPort
()
CV_OVERRIDE
;
QWidget
*
getWidget
();
QWidget
*
getWidget
()
CV_OVERRIDE
;
void
writeSettings
(
QSettings
&
settings
);
void
writeSettings
(
QSettings
&
settings
)
CV_OVERRIDE
;
void
readSettings
(
QSettings
&
settings
);
void
readSettings
(
QSettings
&
settings
)
CV_OVERRIDE
;
double
getRatio
();
double
getRatio
()
CV_OVERRIDE
;
void
setRatio
(
int
flags
);
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
setOpenGlDrawCallback
(
CvOpenGlDrawCallback
callback
,
void
*
userdata
)
CV_OVERRIDE
;
void
makeCurrentOpenGlContext
();
void
makeCurrentOpenGlContext
()
CV_OVERRIDE
;
void
updateGl
();
void
updateGl
()
CV_OVERRIDE
;
void
setSize
(
QSize
size_
);
void
setSize
(
QSize
size_
)
CV_OVERRIDE
;
public
slots
:
public
slots
:
//reference:
//reference:
...
@@ -520,15 +520,15 @@ public slots:
...
@@ -520,15 +520,15 @@ public slots:
void
saveView
();
void
saveView
();
protected
:
protected
:
void
contextMenuEvent
(
QContextMenuEvent
*
event
);
void
contextMenuEvent
(
QContextMenuEvent
*
event
)
CV_OVERRIDE
;
void
resizeEvent
(
QResizeEvent
*
event
);
void
resizeEvent
(
QResizeEvent
*
event
)
CV_OVERRIDE
;
void
paintEvent
(
QPaintEvent
*
paintEventInfo
);
void
paintEvent
(
QPaintEvent
*
paintEventInfo
)
CV_OVERRIDE
;
void
wheelEvent
(
QWheelEvent
*
event
);
void
wheelEvent
(
QWheelEvent
*
event
)
CV_OVERRIDE
;
void
mouseMoveEvent
(
QMouseEvent
*
event
);
void
mouseMoveEvent
(
QMouseEvent
*
event
)
CV_OVERRIDE
;
void
mousePressEvent
(
QMouseEvent
*
event
);
void
mousePressEvent
(
QMouseEvent
*
event
)
CV_OVERRIDE
;
void
mouseReleaseEvent
(
QMouseEvent
*
event
);
void
mouseReleaseEvent
(
QMouseEvent
*
event
)
CV_OVERRIDE
;
void
mouseDoubleClickEvent
(
QMouseEvent
*
event
);
void
mouseDoubleClickEvent
(
QMouseEvent
*
event
)
CV_OVERRIDE
;
private
:
private
:
int
param_keepRatio
;
int
param_keepRatio
;
...
@@ -552,7 +552,7 @@ private:
...
@@ -552,7 +552,7 @@ private:
bool
isSameSize
(
IplImage
*
img1
,
IplImage
*
img2
);
bool
isSameSize
(
IplImage
*
img1
,
IplImage
*
img2
);
QSize
sizeHint
()
const
;
QSize
sizeHint
()
const
CV_OVERRIDE
;
QPointer
<
CvWindow
>
centralWidget
;
QPointer
<
CvWindow
>
centralWidget
;
QPointer
<
QTimer
>
timerDisplay
;
QPointer
<
QTimer
>
timerDisplay
;
bool
drawInfo
;
bool
drawInfo
;
...
@@ -566,7 +566,7 @@ private:
...
@@ -566,7 +566,7 @@ private:
void
drawStatusBar
();
void
drawStatusBar
();
void
controlImagePosition
();
void
controlImagePosition
();
void
icvmouseProcessing
(
QPointF
pt
,
int
cv_event
,
int
flags
);
void
icvmouseProcessing
(
QPointF
pt
,
int
cv_event
,
int
flags
)
CV_OVERRIDE
;
private
slots
:
private
slots
:
void
stopDisplayInfo
();
void
stopDisplayInfo
();
...
...
samples/opengl/opengl_interop.cpp
View file @
82fd00af
...
@@ -32,6 +32,8 @@
...
@@ -32,6 +32,8 @@
# pragma comment(lib, "glu32.lib")
# pragma comment(lib, "glu32.lib")
#endif
#endif
using
namespace
cv
;
/*
/*
// Press key to
// Press key to
// 1 processing on CPU
// 1 processing on CPU
...
@@ -64,7 +66,7 @@ public:
...
@@ -64,7 +66,7 @@ public:
~
GLWinApp
()
{}
~
GLWinApp
()
{}
virtual
void
cleanup
()
virtual
void
cleanup
()
CV_OVERRIDE
{
{
m_shutdown
=
true
;
m_shutdown
=
true
;
#if defined(__linux__)
#if defined(__linux__)
...
@@ -75,7 +77,7 @@ public:
...
@@ -75,7 +77,7 @@ public:
}
}
#if defined(_WIN32)
#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
)
switch
(
message
)
{
{
...
@@ -121,7 +123,7 @@ public:
...
@@ -121,7 +123,7 @@ public:
#endif
#endif
#if defined(__linux__)
#if defined(__linux__)
int
handle_event
(
XEvent
&
e
)
int
handle_event
(
XEvent
&
e
)
CV_OVERRIDE
{
{
switch
(
e
.
type
)
switch
(
e
.
type
)
{
{
...
@@ -167,7 +169,7 @@ public:
...
@@ -167,7 +169,7 @@ public:
}
}
#endif
#endif
int
init
()
int
init
()
CV_OVERRIDE
{
{
#if defined(_WIN32)
#if defined(_WIN32)
m_hDC
=
GetDC
(
m_hWnd
);
m_hDC
=
GetDC
(
m_hWnd
);
...
@@ -258,12 +260,12 @@ public:
...
@@ -258,12 +260,12 @@ public:
#endif
#endif
}
}
void
idle
()
void
idle
()
CV_OVERRIDE
{
{
render
();
render
();
}
}
int
render
()
int
render
()
CV_OVERRIDE
{
{
try
try
{
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment