Computer Assisted Medical Intervention Tool Kit  version 5.2
QtCanvasItem Class Referenceabstract

#include <qtcanvas.h>

+ Inheritance diagram for QtCanvasItem:
+ Collaboration diagram for QtCanvasItem:

Public Types

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

bool active () const
 
bool active () const
 
virtual void advance (int stage)
 
virtual void advance (int stage)
 
bool animated () const
 
bool animated () const
 
virtual QRect boundingRect () const =0
 
virtual QRect boundingRect () const =0
 
virtual QRect boundingRectAdvanced () const
 
virtual QRect boundingRectAdvanced () const
 
QtCanvascanvas () const
 
QtCanvascanvas () const
 
virtual bool collidesWith (const QtCanvasItem *) const =0
 
virtual bool collidesWith (const QtCanvasItem *) const =0
 
QtCanvasItemList collisions (bool exact) const
 
QtCanvasItemList collisions (bool exact) const
 
virtual void draw (QPainter &)=0
 
virtual void draw (QPainter &)=0
 
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)
 
virtual int rtti () const
 
virtual int rtti () const
 
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_Item
 

Protected Member Functions

void update ()
 
void update ()
 

Friends

class QtCanvasEllipse
 
class QtCanvasLine
 
class QtCanvasPolygon
 
class QtCanvasPolygonalItem
 
class QtCanvasRectangle
 
class QtCanvasSprite
 
class QtCanvasText
 

Member Enumeration Documentation

◆ RttiValues [1/2]

Enumerator
Rtti_Item 
Rtti_Sprite 
Rtti_PolygonalItem 
Rtti_Text 
Rtti_Polygon 
Rtti_Rectangle 
Rtti_Ellipse 
Rtti_Line 
Rtti_Spline 
Rtti_Item 
Rtti_Sprite 
Rtti_PolygonalItem 
Rtti_Text 
Rtti_Polygon 
Rtti_Rectangle 
Rtti_Ellipse 
Rtti_Line 
Rtti_Spline 

◆ RttiValues [2/2]

Enumerator
Rtti_Item 
Rtti_Sprite 
Rtti_PolygonalItem 
Rtti_Text 
Rtti_Polygon 
Rtti_Rectangle 
Rtti_Ellipse 
Rtti_Line 
Rtti_Spline 
Rtti_Item 
Rtti_Sprite 
Rtti_PolygonalItem 
Rtti_Text 
Rtti_Polygon 
Rtti_Rectangle 
Rtti_Ellipse 
Rtti_Line 
Rtti_Spline 

Constructor & Destructor Documentation

◆ QtCanvasItem() [1/2]

QtCanvasItem::QtCanvasItem ( QtCanvas canvas)

References QtCanvas::addItem().

+ Here is the call graph for this function:

◆ ~QtCanvasItem() [1/2]

QtCanvasItem::~QtCanvasItem ( )
virtual

References QtCanvas::removeAnimation(), and QtCanvas::removeItem().

+ Here is the call graph for this function:

◆ QtCanvasItem() [2/2]

QtCanvasItem::QtCanvasItem ( QtCanvas canvas)

◆ ~QtCanvasItem() [2/2]

virtual QtCanvasItem::~QtCanvasItem ( )
virtual

Member Function Documentation

◆ active() [1/2]

bool QtCanvasItem::active ( ) const
inline

◆ active() [2/2]

bool QtCanvasItem::active ( ) const
inline

◆ advance() [1/2]

void QtCanvasItem::advance ( int  stage)
virtual

Reimplemented in QtCanvasSprite, and QtCanvasSprite.

References moveBy().

Referenced by QtCanvas::advance().

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

◆ advance() [2/2]

virtual void QtCanvasItem::advance ( int  stage)
virtual

Reimplemented in QtCanvasSprite, and QtCanvasSprite.

◆ animated() [1/2]

bool QtCanvasItem::animated ( ) const

◆ animated() [2/2]

bool QtCanvasItem::animated ( ) const

◆ boundingRect() [1/2]

virtual QRect QtCanvasItem::boundingRect ( ) const
pure virtual

Implemented in QtCanvasText, QtCanvasPolygonalItem, QtCanvasSprite, QtCanvasText, QtCanvasPolygonalItem, and QtCanvasSprite.

Referenced by boundingRectAdvanced().

+ Here is the caller graph for this function:

◆ boundingRect() [2/2]

virtual QRect QtCanvasItem::boundingRect ( ) const
pure virtual

◆ boundingRectAdvanced() [1/2]

QRect QtCanvasItem::boundingRectAdvanced ( ) const
virtual

References boundingRect(), x(), xVelocity(), y(), and yVelocity().

Referenced by collision_double_dispatch(), and qt_testCollision().

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

◆ boundingRectAdvanced() [2/2]

virtual QRect QtCanvasItem::boundingRectAdvanced ( ) const
virtual

◆ canvas() [1/2]

QtCanvas* QtCanvasItem::canvas ( ) const
inline

Referenced by collisions(), and QtCanvasSprite::move().

+ Here is the caller graph for this function:

◆ canvas() [2/2]

QtCanvas* QtCanvasItem::canvas ( ) const
inline

◆ collidesWith() [1/2]

virtual bool QtCanvasItem::collidesWith ( const QtCanvasItem ) const
pure virtual

◆ collidesWith() [2/2]

virtual bool QtCanvasItem::collidesWith ( const QtCanvasItem ) const
pure virtual

◆ collisions() [1/2]

QtCanvasItemList QtCanvasItem::collisions ( bool  exact) const

References canvas(), and QtCanvas::collisions().

Referenced by QtCanvas::collisions().

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

◆ collisions() [2/2]

QtCanvasItemList QtCanvasItem::collisions ( bool  exact) const

◆ draw() [1/2]

virtual void QtCanvasItem::draw ( QPainter &  )
pure virtual

Implemented in QtCanvasSprite, QtCanvasSprite, QtCanvasText, QtCanvasPolygonalItem, QtCanvasText, and QtCanvasPolygonalItem.

Referenced by QtCanvas::drawCanvasArea().

+ Here is the caller graph for this function:

◆ draw() [2/2]

virtual void QtCanvasItem::draw ( QPainter &  )
pure virtual

◆ enabled() [1/2]

bool QtCanvasItem::enabled ( ) const
inline

◆ enabled() [2/2]

bool QtCanvasItem::enabled ( ) const
inline

◆ hide() [1/2]

void QtCanvasItem::hide ( )

References setVisible().

Referenced by QtCanvasSprite::move(), QtCanvasSprite::setSequence(), QtCanvasEllipse::~QtCanvasEllipse(), QtCanvasLine::~QtCanvasLine(), QtCanvasPolygon::~QtCanvasPolygon(), and QtCanvasRectangle::~QtCanvasRectangle().

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

◆ hide() [2/2]

void QtCanvasItem::hide ( )

◆ isActive() [1/2]

bool QtCanvasItem::isActive ( ) const
inline

◆ isActive() [2/2]

bool QtCanvasItem::isActive ( ) const
inline

◆ isEnabled() [1/2]

bool QtCanvasItem::isEnabled ( ) const
inline

◆ isEnabled() [2/2]

bool QtCanvasItem::isEnabled ( ) const
inline

◆ isSelected() [1/2]

bool QtCanvasItem::isSelected ( ) const
inline

◆ isSelected() [2/2]

bool QtCanvasItem::isSelected ( ) const
inline

◆ isVisible() [1/2]

bool QtCanvasItem::isVisible ( ) const
inline

Referenced by QtCanvasSprite::move(), setCanvas(), and QtCanvasSprite::setSequence().

+ Here is the caller graph for this function:

◆ isVisible() [2/2]

bool QtCanvasItem::isVisible ( ) const
inline

◆ move() [1/2]

void QtCanvasItem::move ( double  x,
double  y 
)

References moveBy(), x(), and y().

Referenced by QtCanvasSprite::move(), QtCanvasRectangle::QtCanvasRectangle(), setX(), and setY().

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

◆ move() [2/2]

void QtCanvasItem::move ( double  x,
double  y 
)

◆ moveBy() [1/2]

void QtCanvasItem::moveBy ( double  dx,
double  dy 
)
virtual

Reimplemented in QtCanvasText, QtCanvasLine, QtCanvasPolygon, QtCanvasText, QtCanvasLine, and QtCanvasPolygon.

Referenced by advance(), CanvasView::contentsMouseMoveEvent(), move(), and QtCanvasLine::moveBy().

+ Here is the caller graph for this function:

◆ moveBy() [2/2]

virtual void QtCanvasItem::moveBy ( double  dx,
double  dy 
)
virtual

◆ rtti() [1/2]

◆ rtti() [2/2]

◆ selected() [1/2]

bool QtCanvasItem::selected ( ) const
inline

◆ selected() [2/2]

bool QtCanvasItem::selected ( ) const
inline

◆ setActive() [1/2]

void QtCanvasItem::setActive ( bool  yes)
virtual

◆ setActive() [2/2]

virtual void QtCanvasItem::setActive ( bool  yes)
virtual

◆ setAnimated() [1/2]

void QtCanvasItem::setAnimated ( bool  y)
virtual

References QtCanvas::addAnimation(), QtCanvas::removeAnimation(), and y().

Referenced by QtCanvasSprite::setFrameAnimation(), and setVelocity().

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

◆ setAnimated() [2/2]

virtual void QtCanvasItem::setAnimated ( bool  y)
virtual

◆ setCanvas() [1/2]

void QtCanvasItem::setCanvas ( QtCanvas c)
virtual

References QtCanvas::addAnimation(), QtCanvas::addItem(), isVisible(), QtCanvas::removeAnimation(), QtCanvas::removeItem(), and setVisible().

+ Here is the call graph for this function:

◆ setCanvas() [2/2]

virtual void QtCanvasItem::setCanvas ( QtCanvas )
virtual

◆ setEnabled() [1/2]

void QtCanvasItem::setEnabled ( bool  yes)
virtual

◆ setEnabled() [2/2]

virtual void QtCanvasItem::setEnabled ( bool  yes)
virtual

◆ setSelected() [1/2]

void QtCanvasItem::setSelected ( bool  yes)
virtual

◆ setSelected() [2/2]

virtual void QtCanvasItem::setSelected ( bool  yes)
virtual

◆ setVelocity() [1/2]

void QtCanvasItem::setVelocity ( double  vx,
double  vy 
)
virtual

References setAnimated().

Referenced by setXVelocity(), and setYVelocity().

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

◆ setVelocity() [2/2]

virtual void QtCanvasItem::setVelocity ( double  vx,
double  vy 
)
virtual

◆ setVisible() [1/2]

void QtCanvasItem::setVisible ( bool  yes)
virtual

Referenced by hide(), setCanvas(), and show().

+ Here is the caller graph for this function:

◆ setVisible() [2/2]

virtual void QtCanvasItem::setVisible ( bool  yes)
virtual

◆ setX() [1/2]

void QtCanvasItem::setX ( double  a)
inline

References a, move(), and y().

+ Here is the call graph for this function:

◆ setX() [2/2]

void QtCanvasItem::setX ( double  a)
inline

References a, move(), and y().

+ Here is the call graph for this function:

◆ setXVelocity() [1/2]

void QtCanvasItem::setXVelocity ( double  vx)
inline

References setVelocity(), and yVelocity().

+ Here is the call graph for this function:

◆ setXVelocity() [2/2]

void QtCanvasItem::setXVelocity ( double  vx)
inline

References setVelocity(), and yVelocity().

+ Here is the call graph for this function:

◆ setY() [1/2]

void QtCanvasItem::setY ( double  a)
inline

References a, move(), and x().

+ Here is the call graph for this function:

◆ setY() [2/2]

void QtCanvasItem::setY ( double  a)
inline

References a, move(), and x().

+ Here is the call graph for this function:

◆ setYVelocity() [1/2]

void QtCanvasItem::setYVelocity ( double  vy)
inline

References setVelocity(), and xVelocity().

+ Here is the call graph for this function:

◆ setYVelocity() [2/2]

void QtCanvasItem::setYVelocity ( double  vy)
inline

References setVelocity(), and xVelocity().

+ Here is the call graph for this function:

◆ setZ() [1/2]

void QtCanvasItem::setZ ( double  a)
inline

References a.

◆ setZ() [2/2]

void QtCanvasItem::setZ ( double  a)
inline

References a.

◆ show() [1/2]

void QtCanvasItem::show ( )

References setVisible().

Referenced by QtCanvas::collisions(), QtCanvasSprite::move(), and QtCanvasSprite::setSequence().

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

◆ show() [2/2]

void QtCanvasItem::show ( )

◆ update() [1/2]

void QtCanvasItem::update ( )
inlineprotected

◆ update() [2/2]

void QtCanvasItem::update ( )
inlineprotected

◆ visible() [1/2]

bool QtCanvasItem::visible ( ) const
inline

◆ visible() [2/2]

bool QtCanvasItem::visible ( ) const
inline

◆ x() [1/2]

◆ x() [2/2]

double QtCanvasItem::x ( ) const
inline

◆ xVelocity() [1/2]

double QtCanvasItem::xVelocity ( ) const

Referenced by QtCanvasSprite::advance(), QtCanvasPolygonalItem::areaPointsAdvanced(), boundingRectAdvanced(), collision_double_dispatch(), and setYVelocity().

+ Here is the caller graph for this function:

◆ xVelocity() [2/2]

double QtCanvasItem::xVelocity ( ) const

◆ y() [1/2]

◆ y() [2/2]

double QtCanvasItem::y ( ) const
inline

◆ yVelocity() [1/2]

double QtCanvasItem::yVelocity ( ) const

Referenced by QtCanvasSprite::advance(), QtCanvasPolygonalItem::areaPointsAdvanced(), boundingRectAdvanced(), collision_double_dispatch(), and setXVelocity().

+ Here is the caller graph for this function:

◆ yVelocity() [2/2]

double QtCanvasItem::yVelocity ( ) const

◆ z() [1/2]

double QtCanvasItem::z ( ) const
inline

Referenced by QtCanvasItemLess::operator()().

+ Here is the caller graph for this function:

◆ z() [2/2]

double QtCanvasItem::z ( ) const
inline

Friends And Related Function Documentation

◆ QtCanvasEllipse

◆ QtCanvasLine

QtCanvasLine
friend

◆ QtCanvasPolygon

◆ QtCanvasPolygonalItem

◆ QtCanvasRectangle

◆ QtCanvasSprite

◆ QtCanvasText

QtCanvasText
friend

Member Data Documentation

◆ RTTI

static int QtCanvasItem::RTTI = Rtti_Item
static

Referenced by rtti().


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