52 #include <qlcdnumber.h> 53 #include <qcheckbox.h> 55 #if QT_VERSION >= 0x040000 56 #include <QtGui/QMouseEvent> 69 setFixedSize(nWidth, nHeight);
100 QPainter painter(
this);
102 #if QT_VERSION >= 0x040000 151 for (
int i = 0; i < nPixels; i++)
152 output[i] = 255 << 24 | pixels[i] << 16 | pixels[i] << 8 | pixels[i];
162 for (
int offset = 0, i = 0; i < nPixels; i++)
164 output[i] = 255 << 24 | pixels[
offset] << 16 | pixels[
offset + 1] << 8 | pixels[
offset + 2];
171 #if QT_VERSION >= 0x040000 180 if (e->button() != Qt::LeftButton)
void mouseReleaseEvent(QMouseEvent *e)
void mousePressEvent(QMouseEvent *e)
unsigned char * m_pBuffer
int width
The width of the image in pixels.
GLenum GLsizei GLenum GLenum const GLvoid * image
Data structure for the representation of 8-bit grayscale images and 24-bit RGB (or HSV) color images ...
unsigned char * pixels
The pointer to the the pixels.
void paintEvent(QPaintEvent *pPaintEvent)
CQTWindow(int nWidth, int nHeight, CWindowEventInterface *pWindowEventInterface=0, QWidget *pParent=0)
virtual void RectSelected(int x0, int y0, int x1, int y1)
void mouseMoveEvent(QMouseEvent *e)
void DrawImage(const CByteImage *pImage, int x=0, int y=0)
GLint GLint GLsizei GLsizei GLsizei GLint GLenum GLenum const GLvoid * pixels
CWindowEventInterface * m_pWindowEventInterface
int height
The height of the image in pixels.
ImageType type
The type of the image.
virtual void PointClicked(int x, int y)