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
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
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_ */
#endif
break;
+ case CV_WND_PROP_VISIBLE:
+ #if defined (HAVE_QT)
+ return cvGetPropVisible_QT(name);
+ #else
+ return -1;
+ #endif
+ break;
+
default:
return -1;
}
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)
{
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)
{
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);