\r
\r
endif()\r
+\r
+#YV\r
+############################### QT ################################\r
+set(HAVE_QT 0)\r
+set(HAVE_QT_OPENGL 0)\r
+set(AUTOSWITCH_QT 0)#uses to disable QT\r
+\r
+find_package(Qt4)# QUIET)\r
+if (QT4_FOUND AND AUTOSWITCH_QT)\r
+ set(WITH_QT ON CACHE BOOL "Build with QT Backend support")\r
+ set(HAVE_QT 1)\r
+ add_definitions(-DHAVE_QT=1)\r
+\r
+ if(UNIX)\r
+ if (APPLE)\r
+ set(WITH_CARBON 0)\r
+ message(STATUS "QT detected, so Carbon and Cocoa disabled")\r
+ else()\r
+ set(HAVE_GTK 0)\r
+ set(HAVE_GTHREAD 0)\r
+ message(STATUS "QT detected, so GTK and GThread disabled")\r
+ endif()\r
+ endif()\r
+ \r
+ #if (QT_QTOPENGL_FOUND)\r
+ # set(WITH_QT_OPENGL ON CACHE BOOL "add OpenGL extention to QT")\r
+ # set(HAVE_QT_OPENGL 1)\r
+ # add_definitions(-DOPENCV_GL=1)\r
+ #endif()\r
+endif()\r
\r
############################### TBB ################################\r
\r
message(STATUS " Linker flags (Debug): ${CMAKE_SHARED_LINKER_FLAGS} ${CMAKE_SHARED_LINKER_FLAGS_DEBUG}")\r
endif()\r
\r
+#YV\r
if(UNIX AND NOT APPLE)\r
-message(STATUS "")\r
-message(STATUS " GUI: ")\r
-message(STATUS " GTK+ 2.x: ${HAVE_GTK}")\r
-message(STATUS " GThread: ${HAVE_GTHREAD}")\r
-message(STATUS "")\r
+ message(STATUS "")\r
+ message(STATUS " GUI: ")\r
+ if (HAVE_QT)\r
+ message(STATUS " QT 4.x: ${HAVE_QT}")\r
+ message(STATUS " QT OpenGL support: ${HAVE_QT_OPENGL}")\r
+ else()\r
+ message(STATUS " GTK+ 2.x: ${HAVE_GTK}")\r
+ message(STATUS " GThread: ${HAVE_GTHREAD}")\r
+ endif()\r
+ message(STATUS "")\r
endif()\r
\r
if(APPLE)\r
-message(STATUS "")\r
-if(WITH_CARBON)\r
-message(STATUS " GUI Back-end: Carbon")\r
-else()\r
-message(STATUS " GUI Back-end: Cocoa")\r
-endif()\r
-message(STATUS "")\r
+ message(STATUS "")\r
+ if (HAVE_QT)\r
+ message(STATUS " GUI: ")\r
+ message(STATUS " QT 4.x: ${HAVE_QT}")\r
+ message(STATUS " QT OpenGL support: ${HAVE_QT_OPENGL}")\r
+ else()\r
+ if(WITH_CARBON)\r
+ message(STATUS " GUI Back-end: Carbon")\r
+ else()\r
+ message(STATUS " GUI Back-end: Cocoa")\r
+ endif()\r
+ message(STATUS "")\r
+ endif() \r
endif() \r
\r
message(STATUS " Image I/O: ")\r
list(APPEND highgui_ext_hdrs "${CMAKE_CURRENT_SOURCE_DIR}/include/opencv2/highgui/${h}")
endforeach()
+#YV
if(WIN32)
- set(highgui_srcs ${highgui_srcs} src/window_w32.cpp src/cap_vfw.cpp src/cap_cmu.cpp src/cap_w32.cpp src/cap_dshow.cpp)
+
+ if (HAVE_QT)
+
+ #SET(QT_USE_QTXML 1)
+ INCLUDE(${QT_USE_FILE})
+ SET(_MOC_HEADERS src/window_QT.h)
+ QT4_WRAP_CPP(_MOC_OUTFILES ${_MOC_HEADERS})
+
+ set(HIGHGUI_LIBRARIES ${HIGHGUI_LIBRARIES} ${QT_LIBRARIES})
+ set(highgui_srcs ${highgui_srcs} src/window_QT.cpp ${_MOC_OUTFILES})
+
+ else()
+ set(highgui_srcs ${highgui_srcs} src/window_w32.cpp)
+ endif()
+
+ set(highgui_srcs ${highgui_srcs} src/cap_vfw.cpp src/cap_cmu.cpp src/cap_w32.cpp src/cap_dshow.cpp)
if(HAVE_MIL)
set(highgui_srcs ${highgui_srcs} src/cap_mil.cpp)
endif()
endif()
if(UNIX)
- if(HAVE_GTK)
- set(highgui_srcs ${highgui_srcs} src/window_gtk.cpp)
+
+ if (HAVE_QT)
+
+ #SET(QT_USE_QTXML 1)
+ INCLUDE(${QT_USE_FILE})
+ SET(_MOC_HEADERS src/window_QT.h)
+ QT4_WRAP_CPP(_MOC_OUTFILES ${_MOC_HEADERS})
+
+ set(HIGHGUI_LIBRARIES ${HIGHGUI_LIBRARIES} ${QT_LIBRARIES})
+ set(highgui_srcs ${highgui_srcs} src/window_QT.cpp ${_MOC_OUTFILES})
+
+ else()
+ if(HAVE_GTK)
+ set(highgui_srcs ${highgui_srcs} src/window_gtk.cpp)
+ endif()
+
endif()
if(HAVE_XINE)
endforeach()
endif()
+#YV
if(APPLE)
add_definitions(-DHAVE_QUICKTIME=1)
if(NOT OPENCV_BUILD_3RDPARTY_LIBS)
add_definitions(-DHAVE_IMAGEIO=1)
endif()
- if(WITH_CARBON)
- add_definitions(-DHAVE_CARBON=1)
- set(highgui_srcs ${highgui_srcs} src/window_carbon.cpp)
+
+ if (HAVE_QT)
+
+ #SET(QT_USE_QTXML 1)
+ INCLUDE(${QT_USE_FILE})
+ SET(_MOC_HEADERS src/window_QT.h)
+ QT4_WRAP_CPP(_MOC_OUTFILES ${_MOC_HEADERS})
+
+ set(HIGHGUI_LIBRARIES ${HIGHGUI_LIBRARIES} ${QT_LIBRARIES})
+ set(highgui_srcs ${highgui_srcs} src/window_QT.cpp ${_MOC_OUTFILES})
+
else()
- add_definitions(-DHAVE_COCOA=1)
- set(highgui_srcs ${highgui_srcs} src/window_cocoa.mm)
+ if(WITH_CARBON)
+ add_definitions(-DHAVE_CARBON=1)
+ set(highgui_srcs ${highgui_srcs} src/window_carbon.cpp)
+ else()
+ add_definitions(-DHAVE_COCOA=1)
+ set(highgui_srcs ${highgui_srcs} src/window_cocoa.mm)
+ endif()
endif()
+
if(WITH_QUICKTIME)
set(highgui_srcs ${highgui_srcs} src/cap_qt.cpp)
else()
/* wait for key event infinitely (delay<=0) or for "delay" milliseconds */
CVAPI(int) cvWaitKey(int delay CV_DEFAULT(0));
+//YV
+#if defined (HAVE_QT)
+ //class CvWindow;
+ //class ViewPort;
+ struct CvTrackbar;
+
+ CVAPI(int) cvStartLoop(int (*pt2Func)(int argc, char *argv[]), int argc, char *argv[]);
+ CVAPI(void) cvStopLoop();
+ CVAPI(void) cvInformation(const char* name, const char* text, int delay);
+ CvTrackbar* icvFindTrackbarByName( const char* name_trackbar, const char* name_window );
+#endif
/****************************************************************************************\
* Working with Video Files and Cameras *
#elif defined (HAVE_GTK) // see window_gtk.cpp
#elif defined (HAVE_COCOA) // see window_carbon.cpp
#elif defined (HAVE_CARBON)
-
+#elif defined (HAVE_QT) //YV see window_QT.cpp
#else