Mercurial > hg > svgui
diff view/PaneStack.cpp @ 1582:01a41a37bd26
Add a tab-bar context menu signal to the property stack
author | Chris Cannam |
---|---|
date | Wed, 25 Mar 2020 12:08:34 +0000 (2020-03-25) |
parents | 34311e135695 |
children | d6976d231efb |
line wrap: on
line diff
--- a/view/PaneStack.cpp Fri Jan 24 15:11:08 2020 +0000 +++ b/view/PaneStack.cpp Wed Mar 25 12:08:34 2020 +0000 @@ -146,6 +146,8 @@ properties = new PropertyStack(frame, pane); connect(properties, SIGNAL(propertyContainerSelected(View *, PropertyContainer *)), this, SLOT(propertyContainerSelected(View *, PropertyContainer *))); + connect(properties, SIGNAL(propertyContainerContextMenuRequested(View *, PropertyContainer *, QPoint)), + this, SLOT(propertyContainerContextMenuRequested(View *, PropertyContainer *, QPoint))); connect(properties, SIGNAL(viewSelected(View *)), this, SLOT(viewSelected(View *))); connect(properties, SIGNAL(contextHelpChanged(const QString &)), @@ -588,6 +590,23 @@ } void +PaneStack::propertyContainerContextMenuRequested(View *client, + PropertyContainer *pc, + QPoint pos) +{ + Pane *pane = dynamic_cast<Pane *>(client); + Layer *layer = dynamic_cast<Layer *>(pc); + + if (pane) { + if (layer) { + emit layerPropertiesRightButtonMenuRequested(pane, layer, pos); + } else { + emit panePropertiesRightButtonMenuRequested(pane, pos); + } + } +} + +void PaneStack::viewSelected(View *v) { Pane *p = dynamic_cast<Pane *>(v); @@ -607,7 +626,7 @@ { Pane *pane = dynamic_cast<Pane *>(sender()); if (!pane) return; - emit rightButtonMenuRequested(pane, position); + emit paneRightButtonMenuRequested(pane, position); } void