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
2f9aedfa
Commit
2f9aedfa
authored
Jun 20, 2010
by
Yannick Verdie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New functions with QT GUI:
- fix c++ wrapper - rename cvInformation in cvDisplayOverlay
parent
bd643ad5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
61 additions
and
64 deletions
+61
-64
highgui.hpp
modules/highgui/include/opencv2/highgui/highgui.hpp
+1
-0
highgui_c.h
modules/highgui/include/opencv2/highgui/highgui_c.h
+1
-1
window.cpp
modules/highgui/src/window.cpp
+2
-6
window_QT.cpp
modules/highgui/src/window_QT.cpp
+1
-1
window_QT.h
modules/highgui/src/window_QT.h
+56
-56
No files found.
modules/highgui/include/opencv2/highgui/highgui.hpp
View file @
2f9aedfa
...
...
@@ -68,6 +68,7 @@ CV_EXPORTS int startWindowThread();
CV_EXPORTS
void
setWindowProperty
(
const
string
&
winname
,
int
prop_id
,
double
prop_value
);
//YV
CV_EXPORTS
double
getWindowProperty
(
const
string
&
winname
,
int
prop_id
);
//YV
CV_EXPORTS
void
displayOverlay
(
const
string
&
winname
,
const
string
&
text
,
int
delayms
);
CV_EXPORTS
void
imshow
(
const
string
&
winname
,
const
Mat
&
mat
);
...
...
modules/highgui/include/opencv2/highgui/highgui_c.h
View file @
2f9aedfa
...
...
@@ -58,7 +58,7 @@ extern "C" {
\****************************************************************************************/
//YV
//-----------New for QT
CVAPI
(
void
)
cv
Information
(
const
char
*
name
,
const
char
*
text
,
int
delayms
);
CVAPI
(
void
)
cv
DisplayOverlay
(
const
char
*
name
,
const
char
*
text
,
int
delayms
);
CVAPI
(
int
)
cvStartLoop
(
int
(
*
pt2Func
)(
int
argc
,
char
*
argv
[]),
int
argc
,
char
*
argv
[]);
CVAPI
(
void
)
cvStopLoop
();
//----------------------
...
...
modules/highgui/src/window.cpp
View file @
2f9aedfa
...
...
@@ -125,24 +125,20 @@ void destroyWindow( const string& winname )
cvDestroyWindow
(
winname
.
c_str
()
);
}
//YV
void
setWindowProperty
(
const
string
&
winname
,
int
prop_id
,
double
prop_value
)
{
cvSetWindowProperty
(
winname
.
c_str
(),
prop_id
,
prop_value
);
}
//YV
double
getWindowProperty
(
const
string
&
winname
,
int
prop_id
)
{
return
cvGetWindowProperty
(
winname
.
c_str
(),
prop_id
);
}
/*
void information(const string& name, const string& text, int delayms)
void
displayOverlay
(
const
string
&
name
,
const
string
&
text
,
int
delayms
)
{
cv
Information
(name.c_str(),text.c_str(), delayms);
cv
DisplayOverlay
(
name
.
c_str
(),
text
.
c_str
(),
delayms
);
}
* */
void
imshow
(
const
string
&
winname
,
const
Mat
&
img
)
{
...
...
modules/highgui/src/window_QT.cpp
View file @
2f9aedfa
...
...
@@ -96,7 +96,7 @@ double cvGetModeWindow_QT(const char* name)
return
result
;
}
CV_IMPL
void
cv
Information
(
const
char
*
name
,
const
char
*
text
,
int
delayms
)
CV_IMPL
void
cv
DisplayOverlay
(
const
char
*
name
,
const
char
*
text
,
int
delayms
)
{
QMetaObject
::
invokeMethod
(
&
guiMainThread
,
...
...
modules/highgui/src/window_QT.h
View file @
2f9aedfa
...
...
@@ -238,61 +238,61 @@ private slots:
//here css for trackbar
/* from http://thesmithfam.org/blog/2010/03/10/fancy-qslider-stylesheet */
static
const
QString
str_Trackbar_css
=
QString
(
""
)
+
"QSlider::groove:horizontal {"
+
"border: 1px solid #bbb;"
+
"background: white;"
+
"height: 10px;"
+
"border-radius: 4px;"
+
"}"
+
"QSlider::sub-page:horizontal {"
+
"background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,"
+
"stop: 0 #66e, stop: 1 #bbf);"
+
"background: qlineargradient(x1: 0, y1: 0.2, x2: 1, y2: 1,"
+
"stop: 0 #bbf, stop: 1 #55f);"
+
"border: 1px solid #777;"
+
"height: 10px;"
+
"border-radius: 4px;"
+
"}"
+
"QSlider::add-page:horizontal {"
+
"background: #fff;"
+
"border: 1px solid #777;"
+
"height: 10px;"
+
"border-radius: 4px;"
+
"}"
+
"QSlider::handle:horizontal {"
+
"background: qlineargradient(x1:0, y1:0, x2:1, y2:1,"
+
"stop:0 #eee, stop:1 #ccc);"
+
"border: 1px solid #777;"
+
"width: 13px;"
+
"margin-top: -2px;"
+
"margin-bottom: -2px;"
+
"border-radius: 4px;"
+
"}"
+
"QSlider::handle:horizontal:hover {"
+
"background: qlineargradient(x1:0, y1:0, x2:1, y2:1,"
+
"stop:0 #fff, stop:1 #ddd);"
+
"border: 1px solid #444;"
+
"border-radius: 4px;"
+
"}"
+
"QSlider::sub-page:horizontal:disabled {"
+
"background: #bbb;"
+
"border-color: #999;"
+
"}"
+
"QSlider::add-page:horizontal:disabled {"
+
"background: #eee;"
+
"border-color: #999;"
+
"}"
+
"QSlider::handle:horizontal:disabled {"
+
"background: #eee;"
+
"border: 1px solid #aaa;"
+
"border-radius: 4px;"
+
"}"
;
+
"QSlider::groove:horizontal {"
+
"border: 1px solid #bbb;"
+
"background: white;"
+
"height: 10px;"
+
"border-radius: 4px;"
+
"}"
+
"QSlider::sub-page:horizontal {"
+
"background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,"
+
"stop: 0 #66e, stop: 1 #bbf);"
+
"background: qlineargradient(x1: 0, y1: 0.2, x2: 1, y2: 1,"
+
"stop: 0 #bbf, stop: 1 #55f);"
+
"border: 1px solid #777;"
+
"height: 10px;"
+
"border-radius: 4px;"
+
"}"
+
"QSlider::add-page:horizontal {"
+
"background: #fff;"
+
"border: 1px solid #777;"
+
"height: 10px;"
+
"border-radius: 4px;"
+
"}"
+
"QSlider::handle:horizontal {"
+
"background: qlineargradient(x1:0, y1:0, x2:1, y2:1,"
+
"stop:0 #eee, stop:1 #ccc);"
+
"border: 1px solid #777;"
+
"width: 13px;"
+
"margin-top: -2px;"
+
"margin-bottom: -2px;"
+
"border-radius: 4px;"
+
"}"
+
"QSlider::handle:horizontal:hover {"
+
"background: qlineargradient(x1:0, y1:0, x2:1, y2:1,"
+
"stop:0 #fff, stop:1 #ddd);"
+
"border: 1px solid #444;"
+
"border-radius: 4px;"
+
"}"
+
"QSlider::sub-page:horizontal:disabled {"
+
"background: #bbb;"
+
"border-color: #999;"
+
"}"
+
"QSlider::add-page:horizontal:disabled {"
+
"background: #eee;"
+
"border-color: #999;"
+
"}"
+
"QSlider::handle:horizontal:disabled {"
+
"background: #eee;"
+
"border: 1px solid #aaa;"
+
"border-radius: 4px;"
+
"}"
;
#endif
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