Commit 9eea2a5f authored by Yannick Verdie's avatar Yannick Verdie

working on QT change/get win property (stylesheet for cvTrackBar fixed !!!)

parent d264907f
......@@ -59,6 +59,7 @@ set(highgui_srcs
set(highgui_hdrs src/precomp.hpp src/utils.hpp)
#YV
set(lib_hdr_names highgui_c.h highgui.hpp)
set(highgui_ext_hdrs)
foreach(h ${lib_hdr_names})
......@@ -73,7 +74,7 @@ if(WIN32)
#SET(QT_USE_QTXML 1)
INCLUDE(${QT_USE_FILE})
SET(_MOC_HEADERS src/window_QT.h)
SET(_MOC_HEADERS src/window_QT.h )
QT4_WRAP_CPP(_MOC_OUTFILES ${_MOC_HEADERS})
set(HIGHGUI_LIBRARIES ${HIGHGUI_LIBRARIES} ${QT_LIBRARIES})
......
......@@ -56,6 +56,12 @@ namespace cv
enum { WINDOW_AUTOSIZE=1 };
//YV
//-----------New for QT
//CV_EXPORTS void information(const string& name, const string& text, int delayms);
//------------
CV_EXPORTS void namedWindow( const string& winname, int flags CV_DEFAULT(WINDOW_AUTOSIZE) );
CV_EXPORTS void destroyWindow( const string& winname );
CV_EXPORTS int startWindowThread();
......
......@@ -56,6 +56,11 @@ extern "C" {
/****************************************************************************************\
* Basic GUI functions *
\****************************************************************************************/
//YV
//-----------New for QT
//CVAPI(void) cvInformation(const char* name, const char* text, int delayms);
//----------------------
/* this function is used to set some external parameters in case of X Window */
CVAPI(int) cvInitSystem( int argc, char** argv );
......@@ -76,10 +81,13 @@ enum
CV_WINDOW_FULLSCREEN = 1
};
/* Set and Get Property of the window */
CVAPI(void) cvSetWindowProperty(const char* name, int prop_id, double prop_value);
CVAPI(double) cvGetWindowProperty(const char* name, int prop_id);
CVAPI(void) cvInformation(const char* name, const char* text, int delayms);
/* display image within window (highgui windows remember their content) */
CVAPI(void) cvShowImage( const char* name, const CvArr* image );
......@@ -200,17 +208,8 @@ CVAPI(void) cvConvertImage( const CvArr* src, CvArr* dst, int flags CV_DEFAULT(0
/* 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
void cvInformation(const char* name, const char* text, int delay);
/****************************************************************************************\
* Working with Video Files and Cameras *
......
......@@ -171,6 +171,18 @@ void cvChangeMode_GTK(const char* name, double prop_value);
void cvChangeMode_CARBON(const char* name, double prop_value);
void cvChangeMode_QT(const char* name, double prop_value);
//#if defined (HAVE_QT)
//class CvWindow;
//class ViewPort;
//struct CvTrackbar;
////new functions available to the users
//#include "highgui_QT_extension.h"
////new functions hidden to the users
//CvTrackbar* icvFindTrackbarByName( const char* name_trackbar, const char* name_window );
//#endif
/*namespace cv
{
......
......@@ -131,6 +131,13 @@ 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)
{
cvInformation(name.c_str(),text.c_str(), delayms);
}
* */
void imshow( const string& winname, const Mat& img )
{
CvMat _img = img;
......
This diff is collapsed.
......@@ -37,6 +37,9 @@
//the use of this software, even if advised of the possibility of such damage.
//--------------------Google Code 2010 -- Yannick Verdie--------------------//
#ifndef __OPENCV_HIGHGUI_QT_H__
#define __OPENCV_HIGHGUI_QT_H__
#include "precomp.hpp"
......@@ -63,15 +66,15 @@
#include <QLabel>
#include <QIODevice>
//Macro here
#define CV_MODE_NORMAL 0
#define CV_MODE_OPENGL 1
//end macro
//Here declare everything
//need a .h to allow QT to use MOC (in order to use signal, slots, etc)
class CvWindow;
class ViewPort;
//class CvTrackbar;
class GuiReceiver : public QObject
{
......@@ -95,6 +98,8 @@ public slots:
void displayInfo( QString name, QString text, int delayms );
void refreshEvents();
void timeOut();
void toggleFullScreen(QString name, double flags );
double isFullScreen(QString name);
};
class CvTrackbar : public QHBoxLayout
......@@ -263,3 +268,5 @@ static const QString str_Trackbar_css = QString("")
+ "border: 1px solid #aaa;"
+ "border-radius: 4px;"
+ "}";
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment