Mantid
Loading...
Searching...
No Matches
MuonFitDataSelector.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
7#pragma once
8
9#include "DllOption.h"
14#include "ui_MuonFitDataSelector.h"
15
16namespace MantidQt {
17namespace MantidWidgets {
18
26 Q_OBJECT
27
28public:
30 explicit MuonFitDataSelector(QWidget *parent);
32 MuonFitDataSelector(QWidget *parent, int runNumber, const QString &instName);
33 //, size_t numPeriods, const QStringList &groups);
34 // --- MantidWidget methods ---
36 QVariant getUserInput() const override;
38 void setUserInput(const QVariant &value) override;
39 // --- IMuonFitDataSelector methods
41 QStringList getFilenames() const override;
43 double getStartTime() const override;
45 double getEndTime() const override;
47 QStringList getChosenGroups() const override;
49 void setGroupsSelected(const QStringList &groups) { m_chosenGroups = groups; };
50 void setPeriodsSelected(const QStringList &periods) { m_chosenPeriods = periods; };
52 QStringList getPeriodSelections() const override;
56 QString getInstrumentName() const override;
58 QString getRuns() const override;
60 QString getSimultaneousFitLabel() const override;
62 void setSimultaneousFitLabel(const QString &label) override;
64 int getDatasetIndex() const override;
66 void setDatasetNames(const QStringList &datasetNames) override;
68 QString getDatasetName() const override;
71
72public slots:
74 void setWorkspaceDetails(const QString &runNumbers, const QString &instName,
75 const std::optional<QString> &filePath) override;
77 void setStartTime(double start) override;
79 void setEndTime(double end) override;
81 void setStartTimeQuietly(double start) override;
83 void setEndTimeQuietly(double end) override;
87 void fitTypeChanged(bool state);
91signals:
100 void nameChanged(QString name);
101
102private:
112 Ui::MuonFitDataSelector m_ui;
113 double m_startX;
114 double m_endX;
115 QStringList m_chosenGroups;
116 QStringList m_chosenPeriods;
118
119private slots:
126};
127
128} // namespace MantidWidgets
129} // namespace MantidQt
std::string name
Definition Run.cpp:60
#define EXPORT_OPT_MANTIDQT_COMMON
Definition DllOption.h:15
double value
The value of the point.
Definition FitMW.cpp:51
std::map< DeltaEMode::Type, std::string > index
This is the base class all customised widgets that do not wish to be tied to a specific Mantid algori...
MuonFitDataSelector : Selects runs, groups, periods for fit.
void workspaceChanged()
Changed the workspace.
void setUpConnections()
Set up connections for signals/slots.
void setDatasetNames(const QStringList &datasetNames) override
Set names of datasets for selection.
void setEndTimeQuietly(double end) override
Set end time without sending a signal.
void unsetBusyState()
Set normal cursor and enable input.
void setEndTime(double end) override
Set end time for fit.
double getStartTime() const override
Get selected start time.
QString getDatasetName() const override
Get name of selected dataset.
MuonFitDataSelector(QWidget *parent, int runNumber, const QString &instName)
Constructor with more options.
void setStartTime(double start) override
Set start time for fit.
void setWorkspaceDetails(const QString &runNumbers, const QString &instName, const std::optional< QString > &filePath) override
Set starting run number, instrument and (optionally) file path.
QString getSimultaneousFitLabel() const override
Get label for simultaneous fit.
Ui::MuonFitDataSelector m_ui
Member - user interface.
void setPreviousDataset()
Change dataset to previous one.
QStringList getFilenames() const override
Get selected filenames.
void checkForMultiGroupPeriodSelection()
Called when group/period box selection changes.
void setBusyState()
Set busy cursor and disable input.
QStringList getChosenGroups() const override
Get names of chosen groups.
void fitTypeChanged(bool state)
Called when fit type changed.
void setFitType(IMuonFitDataSelector::FitType type)
Set type for fit.
void setUserInput(const QVariant &value) override
Set user input through a common interface.
void setNextDataset()
Change dataset to next one.
void setGroupsSelected(const QStringList &groups)
Set chosen group/period.
MuonFitDataSelector(QWidget *parent)
Basic constructor.
void setPeriodsSelected(const QStringList &periods)
void simulLabelChanged()
Simultaneous fit label changed.
QString getRuns() const override
Get selected run numbers.
void datasetIndexChanged(int index)
Dataset index changed.
QStringList getPeriodSelections() const override
Get selected periods.
bool askUserWhetherToOverwrite() override
Ask user whether to overwrite label or not.
void setSimultaneousFitLabel(const QString &label) override
Set label for simultaneous fit.
QString getInstrumentName() const override
Get instrument name.
void setDefaultValues()
Set default values in some input controls.
double getEndTime() const override
Get selected end time.
void setStartTimeQuietly(double start) override
Set start time without sending a signal.
void dataPropertiesChanged()
Edited the start or end fields.
void userChangedRuns()
Called when user changes runs.
int getDatasetIndex() const override
Get index of selected dataset.
QVariant getUserInput() const override
Get user input through a common interface.
IMuonFitDataSelector::FitType getFitType() const override
Get type of fit.
The AlgorithmProgressDialogPresenter keeps track of the running algorithms and displays a progress ba...