##// END OF EJS Templates
Updates visitor interface...
Alexandre Leroux -
r207:6308522bc3bb
parent child
Show More
@@ -1,11 +1,12
1 #ifndef SCIQLOP_IVISUALIZATIONWIDGET_H
1 #ifndef SCIQLOP_IVISUALIZATIONWIDGET_H
2 #define SCIQLOP_IVISUALIZATIONWIDGET_H
2 #define SCIQLOP_IVISUALIZATIONWIDGET_H
3
3
4 #include "Visualization/IVisualizationWidgetVisitor.h"
5
4
6 #include <QString>
5 #include <QString>
7 #include <memory>
6 #include <memory>
8
7
8 class IVisualizationWidgetVisitor;
9
9 /**
10 /**
10 * @brief The IVisualizationWidget handles the visualization widget.
11 * @brief The IVisualizationWidget handles the visualization widget.
11 */
12 */
@@ -15,7 +16,7 public:
15 virtual ~IVisualizationWidget() = default;
16 virtual ~IVisualizationWidget() = default;
16
17
17 /// Initializes the plugin
18 /// Initializes the plugin
18 virtual void accept(IVisualizationWidget *visitor) = 0;
19 virtual void accept(IVisualizationWidgetVisitor *visitor) = 0;
19 virtual void close() = 0;
20 virtual void close() = 0;
20 virtual QString name() const = 0;
21 virtual QString name() const = 0;
21 };
22 };
@@ -15,9 +15,12 class IVisualizationWidgetVisitor {
15 public:
15 public:
16 virtual ~IVisualizationWidgetVisitor() = default;
16 virtual ~IVisualizationWidgetVisitor() = default;
17
17
18 virtual void visit(VisualizationWidget *widget) = 0;
18 virtual void visitEnter(VisualizationWidget *widget) = 0;
19 virtual void visit(VisualizationTabWidget *tabWidget) = 0;
19 virtual void visitLeave(VisualizationWidget *widget) = 0;
20 virtual void visit(VisualizationZoneWidget *zoneWidget) = 0;
20 virtual void visitEnter(VisualizationTabWidget *tabWidget) = 0;
21 virtual void visitLeave(VisualizationTabWidget *tabWidget) = 0;
22 virtual void visitEnter(VisualizationZoneWidget *zoneWidget) = 0;
23 virtual void visitLeave(VisualizationZoneWidget *zoneWidget) = 0;
21 virtual void visit(VisualizationGraphWidget *graphWidget) = 0;
24 virtual void visit(VisualizationGraphWidget *graphWidget) = 0;
22 };
25 };
23
26
@@ -25,7 +25,7 public:
25 void addVariable(std::shared_ptr<Variable> variable);
25 void addVariable(std::shared_ptr<Variable> variable);
26
26
27 // IVisualizationWidget interface
27 // IVisualizationWidget interface
28 void accept(IVisualizationWidget *visitor) override;
28 void accept(IVisualizationWidgetVisitor *visitor) override;
29 void close() override;
29 void close() override;
30 QString name() const;
30 QString name() const;
31
31
@@ -36,7 +36,7 public:
36 void removeZone(VisualizationZoneWidget *zone);
36 void removeZone(VisualizationZoneWidget *zone);
37
37
38 // IVisualizationWidget interface
38 // IVisualizationWidget interface
39 void accept(IVisualizationWidget *visitor) override;
39 void accept(IVisualizationWidgetVisitor *visitor) override;
40 void close() override;
40 void close() override;
41 QString name() const override;
41 QString name() const override;
42
42
@@ -32,7 +32,7 public:
32 void removeTab(VisualizationTabWidget *tab);
32 void removeTab(VisualizationTabWidget *tab);
33
33
34 // IVisualizationWidget interface
34 // IVisualizationWidget interface
35 void accept(IVisualizationWidget *visitor) override;
35 void accept(IVisualizationWidgetVisitor *visitor) override;
36 void close() override;
36 void close() override;
37 QString name() const;
37 QString name() const;
38
38
@@ -33,7 +33,7 public:
33 void removeGraph(VisualizationGraphWidget *graph);
33 void removeGraph(VisualizationGraphWidget *graph);
34
34
35 // IVisualizationWidget interface
35 // IVisualizationWidget interface
36 void accept(IVisualizationWidget *visitor) override;
36 void accept(IVisualizationWidgetVisitor *visitor) override;
37 void close() override;
37 void close() override;
38 QString name() const override;
38 QString name() const override;
39
39
@@ -1,5 +1,6
1 #include "Visualization/VisualizationGraphWidget.h"
1 #include "Visualization/VisualizationGraphWidget.h"
2 #include "Visualization/GraphPlottablesFactory.h"
2 #include "Visualization/GraphPlottablesFactory.h"
3 #include "Visualization/IVisualizationWidgetVisitor.h"
3 #include "ui_VisualizationGraphWidget.h"
4 #include "ui_VisualizationGraphWidget.h"
4
5
5 #include <Variable/Variable.h>
6 #include <Variable/Variable.h>
@@ -56,7 +57,7 void VisualizationGraphWidget::addVariable(std::shared_ptr<Variable> variable)
56 }
57 }
57 }
58 }
58
59
59 void VisualizationGraphWidget::accept(IVisualizationWidget *visitor)
60 void VisualizationGraphWidget::accept(IVisualizationWidgetVisitor *visitor)
60 {
61 {
61 // TODO: manage the visitor
62 // TODO: manage the visitor
62 }
63 }
@@ -1,4 +1,5
1 #include "Visualization/VisualizationTabWidget.h"
1 #include "Visualization/VisualizationTabWidget.h"
2 #include "Visualization/IVisualizationWidgetVisitor.h"
2 #include "ui_VisualizationTabWidget.h"
3 #include "ui_VisualizationTabWidget.h"
3
4
4 #include "Visualization/VisualizationZoneWidget.h"
5 #include "Visualization/VisualizationZoneWidget.h"
@@ -60,7 +61,7 void VisualizationTabWidget::removeZone(VisualizationZoneWidget *zone)
60 {
61 {
61 }
62 }
62
63
63 void VisualizationTabWidget::accept(IVisualizationWidget *visitor)
64 void VisualizationTabWidget::accept(IVisualizationWidgetVisitor *visitor)
64 {
65 {
65 // TODO: manage the visitor
66 // TODO: manage the visitor
66 }
67 }
@@ -1,4 +1,5
1 #include "Visualization/VisualizationWidget.h"
1 #include "Visualization/VisualizationWidget.h"
2 #include "Visualization/IVisualizationWidgetVisitor.h"
2 #include "Visualization/VisualizationGraphWidget.h"
3 #include "Visualization/VisualizationGraphWidget.h"
3 #include "Visualization/VisualizationTabWidget.h"
4 #include "Visualization/VisualizationTabWidget.h"
4 #include "Visualization/VisualizationZoneWidget.h"
5 #include "Visualization/VisualizationZoneWidget.h"
@@ -81,7 +82,7 void VisualizationWidget::removeTab(VisualizationTabWidget *tab)
81 // lambda function (in the constructor)
82 // lambda function (in the constructor)
82 }
83 }
83
84
84 void VisualizationWidget::accept(IVisualizationWidget *visitor)
85 void VisualizationWidget::accept(IVisualizationWidgetVisitor *visitor)
85 {
86 {
86 // TODO: manage the visitor
87 // TODO: manage the visitor
87 }
88 }
@@ -1,4 +1,5
1 #include "Visualization/VisualizationZoneWidget.h"
1 #include "Visualization/VisualizationZoneWidget.h"
2 #include "Visualization/IVisualizationWidgetVisitor.h"
2 #include "ui_VisualizationZoneWidget.h"
3 #include "ui_VisualizationZoneWidget.h"
3
4
4 #include "Visualization/VisualizationGraphWidget.h"
5 #include "Visualization/VisualizationGraphWidget.h"
@@ -54,7 +55,7 void VisualizationZoneWidget::removeGraph(VisualizationGraphWidget *graph)
54 {
55 {
55 }
56 }
56
57
57 void VisualizationZoneWidget::accept(IVisualizationWidget *visitor)
58 void VisualizationZoneWidget::accept(IVisualizationWidgetVisitor *visitor)
58 {
59 {
59 // TODO: manage the visitor
60 // TODO: manage the visitor
60 }
61 }
General Comments 0
You need to be logged in to leave comments. Login now