##// END OF EJS Templates
Puts hierarchical menu in a 'Plot' menu
Alexandre Leroux -
r309:042735c9acd2
parent child
Show More
@@ -18,6 +18,18 struct GenerateVariableMenuOperation::GenerateVariableMenuOperationPrivate {
18 {
18 {
19 }
19 }
20
20
21 void visitRootEnter()
22 {
23 // Creates the root menu
24 m_MenuBuilder.addMenu(QObject::tr("Plot"));
25 }
26
27 void visitRootLeave()
28 {
29 // Closes the root menu
30 m_MenuBuilder.closeMenu();
31 }
32
21 void visitNodeEnter(const IVisualizationWidget &container)
33 void visitNodeEnter(const IVisualizationWidget &container)
22 {
34 {
23 // Opens a new menu associated to the node
35 // Opens a new menu associated to the node
@@ -60,12 +72,16 void GenerateVariableMenuOperation::visitEnter(VisualizationWidget *widget)
60 {
72 {
61 // VisualizationWidget is not intended to accommodate a variable
73 // VisualizationWidget is not intended to accommodate a variable
62 Q_UNUSED(widget)
74 Q_UNUSED(widget)
75
76 impl->visitRootEnter();
63 }
77 }
64
78
65 void GenerateVariableMenuOperation::visitLeave(VisualizationWidget *widget)
79 void GenerateVariableMenuOperation::visitLeave(VisualizationWidget *widget)
66 {
80 {
67 // VisualizationWidget is not intended to accommodate a variable
81 // VisualizationWidget is not intended to accommodate a variable
68 Q_UNUSED(widget)
82 Q_UNUSED(widget)
83
84 impl->visitRootLeave();
69 }
85 }
70
86
71 void GenerateVariableMenuOperation::visitEnter(VisualizationTabWidget *tabWidget)
87 void GenerateVariableMenuOperation::visitEnter(VisualizationTabWidget *tabWidget)
General Comments 0
You need to be logged in to leave comments. Login now