2010-06-11 04:03:52 +08:00
|
|
|
//IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
|
|
|
|
|
|
|
// By downloading, copying, installing or using the software you agree to this license.
|
|
|
|
// If you do not agree to this license, do not download, install,
|
|
|
|
// copy or use the software.
|
|
|
|
|
|
|
|
|
|
|
|
// License Agreement
|
|
|
|
// For Open Source Computer Vision Library
|
|
|
|
|
|
|
|
//Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
|
|
|
|
//Copyright (C) 2008-2010, Willow Garage Inc., all rights reserved.
|
|
|
|
//Third party copyrights are property of their respective owners.
|
|
|
|
|
|
|
|
//Redistribution and use in source and binary forms, with or without modification,
|
|
|
|
//are permitted provided that the following conditions are met:
|
|
|
|
|
|
|
|
// * Redistribution's of source code must retain the above copyright notice,
|
|
|
|
// this list of conditions and the following disclaimer.
|
|
|
|
|
|
|
|
// * Redistribution's in binary form must reproduce the above copyright notice,
|
|
|
|
// this list of conditions and the following disclaimer in the documentation
|
|
|
|
// and/or other materials provided with the distribution.
|
|
|
|
|
|
|
|
// * The name of the copyright holders may not be used to endorse or promote products
|
|
|
|
// derived from this software without specific prior written permission.
|
|
|
|
|
|
|
|
//This software is provided by the copyright holders and contributors "as is" and
|
|
|
|
//any express or implied warranties, including, but not limited to, the implied
|
|
|
|
//warranties of merchantability and fitness for a particular purpose are disclaimed.
|
|
|
|
//In no event shall the Intel Corporation or contributors be liable for any direct,
|
|
|
|
//indirect, incidental, special, exemplary, or consequential damages
|
|
|
|
//(including, but not limited to, procurement of substitute goods or services;
|
|
|
|
//loss of use, data, or profits; or business interruption) however caused
|
|
|
|
//and on any theory of liability, whether in contract, strict liability,
|
|
|
|
//or tort (including negligence or otherwise) arising in any way out of
|
|
|
|
//the use of this software, even if advised of the possibility of such damage.
|
|
|
|
|
|
|
|
//--------------------Google Code 2010 -- Yannick Verdie--------------------//
|
2010-06-13 00:36:46 +08:00
|
|
|
#ifndef __OPENCV_HIGHGUI_QT_H__
|
|
|
|
#define __OPENCV_HIGHGUI_QT_H__
|
|
|
|
|
2010-06-11 04:03:52 +08:00
|
|
|
|
|
|
|
#include "precomp.hpp"
|
|
|
|
|
|
|
|
#if defined(OPENCV_GL)
|
2010-06-26 22:33:14 +08:00
|
|
|
#include <QtOpenGL>
|
2010-07-08 01:53:59 +08:00
|
|
|
#include <QGLWidget>
|
2010-06-11 04:03:52 +08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <QAbstractEventDispatcher>
|
|
|
|
#include <QtGui/QApplication>
|
|
|
|
#include <QFile>
|
|
|
|
#include <QPushButton>
|
|
|
|
#include <QtGui/QGraphicsView>
|
|
|
|
#include <QSizePolicy>
|
|
|
|
#include <QInputDialog>
|
|
|
|
#include <QtGui/QBoxLayout>
|
|
|
|
#include <QSettings>
|
|
|
|
#include <qtimer.h>
|
|
|
|
#include <QtConcurrentRun>
|
|
|
|
#include <QWaitCondition>
|
|
|
|
#include <QKeyEvent>
|
|
|
|
#include <QMetaObject>
|
|
|
|
#include <QPointer>
|
|
|
|
#include <QSlider>
|
|
|
|
#include <QLabel>
|
|
|
|
#include <QIODevice>
|
2010-06-20 02:57:04 +08:00
|
|
|
#include <QShortcut>
|
2010-06-23 01:15:49 +08:00
|
|
|
#include <QStatusBar>
|
2010-06-30 06:14:24 +08:00
|
|
|
#include <QVarLengthArray>
|
2010-07-08 01:53:59 +08:00
|
|
|
#include <QFileInfo>
|
|
|
|
#include <QDate>
|
|
|
|
#include <QFileDialog>
|
2010-07-16 17:12:15 +08:00
|
|
|
#include <QToolBar>
|
|
|
|
#include <QAction>
|
2010-07-23 04:39:44 +08:00
|
|
|
#include <QPushButton>
|
|
|
|
#include <QCheckBox>
|
|
|
|
#include <QMenu>
|
2010-07-08 01:53:59 +08:00
|
|
|
|
2010-07-16 17:12:15 +08:00
|
|
|
//start private enum
|
2010-07-08 01:53:59 +08:00
|
|
|
enum {CV_MODE_NORMAL= 0, CV_MODE_OPENGL = 1};
|
|
|
|
|
|
|
|
//we can change the keyboard shortcuts from here !
|
|
|
|
enum { shortcut_zoom_normal = Qt::CTRL + Qt::Key_Z,
|
|
|
|
shortcut_zoom_imgRegion = Qt::CTRL + Qt::Key_X,
|
|
|
|
shortcut_save_img = Qt::CTRL + Qt::Key_S,
|
|
|
|
shortcut_properties_win = Qt::CTRL + Qt::Key_P,
|
|
|
|
shortcut_zoom_in = Qt::CTRL + Qt::Key_Plus,//QKeySequence(QKeySequence::ZoomIn),
|
|
|
|
shortcut_zoom_out = Qt::CTRL + Qt::Key_Minus,//QKeySequence(QKeySequence::ZoomOut),
|
|
|
|
shortcut_panning_left = Qt::CTRL + Qt::Key_Left,
|
|
|
|
shortcut_panning_right = Qt::CTRL + Qt::Key_Right,
|
|
|
|
shortcut_panning_up = Qt::CTRL + Qt::Key_Up,
|
|
|
|
shortcut_panning_down = Qt::CTRL + Qt::Key_Down
|
|
|
|
};
|
|
|
|
|
2010-07-12 19:04:26 +08:00
|
|
|
//end enum
|
2010-06-11 04:03:52 +08:00
|
|
|
|
2010-06-13 00:36:46 +08:00
|
|
|
class CvWindow;
|
|
|
|
class ViewPort;
|
|
|
|
|
2010-07-20 17:39:36 +08:00
|
|
|
|
2010-06-11 04:03:52 +08:00
|
|
|
class GuiReceiver : public QObject
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
GuiReceiver();
|
|
|
|
int start();
|
|
|
|
bool _bTimeOut;
|
2010-06-20 02:57:04 +08:00
|
|
|
|
2010-06-11 04:03:52 +08:00
|
|
|
private:
|
|
|
|
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
void createWindow( QString name, int flags = 0 );
|
|
|
|
void destroyWindow(QString name);
|
|
|
|
void destroyAllWindow();
|
|
|
|
void addSlider(QString trackbar_name, QString window_name, void* value, int count, void* on_change);
|
|
|
|
void moveWindow(QString name, int x, int y);
|
|
|
|
void resizeWindow(QString name, int width, int height);
|
|
|
|
void showImage(QString name, void* arr);
|
|
|
|
void displayInfo( QString name, QString text, int delayms );
|
2010-06-23 01:15:49 +08:00
|
|
|
void displayStatusBar( QString name, QString text, int delayms );
|
2010-06-11 04:03:52 +08:00
|
|
|
void timeOut();
|
2010-06-13 00:36:46 +08:00
|
|
|
void toggleFullScreen(QString name, double flags );
|
|
|
|
double isFullScreen(QString name);
|
2010-06-13 02:08:27 +08:00
|
|
|
double getPropWindow(QString name);
|
|
|
|
void setPropWindow(QString name, double flags );
|
2010-06-27 06:36:41 +08:00
|
|
|
double getRatioWindow(QString name);
|
2010-06-30 06:14:24 +08:00
|
|
|
void setRatioWindow(QString name, double arg2 );
|
|
|
|
void saveWindowParameters(QString name);
|
|
|
|
void loadWindowParameters(QString name);
|
2010-07-08 01:53:59 +08:00
|
|
|
void setOpenGLCallback(QString window_name, void* callbackOpenGL, void* userdata);
|
2010-07-12 19:04:26 +08:00
|
|
|
void putText(void* arg1, QString text, QPoint org, void* font);
|
2010-07-23 04:39:44 +08:00
|
|
|
void addButton(QString button_name, int button_type, bool initial_button_state , void* on_change, void* userdata);
|
2010-07-20 17:39:36 +08:00
|
|
|
|
|
|
|
};
|
2010-07-08 01:53:59 +08:00
|
|
|
|
2010-07-20 17:39:36 +08:00
|
|
|
enum typeBar{type_CvTrackbar = 0, type_CvButtonbar = 1};
|
|
|
|
class CvBar : public QHBoxLayout
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
typeBar type;
|
|
|
|
QString name_bar;
|
2010-07-23 04:39:44 +08:00
|
|
|
QPointer<QWidget> myparent;
|
2010-06-11 04:03:52 +08:00
|
|
|
};
|
|
|
|
|
2010-07-16 23:22:07 +08:00
|
|
|
|
2010-07-20 17:39:36 +08:00
|
|
|
class CvButtonbar : public CvBar
|
2010-07-16 23:22:07 +08:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2010-07-23 04:39:44 +08:00
|
|
|
CvButtonbar(QWidget* arg, QString bar_name);
|
2010-07-20 17:39:36 +08:00
|
|
|
~CvButtonbar();
|
2010-07-23 04:39:44 +08:00
|
|
|
void addButton( QString button_name, CvButtonCallback call, void* userdata, int button_type, bool initial_button_state);
|
2010-07-16 23:22:07 +08:00
|
|
|
|
2010-07-20 17:39:36 +08:00
|
|
|
private:
|
|
|
|
void setLabel();
|
|
|
|
|
|
|
|
QPointer<QLabel> label;
|
|
|
|
};
|
|
|
|
|
2010-07-23 04:39:44 +08:00
|
|
|
|
|
|
|
class CvPushButton : public QPushButton
|
2010-07-20 17:39:36 +08:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2010-07-23 04:39:44 +08:00
|
|
|
CvPushButton(CvButtonbar* par, QString button_name, CvButtonCallback call, void* userdata);
|
2010-07-20 17:39:36 +08:00
|
|
|
|
|
|
|
private:
|
|
|
|
CvButtonbar* myparent;
|
|
|
|
QString button_name ;
|
|
|
|
CvButtonCallback callback;
|
|
|
|
void* userdata;
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
void callCallBack();
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-07-23 04:39:44 +08:00
|
|
|
class CvCheckBox : public QCheckBox
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
CvCheckBox(CvButtonbar* par, QString button_name, CvButtonCallback call, void* userdata, bool initial_button_state);
|
|
|
|
|
|
|
|
private:
|
|
|
|
CvButtonbar* myparent;
|
|
|
|
QString button_name ;
|
|
|
|
CvButtonCallback callback;
|
|
|
|
void* userdata;
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
void callCallBack();
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2010-07-20 17:39:36 +08:00
|
|
|
class CvTrackbar : public CvBar
|
2010-06-11 04:03:52 +08:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
CvTrackbar(CvWindow* parent, QString name, int* value, int count, CvTrackbarCallback on_change = NULL);
|
|
|
|
~CvTrackbar();
|
|
|
|
|
2010-07-20 17:39:36 +08:00
|
|
|
//QString trackbar_name;
|
2010-06-11 04:03:52 +08:00
|
|
|
QPointer<QSlider> slider;
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
void createDialog();
|
|
|
|
void update(int myvalue);
|
|
|
|
|
|
|
|
private:
|
|
|
|
void setLabel(int myvalue);
|
|
|
|
QString createLabel();
|
|
|
|
QPointer<QPushButton > label;
|
|
|
|
CvTrackbarCallback callback;
|
|
|
|
int* dataSlider;
|
2010-06-30 06:14:24 +08:00
|
|
|
|
2010-06-11 04:03:52 +08:00
|
|
|
};
|
|
|
|
|
2010-07-16 20:51:29 +08:00
|
|
|
class CvWinProperties : public QWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
CvWinProperties(QString name,QWidget* parent);
|
|
|
|
~CvWinProperties();
|
|
|
|
QPointer<QBoxLayout> myLayout;
|
|
|
|
|
|
|
|
private:
|
|
|
|
void closeEvent ( QCloseEvent * e );
|
|
|
|
void showEvent ( QShowEvent * event ) ;
|
|
|
|
void hideEvent ( QHideEvent * event ) ;
|
|
|
|
};
|
|
|
|
|
2010-06-11 04:03:52 +08:00
|
|
|
class CvWindow : public QWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
CvWindow(QString arg2, int flag = CV_WINDOW_NORMAL);
|
|
|
|
~CvWindow();
|
2010-07-23 04:39:44 +08:00
|
|
|
static void addSlider(CvWindow* w,QString name, int* value, int count, CvTrackbarCallback on_change CV_DEFAULT(NULL));
|
2010-06-11 04:03:52 +08:00
|
|
|
void setMouseCallBack(CvMouseCallback m, void* param);
|
|
|
|
void updateImage(void* arr);
|
|
|
|
void displayInfo(QString text, int delayms );
|
2010-06-23 01:15:49 +08:00
|
|
|
void displayStatusBar(QString text, int delayms );
|
2010-06-30 06:14:24 +08:00
|
|
|
void readSettings();
|
|
|
|
void writeSettings();
|
2010-07-08 01:53:59 +08:00
|
|
|
void setOpenGLCallback(CvOpenGLCallback arg1,void* userdata);
|
2010-07-16 23:22:07 +08:00
|
|
|
void hideTools();
|
|
|
|
void showTools();
|
2010-07-23 04:39:44 +08:00
|
|
|
static CvButtonbar* createButtonbar(QString bar_name);
|
2010-07-16 23:22:07 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
2010-06-27 06:36:41 +08:00
|
|
|
ViewPort* getView();
|
2010-06-11 04:03:52 +08:00
|
|
|
|
2010-07-23 04:39:44 +08:00
|
|
|
QPointer<QBoxLayout> myGlobalLayout;//All the widget (toolbar, view, LayoutBar, ...) are attached to it
|
|
|
|
QPointer<QBoxLayout> myBarLayout;
|
2010-07-16 17:12:15 +08:00
|
|
|
QPointer<QStatusBar> myStatusBar;
|
|
|
|
QPointer<QToolBar> myToolBar;
|
|
|
|
QPointer<QLabel> myStatusBar_msg;
|
2010-06-11 04:03:52 +08:00
|
|
|
|
2010-06-30 06:14:24 +08:00
|
|
|
//parameters (will be save/load)
|
|
|
|
QString param_name;
|
2010-07-23 04:39:44 +08:00
|
|
|
QPointer<CvWinProperties> parameters_window ;
|
2010-06-30 06:14:24 +08:00
|
|
|
int param_flags;
|
2010-07-16 17:12:15 +08:00
|
|
|
int param_gui_mode;
|
2010-07-23 04:39:44 +08:00
|
|
|
QVector<QAction*> vect_QActions;
|
2010-06-30 06:14:24 +08:00
|
|
|
|
2010-06-11 04:03:52 +08:00
|
|
|
|
2010-06-30 06:14:24 +08:00
|
|
|
protected:
|
2010-06-11 04:03:52 +08:00
|
|
|
virtual void keyPressEvent(QKeyEvent *event);
|
|
|
|
|
|
|
|
private:
|
|
|
|
QPointer<ViewPort> myview;
|
2010-07-16 17:12:15 +08:00
|
|
|
QVector<QShortcut*> vect_QShortcuts;
|
2010-06-30 06:14:24 +08:00
|
|
|
|
|
|
|
void icvLoadTrackbars(QSettings *settings);
|
|
|
|
void icvSaveTrackbars(QSettings *settings);
|
2010-07-16 17:12:15 +08:00
|
|
|
|
|
|
|
void createShortcuts();
|
2010-07-23 04:39:44 +08:00
|
|
|
void createActions();
|
2010-07-16 17:12:15 +08:00
|
|
|
void createToolBar();
|
|
|
|
void createView(int mode);
|
|
|
|
void createStatusBar();
|
2010-07-23 04:39:44 +08:00
|
|
|
void createGlobalLayout();
|
|
|
|
void createBarLayout();
|
|
|
|
CvWinProperties* createParameterWindow();
|
2010-07-16 20:51:29 +08:00
|
|
|
|
|
|
|
private slots:
|
|
|
|
void displayPropertiesWin();
|
2010-06-11 04:03:52 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-06-30 06:14:24 +08:00
|
|
|
|
2010-06-26 01:19:11 +08:00
|
|
|
enum type_mouse_event {mouse_up = 0, mouse_down = 1, mouse_dbclick = 2, mouse_move = 3};
|
|
|
|
|
|
|
|
static const int tableMouseButtons[][3]={
|
|
|
|
{CV_EVENT_LBUTTONUP,CV_EVENT_RBUTTONUP,CV_EVENT_MBUTTONUP}, //mouse_up
|
|
|
|
{CV_EVENT_LBUTTONDOWN,CV_EVENT_RBUTTONDOWN,CV_EVENT_MBUTTONDOWN}, //mouse_down
|
|
|
|
{CV_EVENT_LBUTTONDBLCLK,CV_EVENT_RBUTTONDBLCLK,CV_EVENT_MBUTTONDBLCLK}, //mouse_dbclick
|
|
|
|
{CV_EVENT_MOUSEMOVE,CV_EVENT_MOUSEMOVE,CV_EVENT_MOUSEMOVE} //mouse_move
|
|
|
|
};
|
|
|
|
|
2010-06-30 06:14:24 +08:00
|
|
|
|
2010-06-11 04:03:52 +08:00
|
|
|
class ViewPort : public QGraphicsView
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2010-06-27 06:36:41 +08:00
|
|
|
ViewPort(CvWindow* centralWidget, int mode = CV_MODE_NORMAL, int keepRatio = CV_WINDOW_KEEPRATIO);
|
2010-06-11 04:03:52 +08:00
|
|
|
~ViewPort();
|
|
|
|
void updateImage(void* arr);
|
|
|
|
void startDisplayInfo(QString text, int delayms);
|
2010-06-20 02:57:04 +08:00
|
|
|
void setMouseCallBack(CvMouseCallback m, void* param);
|
2010-07-08 01:53:59 +08:00
|
|
|
void setOpenGLCallback(CvOpenGLCallback func,void* userdata);
|
2010-06-30 06:14:24 +08:00
|
|
|
int getRatio();
|
|
|
|
void setRatio(int arg);
|
|
|
|
|
|
|
|
//parameters (will be save/load)
|
|
|
|
QTransform param_matrixWorld;
|
|
|
|
|
|
|
|
int param_keepRatio;
|
2010-06-15 00:00:38 +08:00
|
|
|
|
2010-06-23 01:15:49 +08:00
|
|
|
IplImage* image2Draw_ipl;
|
|
|
|
QImage image2Draw_qt;
|
2010-07-08 01:53:59 +08:00
|
|
|
QImage image2Draw_qt_resized;
|
2010-06-30 06:14:24 +08:00
|
|
|
int mode_display;//opengl or native
|
2010-06-29 05:01:37 +08:00
|
|
|
int nbChannelOriginImage;
|
2010-06-23 01:15:49 +08:00
|
|
|
|
2010-06-11 04:03:52 +08:00
|
|
|
public slots:
|
2010-06-18 00:41:48 +08:00
|
|
|
//reference:
|
|
|
|
//http://www.qtcentre.org/wiki/index.php?title=QGraphicsView:_Smooth_Panning_and_Zooming
|
|
|
|
//http://doc.qt.nokia.com/4.6/gestures-imagegestures-imagewidget-cpp.html
|
2010-06-30 06:14:24 +08:00
|
|
|
void scaleView(qreal scaleFactor, QPointF center);
|
2010-07-08 01:53:59 +08:00
|
|
|
void imgRegion();
|
2010-06-20 02:57:04 +08:00
|
|
|
void moveView(QPointF delta);
|
|
|
|
void resetZoom();
|
|
|
|
void ZoomIn();
|
|
|
|
void ZoomOut();
|
|
|
|
void siftWindowOnLeft();
|
|
|
|
void siftWindowOnRight();
|
|
|
|
void siftWindowOnUp() ;
|
|
|
|
void siftWindowOnDown();
|
2010-06-18 04:44:18 +08:00
|
|
|
void resizeEvent ( QResizeEvent * );
|
2010-07-08 01:53:59 +08:00
|
|
|
void saveView();
|
2010-07-23 04:39:44 +08:00
|
|
|
void contextMenuEvent(QContextMenuEvent *event);
|
2010-07-16 20:51:29 +08:00
|
|
|
|
2010-06-11 04:03:52 +08:00
|
|
|
|
|
|
|
private:
|
2010-06-23 01:15:49 +08:00
|
|
|
QPoint mouseCoordinate;
|
2010-06-16 15:58:53 +08:00
|
|
|
QPointF positionGrabbing;
|
2010-06-30 06:14:24 +08:00
|
|
|
QRect positionCorners;
|
2010-06-18 04:44:18 +08:00
|
|
|
QTransform matrixWorld_inv;
|
2010-06-23 01:15:49 +08:00
|
|
|
float ratioX, ratioY;
|
2010-07-16 17:12:15 +08:00
|
|
|
|
2010-07-08 01:53:59 +08:00
|
|
|
//for mouse callback
|
2010-06-20 02:57:04 +08:00
|
|
|
CvMouseCallback on_mouse;
|
2010-06-15 00:00:38 +08:00
|
|
|
void* on_mouse_param;
|
2010-07-16 17:12:15 +08:00
|
|
|
|
2010-07-08 01:53:59 +08:00
|
|
|
//for opengl callback
|
2010-07-12 19:04:26 +08:00
|
|
|
CvOpenGLCallback on_openGL_draw3D;
|
2010-07-20 17:39:36 +08:00
|
|
|
void* on_openGL_param;
|
2010-06-15 00:00:38 +08:00
|
|
|
|
2010-06-11 04:03:52 +08:00
|
|
|
bool isSameSize(IplImage* img1,IplImage* img2);
|
|
|
|
QSize sizeHint() const;
|
2010-06-23 01:15:49 +08:00
|
|
|
QPointer<CvWindow> centralWidget;
|
2010-06-20 02:57:04 +08:00
|
|
|
QPointer<QTimer> timerDisplay;
|
2010-06-11 04:03:52 +08:00
|
|
|
bool drawInfo;
|
|
|
|
QString infoText;
|
|
|
|
//QImage* image;
|
|
|
|
|
|
|
|
void paintEvent(QPaintEvent* paintEventInfo);
|
2010-06-15 00:00:38 +08:00
|
|
|
void wheelEvent(QWheelEvent *event);
|
2010-06-11 04:03:52 +08:00
|
|
|
void mouseMoveEvent(QMouseEvent *event);
|
|
|
|
void mousePressEvent(QMouseEvent *event);
|
|
|
|
void mouseReleaseEvent(QMouseEvent *event);
|
|
|
|
void mouseDoubleClickEvent(QMouseEvent *event);
|
|
|
|
void drawInstructions(QPainter *painter);
|
2010-06-29 05:01:37 +08:00
|
|
|
void drawViewOverview(QPainter *painter);
|
|
|
|
void drawImgRegion(QPainter *painter);
|
2010-06-11 04:03:52 +08:00
|
|
|
void draw2D(QPainter *painter);
|
2010-06-23 01:15:49 +08:00
|
|
|
void drawStatusBar();
|
2010-06-16 15:58:53 +08:00
|
|
|
void controlImagePosition();
|
2010-06-26 01:19:11 +08:00
|
|
|
void icvmouseHandler(QMouseEvent *event, type_mouse_event category, int &cv_event, int &flags);
|
|
|
|
void icvmouseProcessing(QPointF pt, int cv_event, int flags);
|
2010-06-11 04:03:52 +08:00
|
|
|
|
|
|
|
#if defined(OPENCV_GL)
|
|
|
|
void draw3D();
|
|
|
|
void unsetGL();
|
|
|
|
void initGL();
|
|
|
|
void setGL(int width, int height);
|
2010-06-27 06:36:41 +08:00
|
|
|
void icvgluPerspective(GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar);
|
2010-06-11 04:03:52 +08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
void stopDisplayInfo();
|
|
|
|
};
|
2010-06-11 15:35:36 +08:00
|
|
|
|
2010-06-13 00:36:46 +08:00
|
|
|
#endif
|