comparison widgets/PropertyBox.h @ 1587:2108af725460

Add context menus to property box controls
author Chris Cannam
date Fri, 27 Mar 2020 14:36:11 +0000
parents b1e3ee5f1be6
children a798a7b5e215
comparison
equal deleted inserted replaced
1586:bbc3f537564c 1587:2108af725460
27 class QVBoxLayout; 27 class QVBoxLayout;
28 class QLabel; 28 class QLabel;
29 class LEDButton; 29 class LEDButton;
30 class QToolButton; 30 class QToolButton;
31 class NotifyingPushButton; 31 class NotifyingPushButton;
32 class QMenu;
32 33
33 class PropertyBox : public QFrame 34 class PropertyBox : public QFrame
34 { 35 {
35 Q_OBJECT 36 Q_OBJECT
36 37
66 void editPlayParameters(); 67 void editPlayParameters();
67 68
68 void mouseEnteredWidget(); 69 void mouseEnteredWidget();
69 void mouseLeftWidget(); 70 void mouseLeftWidget();
70 71
72 void contextMenuRequested(const QPoint &);
73
71 protected: 74 protected:
72 void updatePropertyEditor(PropertyContainer::PropertyName, 75 void updatePropertyEditor(PropertyContainer::PropertyName,
73 bool rangeChanged = false); 76 bool rangeChanged = false);
74 void updateContextHelp(QObject *o); 77 void updateContextHelp(QObject *o);
75 78
79 PropertyContainer *m_container; 82 PropertyContainer *m_container;
80 QFrame *m_viewPlayFrame; 83 QFrame *m_viewPlayFrame;
81 QVBoxLayout *m_mainBox; 84 QVBoxLayout *m_mainBox;
82 LEDButton *m_showButton; 85 LEDButton *m_showButton;
83 QToolButton *m_playButton; 86 QToolButton *m_playButton;
87 QMenu *m_lastContextMenu;
84 std::map<QString, QGridLayout *> m_groupLayouts; 88 std::map<QString, QGridLayout *> m_groupLayouts;
85 std::map<QString, QWidget *> m_propertyControllers; 89 std::map<QString, QWidget *> m_propertyControllers;
86 }; 90 };
87 91
88 #endif 92 #endif