From 55e8cf41b3b4c0bf5b7ea54ca587fde19d92ab8d 2017-07-04 07:23:22 From: Alexandre Leroux Date: 2017-07-04 07:23:22 Subject: [PATCH] Unplot menu (1) Renames m_MenuBuilder to m_PlotMenuBuilder (a new builder will be added for the Unplot menu) --- diff --git a/gui/src/Visualization/operations/GenerateVariableMenuOperation.cpp b/gui/src/Visualization/operations/GenerateVariableMenuOperation.cpp index 4e93dae..4dc1b15 100644 --- a/gui/src/Visualization/operations/GenerateVariableMenuOperation.cpp +++ b/gui/src/Visualization/operations/GenerateVariableMenuOperation.cpp @@ -14,26 +14,26 @@ Q_LOGGING_CATEGORY(LOG_GenerateVariableMenuOperation, "GenerateVariableMenuOpera struct GenerateVariableMenuOperation::GenerateVariableMenuOperationPrivate { explicit GenerateVariableMenuOperationPrivate(QMenu *menu, std::shared_ptr variable) - : m_Variable{variable}, m_MenuBuilder{menu} + : m_Variable{variable}, m_PlotMenuBuilder{menu} { } void visitRootEnter() { // Creates the root menu - m_MenuBuilder.addMenu(QObject::tr("Plot"), QIcon{":/icones/plot.png"}); + m_PlotMenuBuilder.addMenu(QObject::tr("Plot"), QIcon{":/icones/plot.png"}); } void visitRootLeave() { // Closes the root menu - m_MenuBuilder.closeMenu(); + m_PlotMenuBuilder.closeMenu(); } void visitNodeEnter(const IVisualizationWidget &container) { // Opens a new menu associated to the node - m_MenuBuilder.addMenu(container.name()); + m_PlotMenuBuilder.addMenu(container.name()); } template @@ -41,12 +41,12 @@ struct GenerateVariableMenuOperation::GenerateVariableMenuOperationPrivate { ActionFun actionFunction) { if (m_Variable && container.canDrop(*m_Variable)) { - m_MenuBuilder.addSeparator(); - m_MenuBuilder.addAction(actionName, actionFunction); + m_PlotMenuBuilder.addSeparator(); + m_PlotMenuBuilder.addAction(actionName, actionFunction); } // Closes the menu associated to the node - m_MenuBuilder.closeMenu(); + m_PlotMenuBuilder.closeMenu(); } template @@ -54,12 +54,12 @@ struct GenerateVariableMenuOperation::GenerateVariableMenuOperationPrivate { ActionFun actionFunction) { if (m_Variable && container.canDrop(*m_Variable)) { - m_MenuBuilder.addAction(actionName, actionFunction); + m_PlotMenuBuilder.addAction(actionName, actionFunction); } } std::shared_ptr m_Variable; - MenuBuilder m_MenuBuilder; + MenuBuilder m_PlotMenuBuilder; ///< Builder for the 'Plot' menu }; GenerateVariableMenuOperation::GenerateVariableMenuOperation(QMenu *menu,