17 #include <QtCore/qglobal.h> 18 #include <QtCore/QMultiHash> 19 #include <QtCore/QList> 20 #include <QtCore/QScopedPointer> 21 #include <QtGui/QPixmap> 22 #include <QtGui/QFontMetrics> 24 #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) 25 #include <QtGui/QWidget> 26 #include <QtGui/QLabel> 28 #include <QtWidgets/QWidget> 29 #include <QtWidgets/QLabel> 54 void show(
const QVector<int32_t> &array,
int width,
int height,
const QString &format);
61 void addLabel(
const QString &text,
int x,
int y);
95 void drawLine(
int x1,
int y1,
int x2,
int y2);
102 void drawRect(
int x,
int y,
int width,
int height,
bool filled =
false);
109 void drawEllipse(
int x,
int y,
int width,
int height,
bool filled =
false);
118 void drawArc(
int x,
int y,
int width,
int height,
int startAngle,
int spanAngle);
128 void resetBackground();
130 void repaintGraphicsWidget();
132 static QColor colorByName(
const QString &name);
134 QScopedPointer<GraphicsWidget> mImageWidget;
135 QHash<QString, QPixmap> mImagesCache;
void setPainterColor(const QString &color)
Set painter color.
Definition: guiWorker.cpp:130
void drawLine(int x1, int y1, int x2, int y2)
Draw line on the widget without redrawing it.
Definition: guiWorker.cpp:166
void clear()
Clear everything painted with this object.
Definition: guiWorker.cpp:140
void addLabel(const QString &text, int x, int y)
Add a label to the specific position of the screen without redrawing it.
Definition: guiWorker.cpp:104
DisplayWidgetInterface & graphicsWidget()
Returns a widget on which everything is drawn.
Definition: guiWorker.cpp:47
void showImage(const QString &fileName)
Shows image with given filename on display.
Definition: guiWorker.cpp:52
void removeLabels()
Remove all labels from the screen and redraws it.
Definition: guiWorker.cpp:109
void setBackground(const QString &color)
Sets background for a picture.
Definition: guiWorker.cpp:115
void redraw()
Updates painted picture on the robot`s screen.
Definition: guiWorker.cpp:186
void drawArc(int x, int y, int width, int height, int startAngle, int spanAngle)
Draw arc on the widget without redrawing it.
Definition: guiWorker.cpp:181
void hide()
Hides image widget.
Definition: guiWorker.cpp:156
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.
Definition: guiWorker.cpp:64
void drawEllipse(int x, int y, int width, int height, bool filled=false)
Draw ellipse without redrawing the screen.
Definition: guiWorker.cpp:176
void reset()
Returns a display in a blank state.
Definition: guiWorker.cpp:149
Definition: trikCommunicator.h:27
void init()
Initializes widget. Shall be called when widget is moved to correct thread. Not supposed to be called...
Definition: guiWorker.cpp:37
GuiWorker()
Definition: guiWorker.cpp:33
void drawRect(int x, int y, int width, int height, bool filled=false)
Draw rect on the widget without redrawing it.
Definition: guiWorker.cpp:171
void setPainterWidth(int penWidth)
Set painter width.
Definition: guiWorker.cpp:135
void drawPoint(int x, int y)
Draw point on the widget without redrawing it.
Definition: guiWorker.cpp:161
Works in GUI thread and is responsible for all output to display.
Definition: guiWorker.h:38
var x
Definition: file-test.js:2
var y
Definition: file-test.js:5