Computer Assited Medical Intervention Tool Kit  version 5.0
QtCanvasText Class Reference

#include <qtcanvas.h>

+ Inheritance diagram for QtCanvasText:
+ Collaboration diagram for QtCanvasText:

Public Member Functions

QRect boundingRect () const
 
QRect boundingRect () const
 
bool collidesWith (const QtCanvasItem *) const
 
bool collidesWith (const QtCanvasItem *) const
 
QColor color () const
 
QColor color () const
 
QFont font () const
 
QFont font () const
 
void moveBy (double dx, double dy)
 
void moveBy (double dx, double dy)
 
 QtCanvasText (const QString &, QFont, QtCanvas *canvas)
 
 QtCanvasText (const QString &, QFont, QtCanvas *canvas)
 
 QtCanvasText (const QString &, QtCanvas *canvas)
 
 QtCanvasText (const QString &, QtCanvas *canvas)
 
 QtCanvasText (QtCanvas *canvas)
 
 QtCanvasText (QtCanvas *canvas)
 
int rtti () const
 
int rtti () const
 
void setColor (const QColor &)
 
void setColor (const QColor &)
 
void setFont (const QFont &)
 
void setFont (const QFont &)
 
void setText (const QString &)
 
void setText (const QString &)
 
void setTextFlags (int)
 
void setTextFlags (int)
 
QString text () const
 
QString text () const
 
int textFlags () const
 
int textFlags () const
 
virtual ~QtCanvasText ()
 
virtual ~QtCanvasText ()
 
- Public Member Functions inherited from QtCanvasItem
bool active () const
 
bool active () const
 
virtual void advance (int stage)
 
virtual void advance (int stage)
 
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)
 
 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_Text
 
- Static Public Attributes inherited from QtCanvasItem
static int RTTI = Rtti_Item
 

Protected Member Functions

virtual void draw (QPainter &)
 
virtual void draw (QPainter &)
 
- Protected Member Functions inherited from QtCanvasItem
void update ()
 
void update ()
 

Private Member Functions

void addToChunks ()
 
void addToChunks ()
 
void changeChunks ()
 
void changeChunks ()
 
bool collidesWith (const QtCanvasSprite *, const QtCanvasPolygonalItem *, const QtCanvasRectangle *, const QtCanvasEllipse *, const QtCanvasText *) const
 
bool collidesWith (const QtCanvasSprite *, const QtCanvasPolygonalItem *, const QtCanvasRectangle *, const QtCanvasEllipse *, const QtCanvasText *) const
 
void removeFromChunks ()
 
void removeFromChunks ()
 
void setRect ()
 
void setRect ()
 

Private Attributes

QRect brect
 
QColor col
 
QtCanvasTextExtra * extra
 
int flags
 
QFont fnt
 
QString txt
 

Additional Inherited Members

- 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
}
 

Constructor & Destructor Documentation

◆ QtCanvasText() [1/6]

QtCanvasText::QtCanvasText ( QtCanvas canvas)

References setRect().

+ Here is the call graph for this function:

◆ QtCanvasText() [2/6]

QtCanvasText::QtCanvasText ( const QString &  t,
QtCanvas canvas 
)

References setRect().

+ Here is the call graph for this function:

◆ QtCanvasText() [3/6]

QtCanvasText::QtCanvasText ( const QString &  t,
QFont  f,
QtCanvas canvas 
)

References setRect().

+ Here is the call graph for this function:

◆ ~QtCanvasText() [1/2]

QtCanvasText::~QtCanvasText ( )
virtual

References removeFromChunks().

+ Here is the call graph for this function:

◆ QtCanvasText() [4/6]

QtCanvasText::QtCanvasText ( QtCanvas canvas)

◆ QtCanvasText() [5/6]

QtCanvasText::QtCanvasText ( const QString &  ,
QtCanvas canvas 
)

◆ QtCanvasText() [6/6]

QtCanvasText::QtCanvasText ( const QString &  ,
QFont  ,
QtCanvas canvas 
)

◆ ~QtCanvasText() [2/2]

virtual QtCanvasText::~QtCanvasText ( )
virtual

Member Function Documentation

◆ addToChunks() [1/2]

void QtCanvasText::addToChunks ( )
privatevirtual

Reimplemented from QtCanvasItem.

References QtCanvas::addItemToChunk(), brect, QtCanvasItem::canvas(), QtCanvas::chunkSize(), and QtCanvasItem::isVisible().

Referenced by moveBy(), setFont(), setText(), and setTextFlags().

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

◆ addToChunks() [2/2]

void QtCanvasText::addToChunks ( )
privatevirtual

Reimplemented from QtCanvasItem.

◆ boundingRect() [1/2]

QRect QtCanvasText::boundingRect ( ) const
virtual

Implements QtCanvasItem.

References brect.

◆ boundingRect() [2/2]

QRect QtCanvasText::boundingRect ( ) const
virtual

Implements QtCanvasItem.

◆ changeChunks() [1/2]

void QtCanvasText::changeChunks ( )
privatevirtual

Reimplemented from QtCanvasItem.

References brect, QtCanvasItem::canvas(), QtCanvas::chunkSize(), QtCanvasItem::isVisible(), and QtCanvas::setChangedChunk().

Referenced by setColor().

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

◆ changeChunks() [2/2]

void QtCanvasText::changeChunks ( )
privatevirtual

Reimplemented from QtCanvasItem.

◆ collidesWith() [1/4]

bool QtCanvasText::collidesWith ( const QtCanvasItem i) const
virtual

Implements QtCanvasItem.

References QtCanvasItem::collidesWith().

+ Here is the call graph for this function:

◆ collidesWith() [2/4]

bool QtCanvasText::collidesWith ( const QtCanvasItem ) const
virtual

Implements QtCanvasItem.

◆ collidesWith() [3/4]

bool QtCanvasText::collidesWith ( const QtCanvasSprite s,
const QtCanvasPolygonalItem p,
const QtCanvasRectangle r,
const QtCanvasEllipse e,
const QtCanvasText t 
) const
privatevirtual

Implements QtCanvasItem.

References collision_double_dispatch().

+ Here is the call graph for this function:

◆ collidesWith() [4/4]

bool QtCanvasText::collidesWith ( const QtCanvasSprite ,
const QtCanvasPolygonalItem ,
const QtCanvasRectangle ,
const QtCanvasEllipse ,
const QtCanvasText  
) const
privatevirtual

Implements QtCanvasItem.

◆ color() [1/2]

QColor QtCanvasText::color ( ) const

References col.

Referenced by MainWindow::itemClicked().

+ Here is the caller graph for this function:

◆ color() [2/2]

QColor QtCanvasText::color ( ) const

◆ draw() [1/2]

void QtCanvasText::draw ( QPainter &  painter)
protectedvirtual

Implements QtCanvasItem.

References col, flags, fnt, txt, QtCanvasItem::x(), and QtCanvasItem::y().

+ Here is the call graph for this function:

◆ draw() [2/2]

virtual void QtCanvasText::draw ( QPainter &  )
protectedvirtual

Implements QtCanvasItem.

◆ font() [1/2]

QFont QtCanvasText::font ( ) const

◆ font() [2/2]

QFont QtCanvasText::font ( ) const

References fnt.

Referenced by MainWindow::itemClicked().

+ Here is the caller graph for this function:

◆ moveBy() [1/2]

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

Reimplemented from QtCanvasItem.

◆ moveBy() [2/2]

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

Reimplemented from QtCanvasItem.

References addToChunks(), brect, QtCanvasItem::myx, QtCanvasItem::myy, removeFromChunks(), QtCanvasItem::x(), and QtCanvasItem::y().

+ Here is the call graph for this function:

◆ removeFromChunks() [1/2]

void QtCanvasText::removeFromChunks ( )
privatevirtual

Reimplemented from QtCanvasItem.

◆ removeFromChunks() [2/2]

void QtCanvasText::removeFromChunks ( )
privatevirtual

Reimplemented from QtCanvasItem.

References brect, QtCanvasItem::canvas(), QtCanvas::chunkSize(), QtCanvasItem::isVisible(), and QtCanvas::removeItemFromChunk().

Referenced by moveBy(), setFont(), setText(), setTextFlags(), and ~QtCanvasText().

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

◆ rtti() [1/2]

int QtCanvasText::rtti ( ) const
virtual

Reimplemented from QtCanvasItem.

References RTTI.

◆ rtti() [2/2]

int QtCanvasText::rtti ( ) const
virtual

Reimplemented from QtCanvasItem.

◆ setColor() [1/2]

void QtCanvasText::setColor ( const QColor &  )

◆ setColor() [2/2]

void QtCanvasText::setColor ( const QColor &  c)

References changeChunks(), and col.

Referenced by MainWindow::addText(), and MainWindow::valueChanged().

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

◆ setFont() [1/2]

void QtCanvasText::setFont ( const QFont &  )

◆ setFont() [2/2]

void QtCanvasText::setFont ( const QFont &  f)

References addToChunks(), fnt, removeFromChunks(), and setRect().

Referenced by MainWindow::valueChanged().

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

◆ setRect() [1/2]

void QtCanvasText::setRect ( )
private

References brect, flags, fnt, txt, QtCanvasItem::x(), and QtCanvasItem::y().

Referenced by QtCanvasText(), setFont(), setText(), and setTextFlags().

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

◆ setRect() [2/2]

void QtCanvasText::setRect ( )
private

◆ setText() [1/2]

void QtCanvasText::setText ( const QString &  )

◆ setText() [2/2]

void QtCanvasText::setText ( const QString &  t)

References addToChunks(), removeFromChunks(), setRect(), and txt.

Referenced by MainWindow::addText(), and MainWindow::valueChanged().

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

◆ setTextFlags() [1/2]

void QtCanvasText::setTextFlags ( int  )

◆ setTextFlags() [2/2]

void QtCanvasText::setTextFlags ( int  f)

References addToChunks(), flags, removeFromChunks(), and setRect().

+ Here is the call graph for this function:

◆ text() [1/2]

QString QtCanvasText::text ( ) const

◆ text() [2/2]

QString QtCanvasText::text ( ) const

References txt.

Referenced by MainWindow::itemClicked().

+ Here is the caller graph for this function:

◆ textFlags() [1/2]

int QtCanvasText::textFlags ( ) const
inline

References flags.

◆ textFlags() [2/2]

int QtCanvasText::textFlags ( ) const
inline

References flags.

Member Data Documentation

◆ brect

QRect QtCanvasText::brect
private

◆ col

QColor QtCanvasText::col
private

Referenced by color(), draw(), and setColor().

◆ extra

QtCanvasTextExtra * QtCanvasText::extra
private

◆ flags

int QtCanvasText::flags
private

Referenced by draw(), setRect(), setTextFlags(), and textFlags().

◆ fnt

QFont QtCanvasText::fnt
private

Referenced by draw(), font(), setFont(), and setRect().

◆ RTTI

static int QtCanvasText::RTTI = Rtti_Text
static

Referenced by rtti().

◆ txt

QString QtCanvasText::txt
private

Referenced by draw(), setRect(), setText(), and text().


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