-
Notifications
You must be signed in to change notification settings - Fork 0
/
output_widget.hpp
37 lines (32 loc) · 943 Bytes
/
output_widget.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#ifndef OUTPUT_WIDGET_HPP
#define OUTPUT_WIDGET_HPP
#include <QGraphicsView>
#include <QGraphicsScene>
#include <QGraphicsTextItem>
#include <QGraphicsEllipseItem>
#include <QGraphicsLineItem>
#include <QObject>
#include <string>
#include <QPainter>
#include <QVBoxLayout>
class OutputWidget : public QWidget
{
Q_OBJECT
private:
QGraphicsScene * scene;
QGraphicsView * view;
public:
OutputWidget(QWidget * parent = nullptr);
QGraphicsView * outputBox();
~OutputWidget();
protected:
void resizeEvent(QResizeEvent *event);
public slots:
void RecieveClearScene();
void RecieveError(std::string error);
void RecieveValidOutput(std::string message);
void RecieveDrawPoint(double x, double y, double pointsize);
void RecieveDrawLine(double x1, double y1, double x2, double y2, double thickness_size);
void RecieveDrawString(double x, double y, double angle, double scale, std::string text_message);
};
#endif // !OUTPUT_WIDGET_HPP