trikRuntime
|
Works in GUI thread and is responsible for all output to display. More...
#include <guiWorker.h>
Public Slots | |
void | showImage (const QString &fileName) |
Shows image with given filename on display. More... | |
void | show (const QVector< int32_t > &array, int width, int height, const QString &format) |
Shows image from array data according to format. Image is scaled to fill the screen. More... | |
void | addLabel (const QString &text, int x, int y) |
Add a label to the specific position of the screen without redrawing it. More... | |
void | removeLabels () |
Remove all labels from the screen and redraws it. More... | |
void | hide () |
Hides image widget. More... | |
void | setBackground (const QString &color) |
Sets background for a picture. More... | |
void | setPainterWidth (int penWidth) |
Set painter width. More... | |
void | setPainterColor (const QString &color) |
Set painter color. More... | |
void | clear () |
Clear everything painted with this object. More... | |
void | reset () |
Returns a display in a blank state. More... | |
void | drawPoint (int x, int y) |
Draw point on the widget without redrawing it. More... | |
void | drawLine (int x1, int y1, int x2, int y2) |
Draw line on the widget without redrawing it. More... | |
void | drawRect (int x, int y, int width, int height, bool filled=false) |
Draw rect on the widget without redrawing it. More... | |
void | drawEllipse (int x, int y, int width, int height, bool filled=false) |
Draw ellipse without redrawing the screen. More... | |
void | drawArc (int x, int y, int width, int height, int startAngle, int spanAngle) |
Draw arc on the widget without redrawing it. More... | |
void | init () |
Initializes widget. Shall be called when widget is moved to correct thread. Not supposed to be called from .qts. More... | |
void | redraw () |
Updates painted picture on the robot`s screen. More... | |
Public Member Functions | |
GuiWorker () | |
DisplayWidgetInterface & | graphicsWidget () |
Returns a widget on which everything is drawn. More... | |
Works in GUI thread and is responsible for all output to display.
GuiWorker::GuiWorker | ( | ) |
|
slot |
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.
text | - label text. |
x | - label x coordinate. |
y | - label y coordinate. |
|
slot |
Clear everything painted with this object.
|
slot |
Draw arc on the widget without redrawing it.
x | - x coordinate. |
y | - y coordinate. |
width | - width rect forming an arc. |
height | - height rect forming an arc. |
startAngle | - start angle. |
spanAngle | - end andle. |
|
slot |
Draw ellipse without redrawing the screen.
x | - x coordinate. |
y | - y coordinate. |
width | - width of ellipse. |
height | - height of ellipse. |
|
slot |
Draw line on the widget without redrawing it.
x1 | - first point's x coordinate. |
y1 | - first point's y coordinate. |
x2 | - second point's x coordinate. |
y2 | - second point's y coordinate. |
|
slot |
Draw point on the widget without redrawing it.
x | - x coordinate. |
y | - y coordinate. |
|
slot |
Draw rect on the widget without redrawing it.
x | - x coordinate. |
y | - y coordinate. |
width | - rect's width. |
height | - rect's height. |
DisplayWidgetInterface & GuiWorker::graphicsWidget | ( | ) |
Returns a widget on which everything is drawn.
|
slot |
Hides image widget.
|
slot |
Initializes widget. Shall be called when widget is moved to correct thread. Not supposed to be called from .qts.
|
slot |
Updates painted picture on the robot`s screen.
|
slot |
Remove all labels from the screen and redraws it.
|
slot |
Returns a display in a blank state.
|
slot |
Sets background for a picture.
color | - color of a background. |
|
slot |
Set painter color.
|
slot |
Set painter width.
|
slot |
Shows image from array data according to format. Image is scaled to fill the screen.
|
slot |
Shows image with given filename on display.
Image is scaled to fill the screen and is cached on first read for better performance.