trikRuntime
trikControl::DisplayInterface Class Referenceabstract

Provides ability to draw something on robot display. More...

#include <displayInterface.h>

Inheritance diagram for trikControl::DisplayInterface:
Collaboration diagram for trikControl::DisplayInterface:

Public Slots

virtual void showImage (const QString &fileName)=0
 Shows given image on a display. More...
 
virtual void show (const QVector< int32_t > &array, int width, int height, const QString &format)=0
 Shows given image on display. More...
 
virtual void addLabel (const QString &text, int x, int y)=0
 Add a label to the specific position of the screen without redrawing it. More...
 
virtual void removeLabels ()=0
 Remove all labels from the screen. More...
 
virtual void setPainterColor (const QString &color)=0
 Set painter color. More...
 
virtual void setPainterWidth (int penWidth)=0
 Set painter width. More...
 
virtual void drawLine (int x1, int y1, int x2, int y2)=0
 Draw line on the widget without redrawing it. More...
 
virtual void drawPoint (int x, int y)=0
 Draw point on the widget without redrawing it. More...
 
virtual void drawRect (int x, int y, int width, int height, bool filled=false)=0
 Draw rect on the widget without redrawing it. More...
 
virtual void drawEllipse (int x, int y, int width, int height, bool filled=false)=0
 Draw ellipse without redrawing display. More...
 
virtual void drawArc (int x, int y, int width, int height, int startAngle, int spanAngle)=0
 Draw arc on the widget without redrawing it without redrawing it. More...
 
virtual void setBackground (const QString &color)=0
 Sets background for a picture. More...
 
virtual void hide ()=0
 Hides and clears widget on which everything is drawn. More...
 
virtual void clear ()=0
 Clear everything painted with this object. More...
 
virtual void reset ()=0
 Clears screen, returns a display in a blank state. More...
 
virtual void redraw ()=0
 Updates painted picture on the robot`s screen. More...
 

Public Member Functions

virtual DisplayWidgetInterfacegraphicsWidget ()=0
 Returns widget on which everything is drawn. More...
 

Detailed Description

Provides ability to draw something on robot display.

Member Function Documentation

virtual void trikControl::DisplayInterface::addLabel ( const QString &  text,
int  x,
int  y 
)
pure virtualslot

Add a label to the specific position of the screen without redrawing it.

If there already is a label in these coordinates, its contents will be updated.

Parameters
text- label text.
x- label x coordinate.
y- label y coordinate.
virtual void trikControl::DisplayInterface::clear ( )
pure virtualslot

Clear everything painted with this object.

virtual void trikControl::DisplayInterface::drawArc ( int  x,
int  y,
int  width,
int  height,
int  startAngle,
int  spanAngle 
)
pure virtualslot

Draw arc on the widget without redrawing it without redrawing it.

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

Draw ellipse without redrawing display.

Parameters
x- x coordinate.
y- y coordinate.
width- width of ellipse.
height- height of ellipse.
filled- filling of ellipse.
virtual void trikControl::DisplayInterface::drawLine ( int  x1,
int  y1,
int  x2,
int  y2 
)
pure virtualslot

Draw line on the widget without redrawing it.

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.
virtual void trikControl::DisplayInterface::drawPoint ( int  x,
int  y 
)
pure virtualslot

Draw point on the widget without redrawing it.

Parameters
x- x coordinate.
y- y coordinate.
virtual void trikControl::DisplayInterface::drawRect ( int  x,
int  y,
int  width,
int  height,
bool  filled = false 
)
pure virtualslot

Draw rect on the widget without redrawing it.

Parameters
x- x coordinate.
y- y coordinate.
width- rect's width.
height- rect's height.
filled- rect's filling.
virtual DisplayWidgetInterface& trikControl::DisplayInterface::graphicsWidget ( )
pure virtual

Returns widget on which everything is drawn.

Implemented in trikControl::Display.

virtual void trikControl::DisplayInterface::hide ( )
pure virtualslot

Hides and clears widget on which everything is drawn.

virtual void trikControl::DisplayInterface::redraw ( )
pure virtualslot

Updates painted picture on the robot`s screen.

Warning
This operation is pretty slow, so it shouldn`t be called without need.
virtual void trikControl::DisplayInterface::removeLabels ( )
pure virtualslot

Remove all labels from the screen.

virtual void trikControl::DisplayInterface::reset ( )
pure virtualslot

Clears screen, returns a display in a blank state.

virtual void trikControl::DisplayInterface::setBackground ( const QString &  color)
pure virtualslot

Sets background for a picture.

Parameters
color- color of a background.
virtual void trikControl::DisplayInterface::setPainterColor ( const QString &  color)
pure virtualslot

Set painter color.

virtual void trikControl::DisplayInterface::setPainterWidth ( int  penWidth)
pure virtualslot

Set painter width.

virtual void trikControl::DisplayInterface::show ( const QVector< int32_t > &  array,
int  width,
int  height,
const QString &  format 
)
pure virtualslot

Shows given image on display.

Scales from to fullscreen

Parameters
array- pixel data (depends on format)
width- image width
height- image height
format- "rgb32" for packed xRGB32 (pixel per int32), "grayscale8" for grayscale 8bit (int per pixel), "rgb888" for 3 ints per pixel (R,G,B – 8bits each)
virtual void trikControl::DisplayInterface::showImage ( const QString &  fileName)
pure virtualslot

Shows given image on a display.

Parameters
fileName- file name (with path) of an image to show. Refer to Qt documentation for supported formats, but .jpg, .png, .bmp, .gif are supported.

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