trikRuntime
trikControl::GraphicsWidget Class Reference

Class of graphic widget. More...

#include <graphicsWidget.h>

Inheritance diagram for trikControl::GraphicsWidget:
Collaboration diagram for trikControl::GraphicsWidget:

Public Member Functions

 GraphicsWidget ()
 
 ~GraphicsWidget ()
 
void showCommand ()
 Show this GraphicsWidget. More...
 
void hideCommand ()
 Hide this GraphicsWidget. More...
 
void setPainterColor (const QColor &color)
 Set painter color. More...
 
void setPainterWidth (int penWidth)
 Set painter width. More...
 
void deleteAllItems ()
 Delete all items. More...
 
void deleteLabels ()
 Delets only text labels. More...
 
void drawPoint (int x, int y)
 Draw point on the widget. More...
 
void drawLine (int x1, int y1, int x2, int y2)
 Draw line on the widget. More...
 
void drawRect (int x, int y, int width, int height, bool filled=false)
 Draw rect on the widget. More...
 
void drawEllipse (int x, int y, int width, int height, bool filled=false)
 Draw ellipse. More...
 
void drawArc (int x, int y, int width, int height, int startAngle, int spanAngle)
 Draw arc on the widget. More...
 
void addLabel (const QString &text, int x, int y)
 Prints text at given coordinates. More...
 
void setPixmap (const QPixmap &picture)
 Sets pixmap which will be drawn instead of other elements. More...
 
- Public Member Functions inherited from trikControl::DisplayWidgetInterface
 DisplayWidgetInterface ()=default
 
 ~DisplayWidgetInterface () override=default
 

Additional Inherited Members

- Signals inherited from trikControl::DisplayWidgetInterface
void shown ()
 Emitted when widget is shown. More...
 
void hidden ()
 Emitted when widget is hidden. More...
 

Detailed Description

Class of graphic widget.

Constructor & Destructor Documentation

GraphicsWidget::GraphicsWidget ( )
GraphicsWidget::~GraphicsWidget ( )

Member Function Documentation

void GraphicsWidget::addLabel ( const QString &  text,
int  x,
int  y 
)

Prints text at given coordinates.

void GraphicsWidget::deleteAllItems ( )

Delete all items.

void GraphicsWidget::deleteLabels ( )

Delets only text labels.

void GraphicsWidget::drawArc ( int  x,
int  y,
int  width,
int  height,
int  startAngle,
int  spanAngle 
)

Draw arc on the widget.

Parameters
x- x coordinate.
y- y coordinate.
width- width rect forming an arc.
height- height rect forming an arc.
startAngle- start angle.
spanAngle- end angle.
void GraphicsWidget::drawEllipse ( int  x,
int  y,
int  width,
int  height,
bool  filled = false 
)

Draw ellipse.

Parameters
x- x coordinate.
y- y coordinate.
width- width of ellipse.
height- height of ellipse.
filled- filling of ellipse.
void GraphicsWidget::drawLine ( int  x1,
int  y1,
int  x2,
int  y2 
)

Draw line on the widget.

Parameters
x1- first point's x coordinate.
y1- first point's y coordinate.
x2- second point's x coordinate.
y2- second point's y coordinate.
void GraphicsWidget::drawPoint ( int  x,
int  y 
)

Draw point on the widget.

Parameters
x- x coordinate.
y- y coordinate.
void GraphicsWidget::drawRect ( int  x,
int  y,
int  width,
int  height,
bool  filled = false 
)

Draw rect on the widget.

Parameters
x- x coordinate.
y- y coordinate.
width- rect's width.
height- rect's height.
filled- rect's filling.
void GraphicsWidget::hideCommand ( )

Hide this GraphicsWidget.

void GraphicsWidget::setPainterColor ( const QColor &  color)

Set painter color.

void GraphicsWidget::setPainterWidth ( int  penWidth)

Set painter width.

void GraphicsWidget::setPixmap ( const QPixmap &  picture)

Sets pixmap which will be drawn instead of other elements.

void GraphicsWidget::showCommand ( )

Show this GraphicsWidget.


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