-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgraphpainter.h
More file actions
40 lines (32 loc) · 750 Bytes
/
graphpainter.h
File metadata and controls
40 lines (32 loc) · 750 Bytes
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
38
39
#ifndef GRAPHPAINTER_H
#define GRAPHPAINTER_H
#include <QWidget>
#include <QMatrix>
#include <QColor>
#include <vector>
#include <math.h>
#include <QPainter>
#include "graph.h"
#include "engine.h"
#define PI 3.1415
class GraphPainter : public QWidget
{
Q_OBJECT
public:
explicit GraphPainter(QWidget *parent = 0);
void setPointColor(QColor pointC);
void setLineColor(QColor lineC);
void enableLabels(){showLabels=true;}
void disableLabels(){showLabels=false;}
void paintEvent(QPaintEvent *);
signals:
public slots:
void update(QObject * sender=NULL);
private:
QColor pathColor;
QColor pointColor;
QColor lineColor;
bool showLabels;
Graph * pointerToGraphMatrix;
};
#endif // GRAPHPAINTER_H