diff --git a/modules/highgui/include/opencv2/highgui/highgui.hpp b/modules/highgui/include/opencv2/highgui/highgui.hpp index 05fdfa9be..3663a93a9 100644 --- a/modules/highgui/include/opencv2/highgui/highgui.hpp +++ b/modules/highgui/include/opencv2/highgui/highgui.hpp @@ -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 ); diff --git a/modules/highgui/include/opencv2/highgui/highgui_c.h b/modules/highgui/include/opencv2/highgui/highgui_c.h index 1293e5daf..2c5b61616 100644 --- a/modules/highgui/include/opencv2/highgui/highgui_c.h +++ b/modules/highgui/include/opencv2/highgui/highgui_c.h @@ -58,7 +58,7 @@ extern "C" { \****************************************************************************************/ //YV //-----------New for QT -CVAPI(void) cvInformation(const char* name, const char* text, int delayms); +CVAPI(void) cvDisplayOverlay(const char* name, const char* text, int delayms); CVAPI(int) cvStartLoop(int (*pt2Func)(int argc, char *argv[]), int argc, char* argv[]); CVAPI(void) cvStopLoop(); //---------------------- diff --git a/modules/highgui/src/window.cpp b/modules/highgui/src/window.cpp index 887cbfe9c..6c3b8132e 100644 --- a/modules/highgui/src/window.cpp +++ b/modules/highgui/src/window.cpp @@ -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) { - cvInformation(name.c_str(),text.c_str(), delayms); + cvDisplayOverlay(name.c_str(),text.c_str(), delayms); } -* */ void imshow( const string& winname, const Mat& img ) { diff --git a/modules/highgui/src/window_QT.cpp b/modules/highgui/src/window_QT.cpp index 140d6c60c..9bea29e71 100755 --- a/modules/highgui/src/window_QT.cpp +++ b/modules/highgui/src/window_QT.cpp @@ -96,7 +96,7 @@ double cvGetModeWindow_QT(const char* name) return result; } -CV_IMPL void cvInformation(const char* name, const char* text, int delayms) +CV_IMPL void cvDisplayOverlay(const char* name, const char* text, int delayms) { QMetaObject::invokeMethod(&guiMainThread, diff --git a/modules/highgui/src/window_QT.h b/modules/highgui/src/window_QT.h index d62b623cc..d52f4ceea 100644 --- a/modules/highgui/src/window_QT.h +++ b/modules/highgui/src/window_QT.h @@ -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::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::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::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 {" ++ "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::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::sub-page:horizontal:disabled {" ++ "background: #bbb;" ++ "border-color: #999;" ++ "}" - + "QSlider::add-page:horizontal:disabled {" - + "background: #eee;" - + "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::handle:horizontal:disabled {" ++ "background: #eee;" ++ "border: 1px solid #aaa;" ++ "border-radius: 4px;" ++ "}"; #endif