direcs  2012-09-30
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
QtGLContext Class Reference

#include <QtGLContext.h>

List of all members.

Signals

void boxCreated (int x, int y, int x2, int y2)
void saveImage ()

Public Member Functions

void enableMirrorMode (int state)
 QtGLContext (QWidget *parent=0, const QGLWidget *sharedWidget=0, Qt::WFlags f=0)
 Constructor.
 QtGLContext (const QGLFormat &format, QWidget *parent=0, const QGLWidget *sharedWidget=0, Qt::WFlags f=0)
bool setImage (unsigned char *imgP, const bool flipped=false)
 set image parameters 'flipped' is a vertical flip!
void setImageData (const int width, const int height, const int pixeldepth)
 set the image data (for not doing this at every setImage call!)
void setZoomRect (float ulX, float ulY, float lrX, float lrY)
 redefines the clipping rectangle for the texture drawing
 ~QtGLContext ()

Protected Member Functions

void drawTexture (float ul, float ur, float ll, float lr)
virtual void initializeGL ()
unsigned int NextLargerPowerOfTwo (unsigned int n)
 helper method
virtual void paintGL ()
virtual void resizeGL (int w, int h)

Private Attributes

QPoint m_entry
QPoint m_exit
bool m_flipped
 if set to true image will be flipped vertically
unsigned int m_height
unsigned char * m_imgP
 pointer to the data of the displayed image
bool m_mirrored
 if set to true image will be flipped horizontally
bool m_mousePressed
unsigned int m_pixeldepth
unsigned int m_texHeight
 height of the texture buffer
float m_texLowerRightX
float m_texLowerRightY
unsigned int m_texNameGL
 texture identifier
float m_texUpperLeftX
 clipping rectangle for texture
float m_texUpperLeftY
unsigned int m_texWidth
 width of the texture buffer
unsigned int m_width
 image parameters
unsigned char * textureGL

Detailed Description

An individual OPENGL context class for camera stuff using OpenCV.

Definition at line 33 of file QtGLContext.h.


Constructor & Destructor Documentation

QtGLContext::QtGLContext ( QWidget *  parent = 0,
const QGLWidget *  sharedWidget = 0,
Qt::WFlags  f = 0 
)

Constructor.

Definition at line 24 of file QtGLContext.cpp.

QtGLContext::QtGLContext ( const QGLFormat &  format,
QWidget *  parent = 0,
const QGLWidget *  sharedWidget = 0,
Qt::WFlags  f = 0 
)
QtGLContext::~QtGLContext ( )

Definition at line 34 of file QtGLContext.cpp.


Member Function Documentation

void QtGLContext::boxCreated ( int  x,
int  y,
int  x2,
int  y2 
)
signal
void QtGLContext::drawTexture ( float  ul,
float  ur,
float  ll,
float  lr 
)
protected

draws the texture sub image on the screen

Parameters:
ulis the upper left coordinate
uris the upper right coordinate
llis the lower left coordinate
lris the lower right coordinate

Definition at line 86 of file QtGLContext.cpp.

Here is the caller graph for this function:

void QtGLContext::enableMirrorMode ( int  state)

Enables or disables the mirror mode for the camera. When activated, the camera live image is mirrored horicontally.

Parameters:
statehas to be Qt::Checked to enable the detection. All other states disable.

Definition at line 303 of file QtGLContext.cpp.

void QtGLContext::initializeGL ( )
protectedvirtual

Definition at line 41 of file QtGLContext.cpp.

unsigned int QtGLContext::NextLargerPowerOfTwo ( unsigned int  n)
protected

helper method

Definition at line 149 of file QtGLContext.cpp.

Here is the caller graph for this function:

void QtGLContext::paintGL ( )
protectedvirtual

Definition at line 60 of file QtGLContext.cpp.

Here is the call graph for this function:

void QtGLContext::resizeGL ( int  w,
int  h 
)
protectedvirtual

Definition at line 230 of file QtGLContext.cpp.

void QtGLContext::saveImage ( )
signal
bool QtGLContext::setImage ( unsigned char *  imgP,
const bool  flipped = false 
)

set image parameters 'flipped' is a vertical flip!

Definition at line 237 of file QtGLContext.cpp.

void QtGLContext::setImageData ( const int  width,
const int  height,
const int  pixeldepth 
)

set the image data (for not doing this at every setImage call!)

Definition at line 316 of file QtGLContext.cpp.

Here is the call graph for this function:

void QtGLContext::setZoomRect ( float  ulX,
float  ulY,
float  lrX,
float  lrY 
)

redefines the clipping rectangle for the texture drawing


Member Data Documentation

QPoint QtGLContext::m_entry
private

Definition at line 109 of file QtGLContext.h.

QPoint QtGLContext::m_exit
private

Definition at line 109 of file QtGLContext.h.

bool QtGLContext::m_flipped
private

if set to true image will be flipped vertically

Definition at line 97 of file QtGLContext.h.

unsigned int QtGLContext::m_height
private

Definition at line 95 of file QtGLContext.h.

unsigned char* QtGLContext::m_imgP
private

pointer to the data of the displayed image

Definition at line 93 of file QtGLContext.h.

bool QtGLContext::m_mirrored
private

if set to true image will be flipped horizontally

Definition at line 99 of file QtGLContext.h.

bool QtGLContext::m_mousePressed
private

Definition at line 110 of file QtGLContext.h.

unsigned int QtGLContext::m_pixeldepth
private

Definition at line 95 of file QtGLContext.h.

unsigned int QtGLContext::m_texHeight
private

height of the texture buffer

Definition at line 103 of file QtGLContext.h.

float QtGLContext::m_texLowerRightX
private

Definition at line 107 of file QtGLContext.h.

float QtGLContext::m_texLowerRightY
private

Definition at line 107 of file QtGLContext.h.

unsigned int QtGLContext::m_texNameGL
private

texture identifier

Definition at line 105 of file QtGLContext.h.

float QtGLContext::m_texUpperLeftX
private

clipping rectangle for texture

Definition at line 107 of file QtGLContext.h.

float QtGLContext::m_texUpperLeftY
private

Definition at line 107 of file QtGLContext.h.

unsigned int QtGLContext::m_texWidth
private

width of the texture buffer

Definition at line 101 of file QtGLContext.h.

unsigned int QtGLContext::m_width
private

image parameters

Definition at line 95 of file QtGLContext.h.

unsigned char* QtGLContext::textureGL
private

Definition at line 112 of file QtGLContext.h.


The documentation for this class was generated from the following files: