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:
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
();
...
...
samples/opengl/opengl_interop.cpp
View file @
82fd00af
...
...
@@ -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
{
...
...
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