##// END OF EJS Templates
Adds comments
Alexandre Leroux -
r206:5eea2a27f0fe
parent child
Show More
@@ -93,7 +93,7 struct MenuBuilder {
93 93 }
94 94 }
95 95
96 /// Gets the current menu (i.e. the top menu of the stack)
96 /// @return the current menu (i.e. the top menu of the stack), nullptr if there is no menu
97 97 QMenu *currentMenu() const { return !m_Menus.isEmpty() ? m_Menus.top() : nullptr; }
98 98
99 99 /// Stack of all menus currently opened
@@ -163,6 +163,10 void GenerateVariableMenuOperation::visitEnter(VisualizationTabWidget *tabWidget
163 163 if (tabWidget) {
164 164 impl->visitNodeEnter(*tabWidget);
165 165 }
166 else {
167 qCCritical(LOG_GenerateVariableMenuOperation(),
168 "Can't visit enter VisualizationTabWidget : the widget is null");
169 }
166 170 }
167 171
168 172 void GenerateVariableMenuOperation::visitLeave(VisualizationTabWidget *tabWidget)
@@ -172,6 +176,10 void GenerateVariableMenuOperation::visitLeave(VisualizationTabWidget *tabWidget
172 176 *tabWidget, QObject::tr("Open in a new zone"),
173 177 [ var = impl->m_Variable, tabWidget ]() { tabWidget->createZone(var); });
174 178 }
179 else {
180 qCCritical(LOG_GenerateVariableMenuOperation(),
181 "Can't visit leave VisualizationTabWidget : the widget is null");
182 }
175 183 }
176 184
177 185 void GenerateVariableMenuOperation::visitEnter(VisualizationZoneWidget *zoneWidget)
@@ -179,6 +187,10 void GenerateVariableMenuOperation::visitEnter(VisualizationZoneWidget *zoneWidg
179 187 if (zoneWidget) {
180 188 impl->visitNodeEnter(*zoneWidget);
181 189 }
190 else {
191 qCCritical(LOG_GenerateVariableMenuOperation(),
192 "Can't visit enter VisualizationZoneWidget : the widget is null");
193 }
182 194 }
183 195
184 196 void GenerateVariableMenuOperation::visitLeave(VisualizationZoneWidget *zoneWidget)
@@ -188,6 +200,10 void GenerateVariableMenuOperation::visitLeave(VisualizationZoneWidget *zoneWidg
188 200 *zoneWidget, QObject::tr("Open in a new graph"),
189 201 [ var = impl->m_Variable, zoneWidget ]() { zoneWidget->createGraph(var); });
190 202 }
203 else {
204 qCCritical(LOG_GenerateVariableMenuOperation(),
205 "Can't visit leave VisualizationZoneWidget : the widget is null");
206 }
191 207 }
192 208
193 209 void GenerateVariableMenuOperation::visit(VisualizationGraphWidget *graphWidget)
@@ -197,4 +213,8 void GenerateVariableMenuOperation::visit(VisualizationGraphWidget *graphWidget)
197 213 *graphWidget, QObject::tr("Open in %1").arg(graphWidget->name()),
198 214 [ var = impl->m_Variable, graphWidget ]() { graphWidget->addVariable(var); });
199 215 }
216 else {
217 qCCritical(LOG_GenerateVariableMenuOperation(),
218 "Can't visit VisualizationGraphWidget : the widget is null");
219 }
200 220 }
General Comments 0
You need to be logged in to leave comments. Login now