Auto status change to "Under Review"
@@ -1,47 +1,47 | |||
|
1 | 1 | #include "Visualization/VisualizationGraphWidget.h" |
|
2 | 2 | #include "ui_VisualizationGraphWidget.h" |
|
3 | 3 | |
|
4 | 4 | #include <Variable/Variable.h> |
|
5 | 5 | |
|
6 | 6 | #include <unordered_map> |
|
7 | 7 | |
|
8 | 8 | struct VisualizationGraphWidget::VisualizationGraphWidgetPrivate { |
|
9 | 9 | |
|
10 | 10 | // 1 variable -> n qcpplot |
|
11 | 11 | std::unordered_map<std::shared_ptr<Variable>, std::unique_ptr<QCPAbstractPlottable> > |
|
12 | 12 | m_VariableToPlotMap; |
|
13 | 13 | }; |
|
14 | 14 | |
|
15 | 15 | VisualizationGraphWidget::VisualizationGraphWidget(QWidget *parent) |
|
16 |
: QWidget |
|
|
17 |
ui |
|
|
16 | : QWidget{parent}, | |
|
17 | ui{new Ui::VisualizationGraphWidget}, | |
|
18 | 18 | impl{spimpl::make_unique_impl<VisualizationGraphWidgetPrivate>()} |
|
19 | 19 | { |
|
20 | 20 | ui->setupUi(this); |
|
21 | 21 | } |
|
22 | 22 | |
|
23 | 23 | VisualizationGraphWidget::~VisualizationGraphWidget() |
|
24 | 24 | { |
|
25 | 25 | delete ui; |
|
26 | 26 | } |
|
27 | 27 | |
|
28 | 28 | void VisualizationGraphWidget::addVariable(std::shared_ptr<Variable> variable) |
|
29 | 29 | { |
|
30 | 30 | // todo: first check is variable contains data then check how many plot have to be created |
|
31 | 31 | } |
|
32 | 32 | |
|
33 | 33 | void VisualizationGraphWidget::accept(IVisualizationWidget *visitor) |
|
34 | 34 | { |
|
35 | 35 | // TODO: manage the visitor |
|
36 | 36 | } |
|
37 | 37 | |
|
38 | 38 | void VisualizationGraphWidget::close() |
|
39 | 39 | { |
|
40 | 40 | // The main view cannot be directly closed. |
|
41 | 41 | return; |
|
42 | 42 | } |
|
43 | 43 | |
|
44 | 44 | QString VisualizationGraphWidget::name() const |
|
45 | 45 | { |
|
46 | 46 | return QStringLiteral("MainView"); |
|
47 | 47 | } |
@@ -1,49 +1,49 | |||
|
1 | 1 | #include "Visualization/VisualizationTabWidget.h" |
|
2 | 2 | #include "ui_VisualizationTabWidget.h" |
|
3 | 3 | |
|
4 | 4 | #include "Visualization/VisualizationZoneWidget.h" |
|
5 | 5 | |
|
6 | 6 | |
|
7 | 7 | VisualizationTabWidget::VisualizationTabWidget(QWidget *parent) |
|
8 | 8 | : QWidget{parent}, ui{new Ui::VisualizationTabWidget} |
|
9 | 9 | { |
|
10 | 10 | ui->setupUi(this); |
|
11 | 11 | } |
|
12 | 12 | |
|
13 | 13 | VisualizationTabWidget::~VisualizationTabWidget() |
|
14 | 14 | { |
|
15 | 15 | delete ui; |
|
16 | 16 | } |
|
17 | 17 | |
|
18 | 18 | void VisualizationTabWidget::addZone(VisualizationZoneWidget *zoneWidget) |
|
19 | 19 | { |
|
20 | 20 | this->layout()->addWidget(zoneWidget); |
|
21 | 21 | } |
|
22 | 22 | |
|
23 | 23 | VisualizationZoneWidget *VisualizationTabWidget::createZone() |
|
24 | 24 | { |
|
25 |
auto zoneWidget = new VisualizationZoneWidget |
|
|
25 | auto zoneWidget = new VisualizationZoneWidget{this}; | |
|
26 | 26 | this->addZone(zoneWidget); |
|
27 | 27 | |
|
28 | 28 | return zoneWidget; |
|
29 | 29 | } |
|
30 | 30 | |
|
31 | 31 | void VisualizationTabWidget::removeZone(VisualizationZoneWidget *zone) |
|
32 | 32 | { |
|
33 | 33 | } |
|
34 | 34 | |
|
35 | 35 | void VisualizationTabWidget::accept(IVisualizationWidget *visitor) |
|
36 | 36 | { |
|
37 | 37 | // TODO: manage the visitor |
|
38 | 38 | } |
|
39 | 39 | |
|
40 | 40 | void VisualizationTabWidget::close() |
|
41 | 41 | { |
|
42 | 42 | // The main view cannot be directly closed. |
|
43 | 43 | return; |
|
44 | 44 | } |
|
45 | 45 | |
|
46 | 46 | QString VisualizationTabWidget::name() const |
|
47 | 47 | { |
|
48 | 48 | return QStringLiteral("MainView"); |
|
49 | 49 | } |
@@ -1,48 +1,48 | |||
|
1 | 1 | #include "Visualization/VisualizationZoneWidget.h" |
|
2 | 2 | #include "ui_VisualizationZoneWidget.h" |
|
3 | 3 | |
|
4 | 4 | #include "Visualization/VisualizationGraphWidget.h" |
|
5 | 5 | |
|
6 | 6 | VisualizationZoneWidget::VisualizationZoneWidget(QWidget *parent) |
|
7 | 7 | : QWidget{parent}, ui{new Ui::VisualizationZoneWidget} |
|
8 | 8 | { |
|
9 | 9 | ui->setupUi(this); |
|
10 | 10 | } |
|
11 | 11 | |
|
12 | 12 | VisualizationZoneWidget::~VisualizationZoneWidget() |
|
13 | 13 | { |
|
14 | 14 | delete ui; |
|
15 | 15 | } |
|
16 | 16 | |
|
17 | 17 | void VisualizationZoneWidget::addGraph(VisualizationGraphWidget *graphWidget) |
|
18 | 18 | { |
|
19 | 19 | ui->visualizationZoneFrame->layout()->addWidget(graphWidget); |
|
20 | 20 | } |
|
21 | 21 | |
|
22 | 22 | VisualizationGraphWidget *VisualizationZoneWidget::createGraph() |
|
23 | 23 | { |
|
24 |
auto graphWidget = new VisualizationGraphWidget |
|
|
24 | auto graphWidget = new VisualizationGraphWidget{this}; | |
|
25 | 25 | this->addGraph(graphWidget); |
|
26 | 26 | |
|
27 | 27 | return graphWidget; |
|
28 | 28 | } |
|
29 | 29 | |
|
30 | 30 | void VisualizationZoneWidget::removeGraph(VisualizationGraphWidget *graph) |
|
31 | 31 | { |
|
32 | 32 | } |
|
33 | 33 | |
|
34 | 34 | void VisualizationZoneWidget::accept(IVisualizationWidget *visitor) |
|
35 | 35 | { |
|
36 | 36 | // TODO: manage the visitor |
|
37 | 37 | } |
|
38 | 38 | |
|
39 | 39 | void VisualizationZoneWidget::close() |
|
40 | 40 | { |
|
41 | 41 | // The main view cannot be directly closed. |
|
42 | 42 | return; |
|
43 | 43 | } |
|
44 | 44 | |
|
45 | 45 | QString VisualizationZoneWidget::name() const |
|
46 | 46 | { |
|
47 | 47 | return QStringLiteral("MainView"); |
|
48 | 48 | } |
General Comments 1
You need to be logged in to leave comments.
Login now