Skip to content
Snippets Groups Projects
Commit 1d0573ea authored by Peterson, Peter's avatar Peterson, Peter
Browse files

Re #7099. Add in the rest of the plumbing for optional columns

...in the peaks table of slice viewer.
parent 30d998e0
No related merge requests found
......@@ -115,6 +115,8 @@ signals:
void showPeaksViewer(bool);
/// Signal emitted when someone uses setWorkspace() on SliceViewer
void workspaceChanged();
/// Signal emitted when someone wants to see the options dialog
void peaksTableColumnOptions();
public slots:
void helpSliceViewer();
......@@ -149,7 +151,7 @@ public slots:
QPixmap getImage();
void saveImage(const QString & filename = QString());
void copyImageToClipboard();
void onPeaksViewerOptions();
void onPeaksViewerOverlayOptions();
// Synced checkboxes
void LineMode_toggled(bool);
......
......@@ -413,8 +413,11 @@ void SliceViewer::initMenus()
// --------------- Peaks Menu ----------------------------------------
m_menuPeaks = new QMenu("&Peak", this);
action = new QAction(QPixmap(), "&Peaks Overlay Options", this);
connect(action, SIGNAL(triggered()), this, SLOT(onPeaksViewerOptions()));
action = new QAction(QPixmap(), "&Overlay Options", this);
connect(action, SIGNAL(triggered()), this, SLOT(onPeaksViewerOverlayOptions()));
m_menuPeaks->addAction(action);
action = new QAction(QPixmap(), "&Visable Columns", this);
connect(action, SIGNAL(triggered()), this, SIGNAL(peaksTableColumnOptions())); // just re-emit
m_menuPeaks->addAction(action);
m_menuPeaks->setEnabled(false);// Until a PeaksWorkspace is selected.
......@@ -2356,7 +2359,7 @@ void SliceViewer::resetView()
this->resetZoom();
}
void SliceViewer::onPeaksViewerOptions()
void SliceViewer::onPeaksViewerOverlayOptions()
{
PeaksViewerOverlayDialog dlg(this->m_peaksPresenter);
dlg.exec();
......
......@@ -103,6 +103,10 @@ SliceViewerWindow::SliceViewerWindow(const QString& wsName, const QString& label
// Connect the SliceViewer and the PeaksViewer together
QObject::connect( m_slicer, SIGNAL(showPeaksViewer(bool)), this, SLOT(showPeaksViewer(bool)));
// Connect the sliceviewer visible peaks column dialog to its dialog
QObject::connect(m_slicer, SIGNAL(peaksTableColumnOptions()),
m_peaksViewer, SLOT(showPeaksTableColumnOptions()));
// Drag-dropping the line around
QObject::connect( m_slicer->getLineOverlay(), SIGNAL(lineChanging(QPointF, QPointF, double)),
this, SLOT(lineChanging(QPointF, QPointF, double)) );
......@@ -399,7 +403,6 @@ void SliceViewerWindow::changePlanarWidth(double width)
m_slicer->getLineOverlay()->update();
}
//------------------------------------------------------------------------------------------------
/** Signal to close this window if the workspace has just been deleted */
void SliceViewerWindow::preDeleteHandle(const std::string& wsName,const boost::shared_ptr<Mantid::API::Workspace> ws)
......@@ -424,6 +427,5 @@ void SliceViewerWindow::afterReplaceHandle(const std::string& wsName,const boost
emit needToUpdate();
}
}
}//namespace SliceViewer
}//namespace MantidQt
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment