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

Re #7099. Renamed PeaksViewerOptionsDialog to PeaksViewerOverlayDialog

parent ab0adbf8
No related merge requests found
......@@ -7,7 +7,7 @@ set ( SRC_FILES
src/LineOverlay.cpp
src/LineViewer.cpp
src/PeakBoundingBox.cpp
src/PeaksViewerOptionsDialog.cpp
src/PeaksViewerOverlayDialog.cpp
src/PeakOverlayMultiCross.cpp
src/PeakOverlayMultiCrossFactory.cpp
src/PeakOverlayMultiSphere.cpp
......@@ -68,7 +68,7 @@ set ( INC_FILES
inc/MantidQtSliceViewer/PeakTransformFactory.h
inc/MantidQtSliceViewer/PeakTransformSelector.h
inc/MantidQtSliceViewer/PeaksViewer.h
inc/MantidQtSliceViewer/PeaksViewerOptionsDialog.h
inc/MantidQtSliceViewer/PeaksViewerOverlayDialog.h
inc/MantidQtSliceViewer/PeaksWorkspaceWidget.h
inc/MantidQtSliceViewer/PhysicalCrossPeak.h
inc/MantidQtSliceViewer/PhysicalSphericalPeak.h
......@@ -98,7 +98,7 @@ set ( MOC_FILES
inc/MantidQtSliceViewer/QScienceSpinBox.h
inc/MantidQtSliceViewer/SnapToGridDialog.h
inc/MantidQtSliceViewer/PeaksViewer.h
inc/MantidQtSliceViewer/PeaksViewerOptionsDialog.h
inc/MantidQtSliceViewer/PeaksViewerOverlayDialog.h
inc/MantidQtSliceViewer/PeaksWorkspaceWidget.h
inc/MantidQtSliceViewer/XYLimitsDialog.h
inc/MantidQtSliceViewer/QPeaksTableModel.h
......@@ -113,7 +113,7 @@ set ( UI_FILES
inc/MantidQtSliceViewer/SnapToGridDialog.ui
inc/MantidQtSliceViewer/PeaksTableColumnsDialog.ui
inc/MantidQtSliceViewer/PeaksWorkspaceWidget.ui
inc/MantidQtSliceViewer/PeaksViewerOptionsDialog.ui
inc/MantidQtSliceViewer/PeaksViewerOverlayDialog.ui
inc/MantidQtSliceViewer/XYLimitsDialog.ui
)
......
#ifndef MANTIDSLICEVIEWER_PEAKSVIEWEROPTIONS_H
#define MANTIDSLICEVIEWER_PEAKSVIEWEROPTIONS_H
#ifndef MANTIDSLICEVIEWER_PEAKSVIEWEROVERLAYDIALOG_H
#define MANTIDSLICEVIEWER_PEAKSVIEWEROVERLAYDIALOG_H
#include <QDialog>
#include "MantidQtSliceViewer/PeaksPresenter.h"
......@@ -7,20 +7,20 @@
class QAbstractButton;
namespace Ui
{
class PeaksViewerOptionsDialog;
class PeaksViewerOverlayDialog;
}
namespace MantidQt
{
namespace SliceViewer
{
class PeaksViewerOptionsDialog: public QDialog
class PeaksViewerOverlayDialog: public QDialog
{
Q_OBJECT
public:
explicit PeaksViewerOptionsDialog(PeaksPresenter_sptr peaksPresenter, QWidget *parent = 0);
~PeaksViewerOptionsDialog();
explicit PeaksViewerOverlayDialog(PeaksPresenter_sptr peaksPresenter, QWidget *parent = 0);
~PeaksViewerOverlayDialog();
virtual void closeEvent(QCloseEvent *);
virtual void reject();
......@@ -34,7 +34,7 @@ namespace MantidQt
void onHelp();
private:
Ui::PeaksViewerOptionsDialog *ui;
Ui::PeaksViewerOverlayDialog *ui;
PeaksPresenter_sptr m_peaksPresenter;
double m_originalOnProjectionFraction;
......@@ -43,4 +43,4 @@ namespace MantidQt
}
}
#endif // MANTIDSLICEVIEWER_PEAKSVIEWEROPTIONS_H
#endif // MANTIDSLICEVIEWER_PEAKSVIEWEROVERLAYDIALOG_H
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>PeaksViewerOptionsDialog</class>
<widget class="QDialog" name="PeaksViewerOptionsDialog">
<class>PeaksViewerOverlayDialog</class>
<widget class="QDialog" name="PeaksViewerOverlayDialog">
<property name="geometry">
<rect>
<x>0</x>
......@@ -298,7 +298,7 @@
<connection>
<sender>btnGroupControls</sender>
<signal>accepted()</signal>
<receiver>PeaksViewerOptionsDialog</receiver>
<receiver>PeaksViewerOverlayDialog</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
......@@ -314,7 +314,7 @@
<connection>
<sender>btnGroupControls</sender>
<signal>rejected()</signal>
<receiver>PeaksViewerOptionsDialog</receiver>
<receiver>PeaksViewerOverlayDialog</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
......
#include <QDialogButtonBox>
#include <QUrl>
#include <QDesktopServices>
#include "MantidQtSliceViewer/PeaksViewerOptionsDialog.h"
#include "ui_PeaksViewerOptionsDialog.h"
#include "MantidQtSliceViewer/PeaksViewerOverlayDialog.h"
#include "ui_PeaksViewerOverlayDialog.h"
namespace MantidQt
{
......@@ -60,8 +60,8 @@ namespace MantidQt
* @param peaksPresenter : Peaks presenter to use
* @param parent : Parent widget
*/
PeaksViewerOptionsDialog::PeaksViewerOptionsDialog(PeaksPresenter_sptr peaksPresenter, QWidget *parent) :
QDialog(parent), ui(new Ui::PeaksViewerOptionsDialog), m_peaksPresenter(peaksPresenter)
PeaksViewerOverlayDialog::PeaksViewerOverlayDialog(PeaksPresenter_sptr peaksPresenter, QWidget *parent) :
QDialog(parent), ui(new Ui::PeaksViewerOverlayDialog), m_peaksPresenter(peaksPresenter)
{
ui->setupUi(this);
......@@ -82,7 +82,7 @@ namespace MantidQt
}
/// Destructor
PeaksViewerOptionsDialog::~PeaksViewerOptionsDialog()
PeaksViewerOverlayDialog::~PeaksViewerOverlayDialog()
{
delete ui;
}
......@@ -91,7 +91,7 @@ namespace MantidQt
* Handler for moving the slider associated with ON the current projection.
* @param value: New slider position
*/
void PeaksViewerOptionsDialog::onSliderOnProjectionMoved(int value)
void PeaksViewerOverlayDialog::onSliderOnProjectionMoved(int value)
{
auto newFractionOccupancy = calculateFraction(value);
m_peaksPresenter->setPeakSizeOnProjection(newFractionOccupancy);
......@@ -102,7 +102,7 @@ namespace MantidQt
* Handler for moving the slider associated with INTO the current projection.
* @param value: New slider position
*/
void PeaksViewerOptionsDialog::onSliderIntoProjectionMoved(int value)
void PeaksViewerOverlayDialog::onSliderIntoProjectionMoved(int value)
{
auto newFractionOccupancy = calculateFraction(value);
m_peaksPresenter->setPeakSizeIntoProjection(newFractionOccupancy);
......@@ -112,7 +112,7 @@ namespace MantidQt
/**
* Handler for the reset event.
*/
void PeaksViewerOptionsDialog::onReset()
void PeaksViewerOverlayDialog::onReset()
{
m_peaksPresenter->setPeakSizeOnProjection( m_originalOnProjectionFraction );
m_peaksPresenter->setPeakSizeIntoProjection( m_originalIntoProjectionFraction );
......@@ -126,7 +126,7 @@ namespace MantidQt
* Handler for the on-complete click event of the button group.
* @param button : Button clicked.
*/
void PeaksViewerOptionsDialog::onCompleteClicked(QAbstractButton* button)
void PeaksViewerOverlayDialog::onCompleteClicked(QAbstractButton* button)
{
QDialogButtonBox::ButtonRole role = ui->btnGroupControls->buttonRole(button);
if(role == QDialogButtonBox::RejectRole)
......@@ -139,7 +139,7 @@ namespace MantidQt
* Handler for the on-close event.
* @param event : Close event
*/
void PeaksViewerOptionsDialog::closeEvent(QCloseEvent *event)
void PeaksViewerOverlayDialog::closeEvent(QCloseEvent *event)
{
onReset();
QDialog::closeEvent(event);
......@@ -148,7 +148,7 @@ namespace MantidQt
/**
* Handler for the reject event.
*/
void PeaksViewerOptionsDialog::reject()
void PeaksViewerOverlayDialog::reject()
{
onReset();
QDialog::reject();
......@@ -157,7 +157,7 @@ namespace MantidQt
/**
* Handler for the help-clicked event.
*/
void PeaksViewerOptionsDialog::onHelp()
void PeaksViewerOverlayDialog::onHelp()
{
QString helpPage = "PeaksViewer#Preference_Options";
QDesktopServices::openUrl(QUrl(QString("http://www.mantidproject.org/") + helpPage));
......
......@@ -29,7 +29,7 @@
#include "MantidQtSliceViewer/PeakTransformQLab.h"
#include "MantidQtSliceViewer/FirstExperimentInfoQuery.h"
#include "MantidQtSliceViewer/PeakBoundingBox.h"
#include "MantidQtSliceViewer/PeaksViewerOptionsDialog.h"
#include "MantidQtSliceViewer/PeaksViewerOverlayDialog.h"
#include "MantidQtSliceViewer/PeakOverlayViewFactorySelector.h"
#include "MantidQtMantidWidgets/SelectWorkspacesDialog.h"
#include "qmainwindow.h"
......@@ -413,7 +413,7 @@ void SliceViewer::initMenus()
// --------------- Peaks Menu ----------------------------------------
m_menuPeaks = new QMenu("&Peak", this);
action = new QAction(QPixmap(), "&PeaksViewer Options", this);
action = new QAction(QPixmap(), "&Peaks Overlay Options", this);
connect(action, SIGNAL(triggered()), this, SLOT(onPeaksViewerOptions()));
m_menuPeaks->addAction(action);
m_menuPeaks->setEnabled(false);// Until a PeaksWorkspace is selected.
......@@ -2358,7 +2358,7 @@ void SliceViewer::resetView()
void SliceViewer::onPeaksViewerOptions()
{
PeaksViewerOptionsDialog dlg(this->m_peaksPresenter);
PeaksViewerOverlayDialog dlg(this->m_peaksPresenter);
dlg.exec();
}
......
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