Computer Assited Medical Intervention Tool Kit  version 4.1
Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
QtCanvasItem Class Referenceabstract

#include <qtcanvas.h>

Inherited by QtCanvasPolygonalItem, QtCanvasPolygonalItem, QtCanvasSprite, QtCanvasSprite, QtCanvasText, and QtCanvasText.

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 ()
 

Private Member Functions

virtual void addToChunks ()
 
virtual void addToChunks ()
 
virtual void changeChunks ()
 
virtual void changeChunks ()
 
virtual QPolygon chunks () const
 
virtual QPolygon chunks () const
 
virtual bool collidesWith (const QtCanvasSprite *, const QtCanvasPolygonalItem *, const QtCanvasRectangle *, const QtCanvasEllipse *, const QtCanvasText *) const =0
 
virtual bool collidesWith (const QtCanvasSprite *, const QtCanvasPolygonalItem *, const QtCanvasRectangle *, const QtCanvasEllipse *, const QtCanvasText *) const =0
 
QtCanvasItemExtraextra ()
 
QtCanvasItemExtraextra ()
 
virtual void removeFromChunks ()
 
virtual void removeFromChunks ()
 

Private Attributes

uint act: 1
 
uint ani: 1
 
QtCanvascnv
 
uint ena: 1
 
QtCanvasItemExtraext
 
double myx
 
double myy
 
double myz
 
uint sel: 1
 
uint val: 1
 
uint vis: 1
 

Static Private Attributes

static QtCanvascurrent_canvas
 

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)

◆ ~QtCanvasItem() [1/2]

QtCanvasItem::~QtCanvasItem ( )
virtual

◆ 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

References act.

◆ active() [2/2]

bool QtCanvasItem::active ( ) const
inline

References act.

◆ addToChunks() [1/2]

void QtCanvasItem::addToChunks ( )
privatevirtual

◆ addToChunks() [2/2]

virtual void QtCanvasItem::addToChunks ( )
privatevirtual

◆ advance() [1/2]

void QtCanvasItem::advance ( int  stage)
virtual

◆ advance() [2/2]

virtual void QtCanvasItem::advance ( int  stage)
virtual

Reimplemented in QtCanvasSprite, and QtCanvasSprite.

◆ animated() [1/2]

bool QtCanvasItem::animated ( ) const

References ani.

Referenced by QtCanvasItemExtra::QtCanvasItemExtra(), and setZ().

◆ animated() [2/2]

bool QtCanvasItem::animated ( ) const

◆ boundingRect() [1/2]

virtual QRect QtCanvasItem::boundingRect ( ) const
pure virtual

◆ boundingRect() [2/2]

virtual QRect QtCanvasItem::boundingRect ( ) const
pure virtual

◆ boundingRectAdvanced() [1/2]

QRect QtCanvasItem::boundingRectAdvanced ( ) const
virtual

◆ boundingRectAdvanced() [2/2]

virtual QRect QtCanvasItem::boundingRectAdvanced ( ) const
virtual

◆ canvas() [1/2]

QtCanvas* QtCanvasItem::canvas ( ) const
inline

◆ canvas() [2/2]

QtCanvas* QtCanvasItem::canvas ( ) const
inline

References cnv.

◆ changeChunks() [1/2]

void QtCanvasItem::changeChunks ( )
privatevirtual

◆ changeChunks() [2/2]

virtual void QtCanvasItem::changeChunks ( )
privatevirtual

◆ chunks() [1/2]

virtual QPolygon QtCanvasItem::chunks ( ) const
privatevirtual

◆ chunks() [2/2]

QPolygon QtCanvasItem::chunks ( ) const
privatevirtual

◆ collidesWith() [1/4]

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

◆ collidesWith() [2/4]

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

◆ collidesWith() [3/4]

virtual bool QtCanvasItem::collidesWith ( const QtCanvasSprite ,
const QtCanvasPolygonalItem ,
const QtCanvasRectangle ,
const QtCanvasEllipse ,
const QtCanvasText  
) const
privatepure virtual

◆ collidesWith() [4/4]

virtual bool QtCanvasItem::collidesWith ( const QtCanvasSprite ,
const QtCanvasPolygonalItem ,
const QtCanvasRectangle ,
const QtCanvasEllipse ,
const QtCanvasText  
) const
privatepure virtual

◆ collisions() [1/2]

QtCanvasItemList QtCanvasItem::collisions ( bool  exact) const

◆ collisions() [2/2]

QtCanvasItemList QtCanvasItem::collisions ( bool  exact) const

◆ draw() [1/2]

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

◆ draw() [2/2]

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

◆ enabled() [1/2]

bool QtCanvasItem::enabled ( ) const
inline

References ena.

◆ enabled() [2/2]

bool QtCanvasItem::enabled ( ) const
inline

References ena.

◆ extra() [1/2]

QtCanvasItemExtra & QtCanvasItem::extra ( )
private

◆ extra() [2/2]

QtCanvasItemExtra& QtCanvasItem::extra ( )
private

◆ hide() [1/2]

void QtCanvasItem::hide ( )

◆ hide() [2/2]

void QtCanvasItem::hide ( )

◆ isActive() [1/2]

bool QtCanvasItem::isActive ( ) const
inline

References act.

◆ isActive() [2/2]

bool QtCanvasItem::isActive ( ) const
inline

References act.

◆ isEnabled() [1/2]

bool QtCanvasItem::isEnabled ( ) const
inline

References ena, and setActive().

◆ isEnabled() [2/2]

bool QtCanvasItem::isEnabled ( ) const
inline

References ena, and setActive().

◆ isSelected() [1/2]

bool QtCanvasItem::isSelected ( ) const
inline

References sel, and setEnabled().

◆ isSelected() [2/2]

bool QtCanvasItem::isSelected ( ) const
inline

References sel, and setEnabled().

◆ isVisible() [1/2]

bool QtCanvasItem::isVisible ( ) const
inline

References setSelected(), and vis.

◆ isVisible() [2/2]

bool QtCanvasItem::isVisible ( ) const
inline

◆ move() [1/2]

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

◆ move() [2/2]

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

◆ moveBy() [1/2]

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

◆ moveBy() [2/2]

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

◆ removeFromChunks() [1/2]

virtual void QtCanvasItem::removeFromChunks ( )
privatevirtual

◆ removeFromChunks() [2/2]

void QtCanvasItem::removeFromChunks ( )
privatevirtual

◆ rtti() [1/2]

virtual int QtCanvasItem::rtti ( ) const
virtual

◆ rtti() [2/2]

int QtCanvasItem::rtti ( ) const
virtual

◆ selected() [1/2]

bool QtCanvasItem::selected ( ) const
inline

References sel.

◆ selected() [2/2]

bool QtCanvasItem::selected ( ) const
inline

References sel.

◆ setActive() [1/2]

virtual void QtCanvasItem::setActive ( bool  yes)
virtual

◆ setActive() [2/2]

void QtCanvasItem::setActive ( bool  yes)
virtual

◆ setAnimated() [1/2]

void QtCanvasItem::setAnimated ( bool  y)
virtual

◆ setAnimated() [2/2]

virtual void QtCanvasItem::setAnimated ( bool  y)
virtual

◆ setCanvas() [1/2]

virtual void QtCanvasItem::setCanvas ( QtCanvas )
virtual

◆ setCanvas() [2/2]

void QtCanvasItem::setCanvas ( QtCanvas c)
virtual

◆ setEnabled() [1/2]

virtual void QtCanvasItem::setEnabled ( bool  yes)
virtual

◆ setEnabled() [2/2]

void QtCanvasItem::setEnabled ( bool  yes)
virtual

◆ setSelected() [1/2]

virtual void QtCanvasItem::setSelected ( bool  yes)
virtual

◆ setSelected() [2/2]

void QtCanvasItem::setSelected ( bool  yes)
virtual

◆ setVelocity() [1/2]

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

◆ setVelocity() [2/2]

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

◆ setVisible() [1/2]

virtual void QtCanvasItem::setVisible ( bool  yes)
virtual

◆ setVisible() [2/2]

void QtCanvasItem::setVisible ( bool  yes)
virtual

◆ setX() [1/2]

void QtCanvasItem::setX ( double  a)
inline

References move(), and y().

Referenced by MainWindow::valueChanged().

◆ setX() [2/2]

void QtCanvasItem::setX ( double  a)
inline

References move(), and y().

◆ setXVelocity() [1/2]

void QtCanvasItem::setXVelocity ( double  vx)
inline

References setVelocity(), and yVelocity().

◆ setXVelocity() [2/2]

void QtCanvasItem::setXVelocity ( double  vx)
inline

References setVelocity(), and yVelocity().

◆ setY() [1/2]

void QtCanvasItem::setY ( double  a)
inline

References move(), and x().

◆ setY() [2/2]

void QtCanvasItem::setY ( double  a)
inline

References move(), and x().

Referenced by MainWindow::valueChanged().

◆ setYVelocity() [1/2]

void QtCanvasItem::setYVelocity ( double  vy)
inline

◆ setYVelocity() [2/2]

void QtCanvasItem::setYVelocity ( double  vy)
inline

◆ setZ() [1/2]

void QtCanvasItem::setZ ( double  a)
inline

◆ setZ() [2/2]

void QtCanvasItem::setZ ( double  a)
inline

◆ show() [1/2]

void QtCanvasItem::show ( )

◆ show() [2/2]

void QtCanvasItem::show ( )

◆ update() [1/2]

void QtCanvasItem::update ( )
inlineprotected

◆ update() [2/2]

void QtCanvasItem::update ( )
inlineprotected

References changeChunks().

Referenced by QtCanvas::sameChunk().

◆ visible() [1/2]

bool QtCanvasItem::visible ( ) const
inline

References vis.

◆ visible() [2/2]

bool QtCanvasItem::visible ( ) const
inline

References vis.

◆ x() [1/2]

double QtCanvasItem::x ( ) const
inline

References myx.

◆ x() [2/2]

double QtCanvasItem::x ( ) const
inline

◆ xVelocity() [1/2]

double QtCanvasItem::xVelocity ( ) const

◆ xVelocity() [2/2]

double QtCanvasItem::xVelocity ( ) const

◆ y() [1/2]

double QtCanvasItem::y ( ) const
inline

References myy.

◆ y() [2/2]

double QtCanvasItem::y ( ) const
inline

◆ yVelocity() [1/2]

double QtCanvasItem::yVelocity ( ) const

◆ yVelocity() [2/2]

double QtCanvasItem::yVelocity ( ) const

◆ z() [1/2]

double QtCanvasItem::z ( ) const
inline

◆ z() [2/2]

double QtCanvasItem::z ( ) const
inline

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

Friends And Related Function Documentation

◆ QtCanvasEllipse

Referenced by QtCanvasLine::endPoint().

◆ QtCanvasLine

QtCanvasLine
friend

Referenced by QtCanvasRectangle::rect().

◆ QtCanvasPolygon

Referenced by QtCanvasRectangle::rect().

◆ QtCanvasPolygonalItem

Referenced by QtCanvasSprite::image().

◆ QtCanvasRectangle

◆ QtCanvasSprite

◆ QtCanvasText

QtCanvasText
friend

Member Data Documentation

◆ act

uint QtCanvasItem::act
private

◆ ani

uint QtCanvasItem::ani
private

◆ cnv

QtCanvas * QtCanvasItem::cnv
private

◆ current_canvas

static QtCanvas * QtCanvasItem::current_canvas
staticprivate

Referenced by update().

◆ ena

uint QtCanvasItem::ena
private

◆ ext

QtCanvasItemExtra * QtCanvasItem::ext
private

◆ myx

double QtCanvasItem::myx
private

◆ myy

double QtCanvasItem::myy
private

◆ myz

double QtCanvasItem::myz
private

◆ RTTI

static int QtCanvasItem::RTTI = Rtti_Item
static

◆ sel

uint QtCanvasItem::sel
private

◆ val

uint QtCanvasItem::val
private

◆ vis

uint QtCanvasItem::vis
private

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