1 | NO CONTENT: new file 100644, binary diff hidden |
|
NO CONTENT: new file 100644, binary diff hidden |
@@ -5,5 +5,6 | |||||
5 | <file>icones/next.png</file> |
|
5 | <file>icones/next.png</file> | |
6 | <file>icones/plot.png</file> |
|
6 | <file>icones/plot.png</file> | |
7 | <file>icones/previous.png</file> |
|
7 | <file>icones/previous.png</file> | |
|
8 | <file>icones/unplot.png</file> | |||
8 | </qresource> |
|
9 | </qresource> | |
9 | </RCC> |
|
10 | </RCC> |
@@ -14,7 +14,7 Q_LOGGING_CATEGORY(LOG_GenerateVariableMenuOperation, "GenerateVariableMenuOpera | |||||
14 |
|
14 | |||
15 | struct GenerateVariableMenuOperation::GenerateVariableMenuOperationPrivate { |
|
15 | struct GenerateVariableMenuOperation::GenerateVariableMenuOperationPrivate { | |
16 | explicit GenerateVariableMenuOperationPrivate(QMenu *menu, std::shared_ptr<Variable> variable) |
|
16 | explicit GenerateVariableMenuOperationPrivate(QMenu *menu, std::shared_ptr<Variable> variable) | |
17 | : m_Variable{variable}, m_PlotMenuBuilder{menu} |
|
17 | : m_Variable{variable}, m_PlotMenuBuilder{menu}, m_UnplotMenuBuilder{menu} | |
18 | { |
|
18 | { | |
19 | } |
|
19 | } | |
20 |
|
20 | |||
@@ -22,12 +22,14 struct GenerateVariableMenuOperation::GenerateVariableMenuOperationPrivate { | |||||
22 | { |
|
22 | { | |
23 | // Creates the root menu |
|
23 | // Creates the root menu | |
24 | m_PlotMenuBuilder.addMenu(QObject::tr("Plot"), QIcon{":/icones/plot.png"}); |
|
24 | m_PlotMenuBuilder.addMenu(QObject::tr("Plot"), QIcon{":/icones/plot.png"}); | |
|
25 | m_UnplotMenuBuilder.addMenu(QObject::tr("Unplot"), QIcon{":/icones/unplot.png"}); | |||
25 | } |
|
26 | } | |
26 |
|
27 | |||
27 | void visitRootLeave() |
|
28 | void visitRootLeave() | |
28 | { |
|
29 | { | |
29 | // Closes the root menu |
|
30 | // Closes the root menu | |
30 | m_PlotMenuBuilder.closeMenu(); |
|
31 | m_PlotMenuBuilder.closeMenu(); | |
|
32 | m_UnplotMenuBuilder.closeMenu(); | |||
31 | } |
|
33 | } | |
32 |
|
34 | |||
33 | void visitNodeEnter(const IVisualizationWidget &container) |
|
35 | void visitNodeEnter(const IVisualizationWidget &container) | |
@@ -60,6 +62,7 struct GenerateVariableMenuOperation::GenerateVariableMenuOperationPrivate { | |||||
60 |
|
62 | |||
61 | std::shared_ptr<Variable> m_Variable; |
|
63 | std::shared_ptr<Variable> m_Variable; | |
62 | MenuBuilder m_PlotMenuBuilder; ///< Builder for the 'Plot' menu |
|
64 | MenuBuilder m_PlotMenuBuilder; ///< Builder for the 'Plot' menu | |
|
65 | MenuBuilder m_UnplotMenuBuilder; ///< Builder for the 'Unplot' menu | |||
63 | }; |
|
66 | }; | |
64 |
|
67 | |||
65 | GenerateVariableMenuOperation::GenerateVariableMenuOperation(QMenu *menu, |
|
68 | GenerateVariableMenuOperation::GenerateVariableMenuOperation(QMenu *menu, | |
@@ -73,6 +76,7 void GenerateVariableMenuOperation::visitEnter(VisualizationWidget *widget) | |||||
73 | // VisualizationWidget is not intended to accommodate a variable |
|
76 | // VisualizationWidget is not intended to accommodate a variable | |
74 | Q_UNUSED(widget) |
|
77 | Q_UNUSED(widget) | |
75 |
|
78 | |||
|
79 | // 'Plot' and 'Unplot' menus | |||
76 | impl->visitRootEnter(); |
|
80 | impl->visitRootEnter(); | |
77 | } |
|
81 | } | |
78 |
|
82 | |||
@@ -81,6 +85,7 void GenerateVariableMenuOperation::visitLeave(VisualizationWidget *widget) | |||||
81 | // VisualizationWidget is not intended to accommodate a variable |
|
85 | // VisualizationWidget is not intended to accommodate a variable | |
82 | Q_UNUSED(widget) |
|
86 | Q_UNUSED(widget) | |
83 |
|
87 | |||
|
88 | // 'Plot' and 'Unplot' menus | |||
84 | impl->visitRootLeave(); |
|
89 | impl->visitRootLeave(); | |
85 | } |
|
90 | } | |
86 |
|
91 |
General Comments 0
You need to be logged in to leave comments.
Login now