# HG changeset patch # User Chris Cannam # Date 1146834407 0 # Node ID 803830f186efcabca7badf75d3606db94bc663db # Parent 6b864e6864cb2925951be6847b85541aa1f2a6b6 * Move matrix/fft file code to fileio (from base) * Add right-button menu to panes diff -r 6b864e6864cb -r 803830f186ef layer/SpectrogramLayer.cpp --- a/layer/SpectrogramLayer.cpp Thu May 04 16:03:02 2006 +0000 +++ b/layer/SpectrogramLayer.cpp Fri May 05 13:06:47 2006 +0000 @@ -20,8 +20,7 @@ #include "base/AudioLevel.h" #include "base/Window.h" #include "base/Pitch.h" -#include "base/FFTCache.h" -#include "base/FFTFileCache.h" +#include "fileio/FFTFileCache.h" #include #include diff -r 6b864e6864cb -r 803830f186ef widgets/Pane.cpp --- a/widgets/Pane.cpp Thu May 04 16:03:02 2006 +0000 +++ b/widgets/Pane.cpp Fri May 05 13:06:47 2006 +0000 @@ -479,6 +479,11 @@ void Pane::mousePressEvent(QMouseEvent *e) { + if (e->buttons() & Qt::RightButton) { + emit rightButtonMenuRequested(mapToGlobal(e->pos())); + return; + } + m_clickPos = e->pos(); m_clickedInRange = true; m_editingSelection = Selection(); @@ -566,6 +571,10 @@ void Pane::mouseReleaseEvent(QMouseEvent *e) { + if (e->buttons() & Qt::RightButton) { + return; + } + ViewManager::ToolMode mode = ViewManager::NavigateMode; if (m_manager) mode = m_manager->getToolMode(); @@ -661,6 +670,10 @@ void Pane::mouseMoveEvent(QMouseEvent *e) { + if (e->buttons() & Qt::RightButton) { + return; + } + ViewManager::ToolMode mode = ViewManager::NavigateMode; if (m_manager) mode = m_manager->getToolMode(); @@ -814,6 +827,10 @@ void Pane::mouseDoubleClickEvent(QMouseEvent *e) { + if (e->buttons() & Qt::RightButton) { + return; + } + std::cerr << "mouseDoubleClickEvent" << std::endl; m_clickPos = e->pos(); diff -r 6b864e6864cb -r 803830f186ef widgets/Pane.h --- a/widgets/Pane.h Thu May 04 16:03:02 2006 +0000 +++ b/widgets/Pane.h Fri May 05 13:06:47 2006 +0000 @@ -50,6 +50,7 @@ signals: void paneInteractedWith(); + void rightButtonMenuRequested(QPoint position); public slots: virtual void toolModeChanged(); diff -r 6b864e6864cb -r 803830f186ef widgets/PaneStack.cpp --- a/widgets/PaneStack.cpp Thu May 04 16:03:02 2006 +0000 +++ b/widgets/PaneStack.cpp Fri May 05 13:06:47 2006 +0000 @@ -83,6 +83,8 @@ this, SLOT(propertyContainerRemoved(PropertyContainer *))); connect(pane, SIGNAL(paneInteractedWith()), this, SLOT(paneInteractedWith())); + connect(pane, SIGNAL(rightButtonMenuRequested(QPoint)), + this, SLOT(rightButtonMenuRequested(QPoint))); if (!m_currentPane) { setCurrentPane(pane); @@ -325,6 +327,14 @@ } void +PaneStack::rightButtonMenuRequested(QPoint position) +{ + Pane *pane = dynamic_cast(sender()); + if (!pane) return; + emit rightButtonMenuRequested(pane, position); +} + +void PaneStack::sizePropertyStacks() { int maxMinWidth = 0; diff -r 6b864e6864cb -r 803830f186ef widgets/PaneStack.h --- a/widgets/PaneStack.h Thu May 04 16:03:02 2006 +0000 +++ b/widgets/PaneStack.h Fri May 05 13:06:47 2006 +0000 @@ -54,12 +54,14 @@ signals: void currentPaneChanged(Pane *pane); void currentLayerChanged(Pane *pane, Layer *layer); + void rightButtonMenuRequested(Pane *pane, QPoint position); public slots: void propertyContainerAdded(PropertyContainer *); void propertyContainerRemoved(PropertyContainer *); void propertyContainerSelected(View *client, PropertyContainer *); void paneInteractedWith(); + void rightButtonMenuRequested(QPoint); protected: Pane *m_currentPane;