direcs
2012-09-30
|
#include <QtGLContext.h>
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 |
An individual OPENGL context class for camera stuff using OpenCV.
Definition at line 33 of file QtGLContext.h.
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.
|
signal |
|
protected |
draws the texture sub image on the screen
ul | is the upper left coordinate |
ur | is the upper right coordinate |
ll | is the lower left coordinate |
lr | is the lower right coordinate |
Definition at line 86 of file QtGLContext.cpp.
void QtGLContext::enableMirrorMode | ( | int | state | ) |
Enables or disables the mirror mode for the camera. When activated, the camera live image is mirrored horicontally.
state | has to be Qt::Checked to enable the detection. All other states disable. |
Definition at line 303 of file QtGLContext.cpp.
|
protectedvirtual |
Definition at line 41 of file QtGLContext.cpp.
|
protected |
helper method
Definition at line 149 of file QtGLContext.cpp.
|
protectedvirtual |
|
protectedvirtual |
Definition at line 230 of file QtGLContext.cpp.
|
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.
void QtGLContext::setZoomRect | ( | float | ulX, |
float | ulY, | ||
float | lrX, | ||
float | lrY | ||
) |
redefines the clipping rectangle for the texture drawing
|
private |
Definition at line 109 of file QtGLContext.h.
|
private |
Definition at line 109 of file QtGLContext.h.
|
private |
if set to true image will be flipped vertically
Definition at line 97 of file QtGLContext.h.
|
private |
Definition at line 95 of file QtGLContext.h.
|
private |
pointer to the data of the displayed image
Definition at line 93 of file QtGLContext.h.
|
private |
if set to true image will be flipped horizontally
Definition at line 99 of file QtGLContext.h.
|
private |
Definition at line 110 of file QtGLContext.h.
|
private |
Definition at line 95 of file QtGLContext.h.
|
private |
height of the texture buffer
Definition at line 103 of file QtGLContext.h.
|
private |
Definition at line 107 of file QtGLContext.h.
|
private |
Definition at line 107 of file QtGLContext.h.
|
private |
texture identifier
Definition at line 105 of file QtGLContext.h.
|
private |
clipping rectangle for texture
Definition at line 107 of file QtGLContext.h.
|
private |
Definition at line 107 of file QtGLContext.h.
|
private |
width of the texture buffer
Definition at line 101 of file QtGLContext.h.
|
private |
image parameters
Definition at line 95 of file QtGLContext.h.
|
private |
Definition at line 112 of file QtGLContext.h.