-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCWCircuit.h
More file actions
34 lines (30 loc) · 927 Bytes
/
Copy pathCWCircuit.h
File metadata and controls
34 lines (30 loc) · 927 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
#ifndef CWCIRCUIT_H
#define CWCIRCUIT_H
#include <QWidget>
#include <QTextStream>
#include "CCircuit.h"
class CWCircuit : public QWidget {
Q_OBJECT
public:
explicit CWCircuit(QWidget *parent = 0);
void setCircuit(CCircuit *circuit);
void calculMarkers(const QPoint &depart, double distance, double angleDepart, int numCircuit, bool showDroite);
void createImage(QString fileName);
void setElapsedTime(QString elapsedTime);
void setPositionRef(const QPoint& positionRef);
void setNbVoiture(int nbVoiture);
protected:
virtual void paintEvent(QPaintEvent *);
private:
CCircuit *circuit;
QList<QPoint> markers;
QList<QLine> lines;
QString elapsedTime;
int nbVoiture;
QPoint positionRef;
QTextStream& qStdOut(void);
QPoint calculNextPoint(const QPoint& p, double angleDepart);
signals:
void drawVoitures(QPainter *painter, double dx, double dy);
};
#endif // CWCIRCUIT_H