Added destroyAllWindows and docs (ticket #957).
This commit is contained in:
@@ -104,6 +104,8 @@ The function ``namedWindow`` creates a window that can be used as a placeholder
|
|||||||
|
|
||||||
If a window with the same name already exists, the function does nothing.
|
If a window with the same name already exists, the function does nothing.
|
||||||
|
|
||||||
|
You can call :cpp:func:`destroyWindow` or :cpp:func:`destroyAllWindows` to close the window and de-allocate any associated memory usage. For a simple program, you don’t really have to call these functions because all the resources and windows of the application are closed automatically by the operating system upon exit.
|
||||||
|
|
||||||
|
|
||||||
**[Qt Backend Only]**
|
**[Qt Backend Only]**
|
||||||
Qt-specific details:
|
Qt-specific details:
|
||||||
@@ -126,6 +128,36 @@ Qt-specific details:
|
|||||||
|
|
||||||
..
|
..
|
||||||
|
|
||||||
|
|
||||||
|
.. index:: destroyWindow
|
||||||
|
|
||||||
|
.. _destroyWindow:
|
||||||
|
|
||||||
|
destroyWindow
|
||||||
|
-------------
|
||||||
|
.. ocv:function:: void destroyWindow( const string &winname )
|
||||||
|
|
||||||
|
Destroys a window.
|
||||||
|
|
||||||
|
:param winname: Name of the window to be destroyed.
|
||||||
|
|
||||||
|
The function ``destroyWindow`` destroys the window with the given name.
|
||||||
|
|
||||||
|
|
||||||
|
.. index:: destroyAllWindows
|
||||||
|
|
||||||
|
.. _destroyAllWindows:
|
||||||
|
|
||||||
|
destroyAllWindows
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
.. ocv:function:: void destroyAllWindows()
|
||||||
|
|
||||||
|
Destroys all of the HighGUI windows.
|
||||||
|
|
||||||
|
The function ``destroyAllWindows`` destroys all of the opened HighGUI windows.
|
||||||
|
|
||||||
|
|
||||||
.. index:: setTrackbarPos
|
.. index:: setTrackbarPos
|
||||||
|
|
||||||
.. _setTrackbarPos:
|
.. _setTrackbarPos:
|
||||||
|
@@ -58,6 +58,7 @@ enum { WINDOW_AUTOSIZE=1 };
|
|||||||
|
|
||||||
CV_EXPORTS_W void namedWindow( const string& winname, int flags=WINDOW_AUTOSIZE );
|
CV_EXPORTS_W void namedWindow( const string& winname, int flags=WINDOW_AUTOSIZE );
|
||||||
CV_EXPORTS_W void destroyWindow( const string& winname );
|
CV_EXPORTS_W void destroyWindow( const string& winname );
|
||||||
|
CV_EXPORTS_W void destroyAllWindows();
|
||||||
CV_EXPORTS_W int startWindowThread();
|
CV_EXPORTS_W int startWindowThread();
|
||||||
|
|
||||||
CV_EXPORTS_W void setWindowProperty(const string& winname, int prop_id, double prop_value);//YV
|
CV_EXPORTS_W void setWindowProperty(const string& winname, int prop_id, double prop_value);//YV
|
||||||
|
@@ -136,6 +136,11 @@ void cv::destroyWindow( const string& winname )
|
|||||||
cvDestroyWindow( winname.c_str() );
|
cvDestroyWindow( winname.c_str() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void cv::destroyAllWindows()
|
||||||
|
{
|
||||||
|
cvDestroyAllWindows();
|
||||||
|
}
|
||||||
|
|
||||||
void cv::setWindowProperty(const string& winname, int prop_id, double prop_value)
|
void cv::setWindowProperty(const string& winname, int prop_id, double prop_value)
|
||||||
{
|
{
|
||||||
cvSetWindowProperty( winname.c_str(),prop_id,prop_value);
|
cvSetWindowProperty( winname.c_str(),prop_id,prop_value);
|
||||||
|
Reference in New Issue
Block a user