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