##// END OF EJS Templates
Implements visit of tab and zone...
Alexandre Leroux -
r212:fae2d5d3e62c
parent child
Show More
@@ -68,6 +68,19 struct GenerateVariableMenuOperation::GenerateVariableMenuOperationPrivate {
68 {
68 {
69 }
69 }
70
70
71 void visitNodeEnter(const IVisualizationWidget &container)
72 {
73 // Opens a new menu associated to the node
74 m_MenuBuilder.addMenu(container.name());
75 }
76
77 template <typename ActionFun>
78 void visitNodeLeave()
79 {
80 // Closes the menu associated to the node
81 m_MenuBuilder.closeMenu();
82 }
83
71 std::shared_ptr<Variable> m_Variable;
84 std::shared_ptr<Variable> m_Variable;
72 MenuBuilder m_MenuBuilder;
85 MenuBuilder m_MenuBuilder;
73 };
86 };
@@ -92,22 +105,30 void GenerateVariableMenuOperation::visitLeave(VisualizationWidget *widget)
92
105
93 void GenerateVariableMenuOperation::visitEnter(VisualizationTabWidget *tabWidget)
106 void GenerateVariableMenuOperation::visitEnter(VisualizationTabWidget *tabWidget)
94 {
107 {
95 /// @todo ALX
108 if (tabWidget) {
109 impl->visitNodeEnter(*tabWidget);
110 }
96 }
111 }
97
112
98 void GenerateVariableMenuOperation::visitLeave(VisualizationTabWidget *tabWidget)
113 void GenerateVariableMenuOperation::visitLeave(VisualizationTabWidget *tabWidget)
99 {
114 {
100 /// @todo ALX
115 if (tabWidget) {
116 impl->visitNodeLeave();
117 }
101 }
118 }
102
119
103 void GenerateVariableMenuOperation::visitEnter(VisualizationZoneWidget *zoneWidget)
120 void GenerateVariableMenuOperation::visitEnter(VisualizationZoneWidget *zoneWidget)
104 {
121 {
105 /// @todo ALX
122 if (zoneWidget) {
123 impl->visitNodeEnter(*zoneWidget);
124 }
106 }
125 }
107
126
108 void GenerateVariableMenuOperation::visitLeave(VisualizationZoneWidget *zoneWidget)
127 void GenerateVariableMenuOperation::visitLeave(VisualizationZoneWidget *zoneWidget)
109 {
128 {
110 /// @todo ALX
129 if (zoneWidget) {
130 impl->visitNodeLeave();
131 }
111 }
132 }
112
133
113 void GenerateVariableMenuOperation::visit(VisualizationGraphWidget *graphWidget)
134 void GenerateVariableMenuOperation::visit(VisualizationGraphWidget *graphWidget)
General Comments 0
You need to be logged in to leave comments. Login now