#include <qsdrvhittest.h>
Inheritance diagram for QSDrvHitTest:
Signals | |
void | hitDetected (int hitCategory, int hitElement) |
Public Methods | |
QSDrvHitTest (const QSPt2f &hitPosition, QObject *parent=NULL) | |
virtual | ~QSDrvHitTest () |
virtual QSDrvHitTest * | copy () |
void | copySettingsFrom (const QSDrvHitTest *drv) |
bool | isHit () const |
int | hitCategory () const |
int | hitElement () const |
QSPt2f | hitPosition () const |
virtual void | clearCanvas (const QSGFill &f, const QSPt2f &pos, const QSPt2f &size) |
virtual void | drawLine (const QSPt2f &one, const QSPt2f &two) |
virtual void | beginPolyline (const QSPt2f &pos) |
virtual void | drawPolylineTo (const QSPt2f &pos) |
virtual void | endPolyline () |
virtual QSPt2f | currPolylinePos () |
virtual void | drawRect (const QSPt2f &p1, const QSPt2f &p2) |
virtual void | drawPoly (const QSPt2f pts[], int npoints, const bool edges[]=NULL, int edgeAutoColor=0) |
virtual void | drawEllipse (const QSPt2f &p1, const QSPt2f &p2) |
virtual void | drawText (const QSPt2f &pos, const QString &text, int align=AlignLeft|AlignBottom) |
virtual void | drawRText (const QSPt2f &pos, int angle, const QString &text, int align=AlignLeft|AlignBottom) |
virtual void | getPixmapBuffer (PixmapBuffer *buff, int pwidth, int pheight) |
virtual void | drawPixmap (const QSPt2f &pos, PixmapBuffer *data) |
virtual void | setFill (const QSGFill &f) |
virtual void | setLine (const QSGLine &l) |
Protected Methods | |
void | hit () |
Protected Attributes | |
QSPt2f | m_hit_pos |
bool | m_is_hit |
int | m_hit_category |
int | m_hit_element |
int | m_curr_pixmap_width |
QSGFill | m_curr_fill |
QSGLine | m_curr_line |
Hit testing driver. To find out if an object was hit you must repaint it with QSHitDrv and next check if isHit() flag is set. QSHitDrv also emits signal hitDetected when isHit() flag is set and QSHitDrv is being deleted - so you can also use it when drawing in background. To find out what element was drawn, when hit was detected call hitCategory() and hitElement().
|
Starts to draw a polyline. Reimplemented from QSDrvQt. |
|
Clear the canvas. Reimplemented from QSDrvQt. |
|
Returns a copy of this object. Reimplemented from QSDrvQt. |
|
Returns the current pen position. Reimplemented from QSDrvQt. |
|
Draws a circle. Reimplemented from QSDrvQt. |
|
Draw a line. Reimplemented from QSDrvQt. |
|
Draw a pixmap. Notice that the pixmap buffer will be always the last requested one.'getPixmapBuffer' / 'drawPixmap' pair is always called together. Reimplemented from QSDrvQt. |
|
Draw a polygon defined by 'npoints' points in 'pts'. Can change the current line ( if edgeAuto color != 0 ) Reimplemented from QSDrvQt. |
|
Draw the next line segment. Wach out for setLine() call during drawPolyline2() Reimplemented from QSDrvQt. |
|
Draw a rectangle. Reimplemented from QSDrvQt. |
|
Draw a rotated text. This must be reimplemented. Reimplemented from QSDrvQt. |
|
Draw a text. Reimplemented from QSDrvQt. |
|
Ends polyline. Reimplemented from QSDrvQt. |
|
This method is always called before QSDrv::drawPixmap. The struct 'PixmapBuffer' must be filled with correct values. Pixmap width is requested to be equal to 'pwidth', pixmap height must be lower or equal to pheight ( see field 'lines' in 'PixmapBuffer' ). Reimplemented from QSDrvQt. |
|
Set the current fill . Reimplemented from QSDrvQt. |
|
Set the current line style. Reimplemented from QSDrvQt. |