-
Notifications
You must be signed in to change notification settings - Fork 0
/
TrajectoryEditor.h
47 lines (34 loc) · 893 Bytes
/
TrajectoryEditor.h
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
40
41
42
43
44
45
46
47
#pragma once
#include <QMainWindow>
#include <QtCharts/QChart>
#include <QtCharts/QLineSeries>
class PointsModel;
QT_CHARTS_USE_NAMESPACE
namespace Ui {
class TrajectoryEditor;
}
//! \brief Main window of the program.
class TrajectoryEditor : public QMainWindow
{
Q_OBJECT
public:
explicit TrajectoryEditor(QWidget *parent = 0);
~TrajectoryEditor();
void init(PointsModel& pointsModel);
signals:
void appenPoint(const QPointF& point);
private slots:
void pointsTableModelDataChanged(const QModelIndex &topLeft,const QModelIndex &bottomRight);
private:
void initMenuActions();
void initShowEditorAction();
void initChartView();
QLineSeries* createLineSeries() const;
QChart* createChart(QLineSeries *lineSeries) const;
void initEditor();
void initAddButton();
void initRemoveButton();
void initPointsTable();
Ui::TrajectoryEditor *ui;
PointsModel* pointsModel;
};