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
7f2ac764
Commit
7f2ac764
authored
Oct 28, 2016
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7561 from paroj:winvisible
parents
bdfb4dec
358ec044
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
37 additions
and
1 deletion
+37
-1
highgui.hpp
modules/highgui/include/opencv2/highgui.hpp
+2
-1
highgui_c.h
modules/highgui/include/opencv2/highgui/highgui_c.h
+1
-0
precomp.hpp
modules/highgui/src/precomp.hpp
+1
-0
window.cpp
modules/highgui/src/window.cpp
+8
-0
window_QT.cpp
modules/highgui/src/window_QT.cpp
+24
-0
window_QT.h
modules/highgui/src/window_QT.h
+1
-0
No files found.
modules/highgui/include/opencv2/highgui.hpp
View file @
7f2ac764
...
...
@@ -196,7 +196,8 @@ enum WindowPropertyFlags {
WND_PROP_FULLSCREEN
=
0
,
//!< fullscreen property (can be WINDOW_NORMAL or WINDOW_FULLSCREEN).
WND_PROP_AUTOSIZE
=
1
,
//!< autosize property (can be WINDOW_NORMAL or WINDOW_AUTOSIZE).
WND_PROP_ASPECT_RATIO
=
2
,
//!< window's aspect ration (can be set to WINDOW_FREERATIO or WINDOW_KEEPRATIO).
WND_PROP_OPENGL
=
3
//!< opengl support.
WND_PROP_OPENGL
=
3
,
//!< opengl support.
WND_PROP_VISIBLE
=
4
//!< checks whether the window exists and is visible
};
//! Mouse Events see cv::MouseCallback
...
...
modules/highgui/include/opencv2/highgui/highgui_c.h
View file @
7f2ac764
...
...
@@ -111,6 +111,7 @@ enum
CV_WND_PROP_AUTOSIZE
=
1
,
//to change/get window's autosize property
CV_WND_PROP_ASPECTRATIO
=
2
,
//to change/get window's aspectratio property
CV_WND_PROP_OPENGL
=
3
,
//to change/get window's opengl support
CV_WND_PROP_VISIBLE
=
4
,
//These 2 flags are used by cvNamedWindow and cvSet/GetWindowProperty
CV_WINDOW_NORMAL
=
0x00000000
,
//the user can resize the window (no constraint) / also use to switch a fullscreen window to a normal size
...
...
modules/highgui/src/precomp.hpp
View file @
7f2ac764
...
...
@@ -123,6 +123,7 @@ double cvGetRatioWindow_QT(const char* name);
void
cvSetRatioWindow_QT
(
const
char
*
name
,
double
prop_value
);
double
cvGetOpenGlProp_QT
(
const
char
*
name
);
double
cvGetPropVisible_QT
(
const
char
*
name
);
#endif
#endif
/* __HIGHGUI_H_ */
modules/highgui/src/window.cpp
View file @
7f2ac764
...
...
@@ -153,6 +153,14 @@ CV_IMPL double cvGetWindowProperty(const char* name, int prop_id)
#endif
break
;
case
CV_WND_PROP_VISIBLE
:
#if defined (HAVE_QT)
return
cvGetPropVisible_QT
(
name
);
#else
return
-
1
;
#endif
break
;
default:
return
-
1
;
}
...
...
modules/highgui/src/window_QT.cpp
View file @
7f2ac764
...
...
@@ -138,6 +138,20 @@ double cvGetRatioWindow_QT(const char* name)
return
result
;
}
double
cvGetPropVisible_QT
(
const
char
*
name
)
{
if
(
!
guiMainThread
)
CV_Error
(
CV_StsNullPtr
,
"NULL guiReceiver (please create a window)"
);
double
result
=
0
;
QMetaObject
::
invokeMethod
(
guiMainThread
,
"getWindowVisible"
,
autoBlockingConnection
(),
Q_RETURN_ARG
(
double
,
result
),
Q_ARG
(
QString
,
QString
(
name
)));
return
result
;
}
void
cvSetRatioWindow_QT
(
const
char
*
name
,
double
prop_value
)
{
...
...
@@ -903,6 +917,16 @@ double GuiReceiver::getPropWindow(QString name)
return
(
double
)
w
->
getPropWindow
();
}
double
GuiReceiver
::
getWindowVisible
(
QString
name
)
{
QPointer
<
CvWindow
>
w
=
icvFindWindowByName
(
name
);
if
(
!
w
)
return
0
;
return
(
double
)
w
->
isVisible
();
}
void
GuiReceiver
::
setPropWindow
(
QString
name
,
double
arg2
)
{
...
...
modules/highgui/src/window_QT.h
View file @
7f2ac764
...
...
@@ -132,6 +132,7 @@ public slots:
double
getPropWindow
(
QString
name
);
void
setPropWindow
(
QString
name
,
double
flags
);
void
setWindowTitle
(
QString
name
,
QString
title
);
double
getWindowVisible
(
QString
name
);
double
getRatioWindow
(
QString
name
);
void
setRatioWindow
(
QString
name
,
double
arg2
);
void
saveWindowParameters
(
QString
name
);
...
...
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