##// END OF EJS Templates
Sets plot properties in a graph
Alexandre Leroux -
r178:9f84e7d54b1f
parent child
Show More
@@ -1,47 +1,51
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 16 : QWidget{parent},
17 17 ui{new Ui::VisualizationGraphWidget},
18 18 impl{spimpl::make_unique_impl<VisualizationGraphWidgetPrivate>()}
19 19 {
20 20 ui->setupUi(this);
21
22 // Set qcpplot properties :
23 // - Drag and zoom are enabled
24 ui->widget->setInteractions(QCP::iRangeDrag | QCP::iRangeZoom);
21 25 }
22 26
23 27 VisualizationGraphWidget::~VisualizationGraphWidget()
24 28 {
25 29 delete ui;
26 30 }
27 31
28 32 void VisualizationGraphWidget::addVariable(std::shared_ptr<Variable> variable)
29 33 {
30 34 // todo: first check is variable contains data then check how many plot have to be created
31 35 }
32 36
33 37 void VisualizationGraphWidget::accept(IVisualizationWidget *visitor)
34 38 {
35 39 // TODO: manage the visitor
36 40 }
37 41
38 42 void VisualizationGraphWidget::close()
39 43 {
40 44 // The main view cannot be directly closed.
41 45 return;
42 46 }
43 47
44 48 QString VisualizationGraphWidget::name() const
45 49 {
46 50 return QStringLiteral("MainView");
47 51 }
General Comments 0
You need to be logged in to leave comments. Login now