QtCanvasSprite Class Reference

#include <ArmarXGui/libraries/qtpropertybrowser/examples/canvas_typed/qtcanvas.h>

+ Inheritance diagram for QtCanvasSprite:

Public Types

enum  FrameAnimationType { Cycle, Oscillate, Cycle, Oscillate }
 
enum  FrameAnimationType { Cycle, Oscillate, Cycle, Oscillate }
 
- Public Types inherited from QtCanvasItem
enum  RttiValues {
  Rtti_Item = 0, Rtti_Sprite = 1, Rtti_PolygonalItem = 2, Rtti_Text = 3,
  Rtti_Polygon = 4, Rtti_Rectangle = 5, Rtti_Ellipse = 6, Rtti_Line = 7,
  Rtti_Spline = 8, Rtti_Item = 0, Rtti_Sprite = 1, Rtti_PolygonalItem = 2,
  Rtti_Text = 3, Rtti_Polygon = 4, Rtti_Rectangle = 5, Rtti_Ellipse = 6,
  Rtti_Line = 7, Rtti_Spline = 8
}
 
enum  RttiValues {
  Rtti_Item = 0, Rtti_Sprite = 1, Rtti_PolygonalItem = 2, Rtti_Text = 3,
  Rtti_Polygon = 4, Rtti_Rectangle = 5, Rtti_Ellipse = 6, Rtti_Line = 7,
  Rtti_Spline = 8, Rtti_Item = 0, Rtti_Sprite = 1, Rtti_PolygonalItem = 2,
  Rtti_Text = 3, Rtti_Polygon = 4, Rtti_Rectangle = 5, Rtti_Ellipse = 6,
  Rtti_Line = 7, Rtti_Spline = 8
}
 

Public Member Functions

virtual void advance (int stage)
 
virtual void advance (int stage)
 
int bottomEdge () const
 
int bottomEdge () const
 
int bottomEdge (int ny) const
 
int bottomEdge (int ny) const
 
QRect boundingRect () const
 
QRect boundingRect () const
 
bool collidesWith (const QtCanvasItem *) const
 
bool collidesWith (const QtCanvasItem *) const
 
void draw (QPainter &painter)
 
void draw (QPainter &painter)
 
int frame () const
 
int frame () const
 
int frameCount () const
 
int frameCount () const
 
int height () const
 
int height () const
 
QtCanvasPixmapimage () const
 
QtCanvasPixmapimage () const
 
QtCanvasPixmapimage (int f) const
 
QtCanvasPixmapimage (int f) const
 
virtual QtCanvasPixmapimageAdvanced () const
 
virtual QtCanvasPixmapimageAdvanced () const
 
int leftEdge () const
 
int leftEdge () const
 
int leftEdge (int nx) const
 
int leftEdge (int nx) const
 
void move (double x, double y)
 
void move (double x, double y)
 
virtual void move (double x, double y, int frame)
 
virtual void move (double x, double y, int frame)
 
 QtCanvasSprite (QtCanvasPixmapArray *array, QtCanvas *canvas)
 
 QtCanvasSprite (QtCanvasPixmapArray *array, QtCanvas *canvas)
 
int rightEdge () const
 
int rightEdge () const
 
int rightEdge (int nx) const
 
int rightEdge (int nx) const
 
int rtti () const
 
int rtti () const
 
void setFrame (int)
 
void setFrame (int)
 
virtual void setFrameAnimation (FrameAnimationType=Cycle, int step=1, int state=0)
 
virtual void setFrameAnimation (FrameAnimationType=Cycle, int step=1, int state=0)
 
void setSequence (QtCanvasPixmapArray *seq)
 
void setSequence (QtCanvasPixmapArray *seq)
 
int topEdge () const
 
int topEdge () const
 
int topEdge (int ny) const
 
int topEdge (int ny) const
 
int width () const
 
int width () const
 
virtual ~QtCanvasSprite ()
 
virtual ~QtCanvasSprite ()
 
- Public Member Functions inherited from QtCanvasItem
bool active () const
 
bool active () const
 
bool animated () const
 
bool animated () const
 
virtual QRect boundingRectAdvanced () const
 
virtual QRect boundingRectAdvanced () const
 
QtCanvascanvas () const
 
QtCanvascanvas () const
 
QtCanvasItemList collisions (bool exact) const
 
QtCanvasItemList collisions (bool exact) const
 
bool enabled () const
 
bool enabled () const
 
void hide ()
 
void hide ()
 
bool isActive () const
 
bool isActive () const
 
bool isEnabled () const
 
bool isEnabled () const
 
bool isSelected () const
 
bool isSelected () const
 
bool isVisible () const
 
bool isVisible () const
 
void move (double x, double y)
 
void move (double x, double y)
 
virtual void moveBy (double dx, double dy)
 
virtual void moveBy (double dx, double dy)
 
 QtCanvasItem (QtCanvas *canvas)
 
 QtCanvasItem (QtCanvas *canvas)
 
bool selected () const
 
bool selected () const
 
virtual void setActive (bool yes)
 
virtual void setActive (bool yes)
 
virtual void setAnimated (bool y)
 
virtual void setAnimated (bool y)
 
virtual void setCanvas (QtCanvas *)
 
virtual void setCanvas (QtCanvas *)
 
virtual void setEnabled (bool yes)
 
virtual void setEnabled (bool yes)
 
virtual void setSelected (bool yes)
 
virtual void setSelected (bool yes)
 
virtual void setVelocity (double vx, double vy)
 
virtual void setVelocity (double vx, double vy)
 
virtual void setVisible (bool yes)
 
virtual void setVisible (bool yes)
 
void setX (double a)
 
void setX (double a)
 
void setXVelocity (double vx)
 
void setXVelocity (double vx)
 
void setY (double a)
 
void setY (double a)
 
void setYVelocity (double vy)
 
void setYVelocity (double vy)
 
void setZ (double a)
 
void setZ (double a)
 
void show ()
 
void show ()
 
bool visible () const
 
bool visible () const
 
double x () const
 
double x () const
 
double xVelocity () const
 
double xVelocity () const
 
double y () const
 
double y () const
 
double yVelocity () const
 
double yVelocity () const
 
double z () const
 
double z () const
 
virtual ~QtCanvasItem ()
 
virtual ~QtCanvasItem ()
 

Static Public Attributes

static int RTTI = Rtti_Sprite
 
- Static Public Attributes inherited from QtCanvasItem
static int RTTI = Rtti_Item
 

Friends

bool qt_testCollision (const QtCanvasSprite *s1, const QtCanvasSprite *s2)
 
bool qt_testCollision (const QtCanvasSprite *s1, const QtCanvasSprite *s2)
 

Additional Inherited Members

- Protected Member Functions inherited from QtCanvasItem
void update ()
 
void update ()
 

Detailed Description

Definition at line 538 of file qtcanvas.h.

Member Enumeration Documentation

◆ FrameAnimationType [1/2]

Enumerator
Cycle 
Oscillate 
Cycle 
Oscillate 

Definition at line 550 of file qtcanvas.h.

◆ FrameAnimationType [2/2]

Enumerator
Cycle 
Oscillate 
Cycle 
Oscillate 

Definition at line 550 of file qtcanvas.h.

Constructor & Destructor Documentation

◆ QtCanvasSprite() [1/2]

QtCanvasSprite ( QtCanvasPixmapArray array,
QtCanvas canvas 
)

Definition at line 5393 of file qtcanvas.cpp.

◆ ~QtCanvasSprite() [1/2]

~QtCanvasSprite ( )
virtual

Definition at line 5458 of file qtcanvas.cpp.

◆ QtCanvasSprite() [2/2]

QtCanvasSprite ( QtCanvasPixmapArray array,
QtCanvas canvas 
)

◆ ~QtCanvasSprite() [2/2]

virtual ~QtCanvasSprite ( )
virtual

Member Function Documentation

◆ advance() [1/2]

void advance ( int  stage)
virtual

Reimplemented from QtCanvasItem.

Definition at line 5517 of file qtcanvas.cpp.

+ Here is the call graph for this function:

◆ advance() [2/2]

virtual void advance ( int  stage)
virtual

Reimplemented from QtCanvasItem.

◆ bottomEdge() [1/4]

int bottomEdge ( ) const

◆ bottomEdge() [2/4]

int bottomEdge ( ) const

Definition at line 3281 of file qtcanvas.cpp.

+ Here is the call graph for this function:

◆ bottomEdge() [3/4]

int bottomEdge ( int  ny) const

Definition at line 3295 of file qtcanvas.cpp.

+ Here is the call graph for this function:

◆ bottomEdge() [4/4]

int bottomEdge ( int  ny) const

◆ boundingRect() [1/2]

QRect boundingRect ( ) const
virtual

Implements QtCanvasItem.

◆ boundingRect() [2/2]

QRect boundingRect ( ) const
virtual

Implements QtCanvasItem.

Definition at line 3329 of file qtcanvas.cpp.

+ Here is the call graph for this function:

◆ collidesWith() [1/2]

bool collidesWith ( const QtCanvasItem i) const
virtual

Implements QtCanvasItem.

Definition at line 2490 of file qtcanvas.cpp.

+ Here is the call graph for this function:

◆ collidesWith() [2/2]

bool collidesWith ( const QtCanvasItem ) const
virtual

Implements QtCanvasItem.

◆ draw() [1/2]

void draw ( QPainter &  painter)
virtual

Implements QtCanvasItem.

Definition at line 3438 of file qtcanvas.cpp.

+ Here is the call graph for this function:

◆ draw() [2/2]

void draw ( QPainter &  painter)
virtual

Implements QtCanvasItem.

◆ frame() [1/2]

int frame ( ) const
inline

Definition at line 552 of file qtcanvas.h.

+ Here is the caller graph for this function:

◆ frame() [2/2]

int frame ( ) const
inline

Definition at line 552 of file qtcanvas.h.

◆ frameCount() [1/2]

int frameCount ( ) const
inline

Definition at line 556 of file qtcanvas.h.

+ Here is the call graph for this function:

◆ frameCount() [2/2]

int frameCount ( ) const
inline

Definition at line 556 of file qtcanvas.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ height() [1/2]

int height ( ) const

◆ height() [2/2]

int height ( ) const

Definition at line 3428 of file qtcanvas.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ image() [1/4]

QtCanvasPixmap* image ( ) const
inline

Definition at line 583 of file qtcanvas.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ image() [2/4]

QtCanvasPixmap* image ( ) const
inline

Definition at line 583 of file qtcanvas.h.

+ Here is the call graph for this function:

◆ image() [3/4]

QtCanvasPixmap* image ( int  f) const
inline

Definition at line 588 of file qtcanvas.h.

+ Here is the call graph for this function:

◆ image() [4/4]

QtCanvasPixmap* image ( int  f) const
inline

Definition at line 588 of file qtcanvas.h.

+ Here is the call graph for this function:

◆ imageAdvanced() [1/2]

QtCanvasPixmap * imageAdvanced ( ) const
virtual

Definition at line 3319 of file qtcanvas.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ imageAdvanced() [2/2]

virtual QtCanvasPixmap* imageAdvanced ( ) const
virtual

◆ leftEdge() [1/4]

int leftEdge ( ) const

◆ leftEdge() [2/4]

int leftEdge ( ) const

Definition at line 3203 of file qtcanvas.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ leftEdge() [3/4]

int leftEdge ( int  nx) const

Definition at line 3217 of file qtcanvas.cpp.

+ Here is the call graph for this function:

◆ leftEdge() [4/4]

int leftEdge ( int  nx) const

◆ move() [1/4]

void move ( double  x,
double  y 
)

◆ move() [2/4]

void move ( double  x,
double  y 
)

Definition at line 5575 of file qtcanvas.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ move() [3/4]

void move ( double  x,
double  y,
int  frame 
)
virtual

Definition at line 5587 of file qtcanvas.cpp.

+ Here is the call graph for this function:

◆ move() [4/4]

virtual void move ( double  x,
double  y,
int  frame 
)
virtual

◆ rightEdge() [1/4]

int rightEdge ( ) const

◆ rightEdge() [2/4]

int rightEdge ( ) const

Definition at line 3255 of file qtcanvas.cpp.

+ Here is the call graph for this function:

◆ rightEdge() [3/4]

int rightEdge ( int  nx) const

Definition at line 3269 of file qtcanvas.cpp.

+ Here is the call graph for this function:

◆ rightEdge() [4/4]

int rightEdge ( int  nx) const

◆ rtti() [1/2]

int rtti ( ) const
virtual

Reimplemented from QtCanvasItem.

◆ rtti() [2/2]

int rtti ( ) const
virtual

Reimplemented from QtCanvasItem.

Definition at line 5303 of file qtcanvas.cpp.

◆ setFrame() [1/2]

void setFrame ( int  f)

Definition at line 5471 of file qtcanvas.cpp.

+ Here is the call graph for this function:

◆ setFrame() [2/2]

void setFrame ( int  )

◆ setFrameAnimation() [1/2]

void setFrameAnimation ( FrameAnimationType  type = Cycle,
int  step = 1,
int  state = 0 
)
virtual

Definition at line 5501 of file qtcanvas.cpp.

+ Here is the call graph for this function:

◆ setFrameAnimation() [2/2]

virtual void setFrameAnimation ( FrameAnimationType  = Cycle,
int  step = 1,
int  state = 0 
)
virtual

◆ setSequence() [1/2]

void setSequence ( QtCanvasPixmapArray seq)

Definition at line 5411 of file qtcanvas.cpp.

+ Here is the call graph for this function:

◆ setSequence() [2/2]

void setSequence ( QtCanvasPixmapArray seq)

◆ topEdge() [1/4]

int topEdge ( ) const

Definition at line 3229 of file qtcanvas.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ topEdge() [2/4]

int topEdge ( ) const

◆ topEdge() [3/4]

int topEdge ( int  ny) const

Definition at line 3243 of file qtcanvas.cpp.

+ Here is the call graph for this function:

◆ topEdge() [4/4]

int topEdge ( int  ny) const

◆ width() [1/2]

int width ( ) const

◆ width() [2/2]

int width ( ) const

Definition at line 3418 of file qtcanvas.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Friends And Related Function Documentation

◆ qt_testCollision [1/2]

bool qt_testCollision ( const QtCanvasSprite s1,
const QtCanvasSprite s2 
)
friend

Definition at line 2239 of file qtcanvas.cpp.

◆ qt_testCollision [2/2]

bool qt_testCollision ( const QtCanvasSprite s1,
const QtCanvasSprite s2 
)
friend

Definition at line 2239 of file qtcanvas.cpp.

Member Data Documentation

◆ RTTI

static int RTTI = Rtti_Sprite
static

Definition at line 562 of file qtcanvas.h.


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