Computer Assited Medical Intervention Tool Kit  version 5.0
QtCanvasLine Class Reference

#include <qtcanvas.h>

+ Inheritance diagram for QtCanvasLine:
+ Collaboration diagram for QtCanvasLine:

Public Member Functions

QPoint endPoint () const
 
QPoint endPoint () const
 
void moveBy (double dx, double dy)
 
void moveBy (double dx, double dy)
 
 QtCanvasLine (QtCanvas *canvas)
 
 QtCanvasLine (QtCanvas *canvas)
 
int rtti () const
 
int rtti () const
 
void setPen (QPen p)
 
void setPen (QPen p)
 
void setPoints (int x1, int y1, int x2, int y2)
 
void setPoints (int x1, int y1, int x2, int y2)
 
QPoint startPoint () const
 
QPoint startPoint () const
 
 ~QtCanvasLine ()
 
 ~QtCanvasLine ()
 
- Public Member Functions inherited from QtCanvasPolygonalItem
virtual QPolygon areaPointsAdvanced () const
 
virtual QPolygon areaPointsAdvanced () const
 
QRect boundingRect () const
 
QRect boundingRect () const
 
QBrush brush () const
 
QBrush brush () const
 
bool collidesWith (const QtCanvasItem *) const
 
bool collidesWith (const QtCanvasItem *) const
 
QPen pen () const
 
QPen pen () const
 
 QtCanvasPolygonalItem (QtCanvas *canvas)
 
 QtCanvasPolygonalItem (QtCanvas *canvas)
 
virtual void setBrush (QBrush b)
 
virtual void setBrush (QBrush b)
 
virtual ~QtCanvasPolygonalItem ()
 
virtual ~QtCanvasPolygonalItem ()
 
- 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_Line
 
- Static Public Attributes inherited from QtCanvasPolygonalItem
static int RTTI = Rtti_PolygonalItem
 
- Static Public Attributes inherited from QtCanvasItem
static int RTTI = Rtti_Item
 

Protected Member Functions

QPolygon areaPoints () const
 
QPolygon areaPoints () const
 
void drawShape (QPainter &)
 
void drawShape (QPainter &)
 
- Protected Member Functions inherited from QtCanvasPolygonalItem
void draw (QPainter &)
 
void draw (QPainter &)
 
void invalidate ()
 
void invalidate ()
 
bool isValid () const
 
bool isValid () const
 
void setWinding (bool)
 
void setWinding (bool)
 
bool winding () const
 
bool winding () const
 
- Protected Member Functions inherited from QtCanvasItem
void update ()
 
void update ()
 

Private Attributes

int x1
 
int x2
 
int y1
 
int y2
 

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

◆ QtCanvasLine() [1/2]

QtCanvasLine::QtCanvasLine ( QtCanvas canvas)

References x1, x2, y1, and y2.

◆ ~QtCanvasLine() [1/2]

QtCanvasLine::~QtCanvasLine ( )

References QtCanvasItem::hide().

+ Here is the call graph for this function:

◆ QtCanvasLine() [2/2]

QtCanvasLine::QtCanvasLine ( QtCanvas canvas)

◆ ~QtCanvasLine() [2/2]

QtCanvasLine::~QtCanvasLine ( )

Member Function Documentation

◆ areaPoints() [1/2]

QPolygon QtCanvasLine::areaPoints ( ) const
protectedvirtual

Implements QtCanvasPolygonalItem.

References QtCanvasPolygonalItem::pen(), QtCanvasItem::x(), x1, x2, QtCanvasItem::y(), y1, and y2.

+ Here is the call graph for this function:

◆ areaPoints() [2/2]

QPolygon QtCanvasLine::areaPoints ( ) const
protectedvirtual

Implements QtCanvasPolygonalItem.

◆ drawShape() [1/2]

void QtCanvasLine::drawShape ( QPainter &  p)
protectedvirtual

Implements QtCanvasPolygonalItem.

References QtCanvasItem::x(), x1, x2, QtCanvasItem::y(), y1, and y2.

+ Here is the call graph for this function:

◆ drawShape() [2/2]

void QtCanvasLine::drawShape ( QPainter &  )
protectedvirtual

Implements QtCanvasPolygonalItem.

◆ endPoint() [1/2]

QPoint QtCanvasLine::endPoint ( ) const
inline

References x2, and y2.

◆ endPoint() [2/2]

QPoint QtCanvasLine::endPoint ( ) const
inline

References x2, and y2.

Referenced by MainWindow::itemClicked().

+ Here is the caller graph for this function:

◆ moveBy() [1/2]

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

Reimplemented from QtCanvasItem.

References QtCanvasItem::moveBy().

+ Here is the call graph for this function:

◆ moveBy() [2/2]

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

Reimplemented from QtCanvasItem.

◆ rtti() [1/2]

int QtCanvasLine::rtti ( ) const
virtual

Reimplemented from QtCanvasPolygonalItem.

References RTTI.

◆ rtti() [2/2]

int QtCanvasLine::rtti ( ) const
virtual

Reimplemented from QtCanvasPolygonalItem.

◆ setPen() [1/2]

void QtCanvasLine::setPen ( QPen  p)
virtual

Reimplemented from QtCanvasPolygonalItem.

References QtCanvasPolygonalItem::setPen().

Referenced by MainWindow::addLine().

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

◆ setPen() [2/2]

void QtCanvasLine::setPen ( QPen  p)
virtual

Reimplemented from QtCanvasPolygonalItem.

◆ setPoints() [1/2]

void QtCanvasLine::setPoints ( int  x1,
int  y1,
int  x2,
int  y2 
)

◆ setPoints() [2/2]

void QtCanvasLine::setPoints ( int  x1,
int  y1,
int  x2,
int  y2 
)

References QtCanvasItem::addToChunks(), QtCanvasItem::removeFromChunks(), x1, x2, y1, and y2.

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

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

◆ startPoint() [1/2]

QPoint QtCanvasLine::startPoint ( ) const
inline

References x1, and y1.

◆ startPoint() [2/2]

QPoint QtCanvasLine::startPoint ( ) const
inline

References x1, and y1.

Referenced by MainWindow::valueChanged().

+ Here is the caller graph for this function:

Member Data Documentation

◆ RTTI

static int QtCanvasLine::RTTI = Rtti_Line
static

Referenced by rtti().

◆ x1

int QtCanvasLine::x1
private

◆ x2

int QtCanvasLine::x2
private

◆ y1

int QtCanvasLine::y1
private

◆ y2

int QtCanvasLine::y2
private

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