trikRuntime
trikControl::Line Class Reference

Presents a line to draw on display. More...

#include <line.h>

Inheritance diagram for trikControl::Line:
Collaboration diagram for trikControl::Line:

Public Member Functions

 Line (int x1, int y1, int x2, int y2, QColor color, int penWidth)
 Line defined by its end points (x1,y1) and (x2, y2). More...
 
void draw (QPainter *painter) override
 Draws a shape with a given painter. More...
 
bool equals (const Shape *other) const override
 Checks whether to shapes are equal. More...
 
- Public Member Functions inherited from trikControl::Shape
 Shape (const QColor &color, int penWidth)
 
virtual ~Shape ()=default
 

Additional Inherited Members

- Protected Attributes inherited from trikControl::Shape
QColor mColor
 
int mPenWidth
 

Detailed Description

Presents a line to draw on display.

Constructor & Destructor Documentation

Line::Line ( int  x1,
int  y1,
int  x2,
int  y2,
QColor  color,
int  penWidth 
)

Line defined by its end points (x1,y1) and (x2, y2).

Member Function Documentation

void Line::draw ( QPainter *  painter)
overridevirtual

Draws a shape with a given painter.

Implements trikControl::Shape.

bool Line::equals ( const Shape other) const
overridevirtual

Checks whether to shapes are equal.

Implements trikControl::Shape.


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