Mantid
Loading...
Searching...
No Matches
Public Slots | Public Member Functions | Private Slots | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
MantidQt::CustomDialogs::StartLiveDataDialog Class Reference

#include <StartLiveDataDialog.h>

Inheritance diagram for MantidQt::CustomDialogs::StartLiveDataDialog:
MantidQt::API::AlgorithmDialog Mantid::API::AlgorithmObserver

Public Slots

void changePostProcessingAlgorithm ()
 Slot called when picking a different algorithm in the AlgorithmSelectorWidget. More...
 
void changeProcessingAlgorithm ()
 Slot called when picking a different algorithm in the AlgorithmSelectorWidget. More...
 
void chkPreserveEventsToggled ()
 Slot called when the preserve events checkbox changes. More...
 
void radioPostProcessClicked ()
 Slot called when one of the radio buttons in "processing" are picked. More...
 
void radioProcessClicked ()
 Slot called when one of the radio buttons in "processing" are picked. More...
 
void radioTimeClicked ()
 Slot called when one of the radio buttons in "starting time" are picked. More...
 

Public Member Functions

 StartLiveDataDialog (QWidget *parent=nullptr)
 Default Constructor. More...
 
 ~StartLiveDataDialog () override
 Destructor. More...
 
- Public Member Functions inherited from MantidQt::API::AlgorithmDialog
 AlgorithmDialog (QWidget *parent=nullptr)
 DefaultConstructor. More...
 
void initializeLayout ()
 Create the layout of the widget. Can only be called once. More...
 
bool isInitialized () const
 Is this dialog initialized. More...
 
bool isShowKeepOpen () const
 Set if the keep open option is shown. More...
 
void setShowKeepOpen (const bool showOption)
 Set if the keep open option is shown. More...
 
 ~AlgorithmDialog () override
 Destructor. More...
 
void setAlgorithm (const Mantid::API::IAlgorithm_sptr &)
 The following methods were made public for testing in GenericDialogDemo.cpp. More...
 
void setPresetValues (const QHash< QString, QString > &presetValues)
 Set a list of suggested values. More...
 
void isForScript (bool forScript)
 Set whether this is intended for use from a script or not. More...
 
void executeOnAccept (bool on)
 If true then execute the algorithm on acceptance. More...
 
void setOptionalMessage (const QString &message)
 Set an optional message to be displayed at the top of the dialog. More...
 
void addEnabledAndDisableLists (const QStringList &enabled, const QStringList &disabled)
 Set comma-separated-list of enabled parameter names. More...
 
void addAlgorithmObserver (Mantid::API::AlgorithmObserver *observer)
 Add an AlgorithmObserver to the algorithm. More...
 

Private Slots

void accept () override
 
void initListenerPropLayout ()
 Update the Listener Properties group box for the current LiveListener. More...
 
void setDefaultAccumulationMethod (const QString &)
 Slot called when picking a different instrument. More...
 
void updateConnectionChoices (const QString &inst_name)
 Slot to update list of available connections when instrument is changed. More...
 
void updateConnectionDetails (const QString &connection)
 Slot to update connection parameters when connection selected. More...
 
void updateUiElements (const QString &)
 Another slot called when picking a different instrument. More...
 

Private Member Functions

Mantid::API::Algorithm_sptr changeAlgorithm (MantidQt::MantidWidgets::AlgorithmSelectorWidget *selector, MantidQt::API::AlgorithmPropertiesWidget *propWidget)
 
void initLayout () override
 Initialize the layout. More...
 
void parseInput () override
 Parse the input from the dialog when it has been accepted. More...
 

Private Attributes

Mantid::API::Algorithm_sptr m_postProcessingAlg
 The algorithm for processing the accumulated workspace. More...
 
Mantid::API::Algorithm_sptr m_processingAlg
 The algorithm for processing chunks. More...
 
API::WidgetScrollbarDecorator m_scrollbars
 This dialog needs scrollbars on small screens. More...
 
bool m_usePostProcessAlgo
 
bool m_usePostProcessScript
 
bool m_useProcessAlgo
 
bool m_useProcessScript
 
Ui::StartLiveDataDialog ui
 The form generated by Qt Designer. More...
 

Static Private Attributes

static const QString CUSTOM_CONNECTION = "[Custom]"
 Constant used for custom listener connection setups. More...
 

Additional Inherited Members

- Signals inherited from MantidQt::API::AlgorithmDialog
void algCompletedSignal ()
 Emitted when alg completes and dialog is staying open. More...
 
void closeEventCalled ()
 
- Protected Slots inherited from MantidQt::API::AlgorithmDialog
void accept () override
 A default slot that can be used for an OK button. More...
 
void reject () override
 A default slot that can be used for a rejected button. More...
 
virtual void helpClicked ()
 Help button clicked;. More...
 
virtual void keepOpenChanged (int state)
 Keep open checkbox clicked;. More...
 
virtual void algorithmCompleted ()
 Keep the running algorithm has completed. More...
 
virtual void executeAlgorithmAsync ()
 Executes the algorithm in a separate thread. More...
 
virtual void removeAlgorithmFromManager ()
 Removes the algorithm from the manager. More...
 
void enableExitButton ()
 Enable to exit button. More...
 
- Protected Member Functions inherited from MantidQt::API::AlgorithmDialog
virtual void saveInput ()
 Save the input history of an accepted dialog. More...
 
const QString & getOptionalMessage () const
 Get the message string. More...
 
void addOptionalMessage (QVBoxLayout *mainLay)
 Add the optional message to the given layout. More...
 
bool isForScript () const
 Get the usage boolean value. More...
 
bool isMessageAvailable () const
 Is there a message string available. More...
 
bool isWidgetEnabled (const QString &propName) const
 Check is a given property should have its control enabled or not. More...
 
Mantid::API::IAlgorithm_sptr getAlgorithm () const
 Get the algorithm pointer. More...
 
Mantid::Kernel::PropertygetAlgorithmProperty (const QString &propName) const
 Get a pointer to the named property. More...
 
bool requiresUserInput (const QString &propName) const
 Return a true if the given property requires user input. More...
 
QString getInputValue (const QString &propName) const
 Get an input value from the form, dealing with blank inputs etc. More...
 
QLabel * getValidatorMarker (const QString &propname)
 Get a property validator label. More...
 
void storePropertyValue (const QString &name, const QString &value)
 Adds a property (name,value) pair to the stored map. More...
 
void removePropertyValue (const QString &name)
 Removes a property (name, value) pair from the stored map. More...
 
bool setPropertyValues (const QStringList &skipList=QStringList())
 Set properties on this algorithm by pulling values from the tied widgets. More...
 
bool setPropertyValue (const QString &pName, bool validateOthers)
 Sets the value of a single property, using the value previously stored using storePropertyValue() More...
 
void showValidators ()
 Show the validators for all the properties. More...
 
QWidget * tie (QWidget *widget, const QString &property, QLayout *parent_layout=nullptr, bool readHistory=true)
 Tie a widget to a property. More...
 
void untie (const QString &property)
 Untie a widget to a property. More...
 
QString openFileDialog (const QString &propName)
 Open a file dialog to select a file. More...
 
QStringList openMultipleFileDialog (const QString &propName)
 Open a file dialog to select many file. More...
 
void fillAndSetComboBox (const QString &propName, QComboBox *optionsBox) const
 Fill a combo box for the named algorithm's allowed values. More...
 
void fillLineEdit (const QString &propName, QLineEdit *field)
 Fill in the necessary input for a text field. More...
 
QLayout * createDefaultButtonLayout (const QString &helpText=QString("?"), const QString &loadText=QString("Run"), const QString &cancelText=QString("Close"), const QString &keepOpenText=QString("Keep Open"))
 Create a row layout of buttons with specified text. More...
 
QPushButton * createHelpButton (const QString &helpText=QString("?")) const
 Create a help button for this algorithm. More...
 
void flagInputWS (QWidget *inputWidget)
 Flag an input workspace combobox with its property name. More...
 
QString getValue (QWidget *widget)
 Retrieve a text value for a property from a widget. More...
 
void parse ()
 Parse out the input from the dialog. More...
 
bool requestedToKeepEnabled (const QString &propName) const
 Test if the given name's widget has been explicity asked to be enabled. More...
 
QString getPreviousValue (const QString &propName) const
 Get the property value from either the previous input store or from Python argument. More...
 
void setPreviousValue (QWidget *widget, const QString &property)
 Set a value based on any old input that we have. More...
 
void finishHandle (const Mantid::API::IAlgorithm *alg) override
 Handle completion of algorithm started while staying open. More...
 
void errorHandle (const Mantid::API::IAlgorithm *alg, const std::string &what) override
 Handle completion of algorithm started while staying open. More...
 
void closeEvent (QCloseEvent *evt) override
 Only allow close when close is enabled. More...
 
- Protected Attributes inherited from MantidQt::API::AlgorithmDialog
Mantid::API::IAlgorithm_sptr m_algorithm
 The algorithm associated with this dialog. More...
 
QString m_algName
 The name of the algorithm. More...
 
QStringList m_algProperties
 The properties associated with this dialog. More...
 
QHash< QString, QString > m_propertyValueMap
 A map of property <name, value> pairs that have been taken from the dialog. More...
 
QHash< QString, QWidget * > m_tied_properties
 A list pointers to the widget for each property. More...
 
bool m_forScript
 A boolean indicating whether this is for a script or not. More...
 
QStringList m_python_arguments
 A list of property names that have been passed from Python. More...
 
QStringList m_enabled
 A list of property names that should have their widgets enabled. More...
 
QStringList m_disabled
 A list of property names that the user has requested to be disabled (overrides those in enabled) More...
 
QString m_strMessage
 The message string to be displayed at the top of the widget; if it exists. More...
 
bool m_keepOpen
 Whether to keep the dialog box open after alg execution. More...
 
bool m_msgAvailable
 Is the message string empty or not. More...
 
bool m_isInitialized
 Whether the layout has been initialized. More...
 
bool m_autoParseOnInit
 Flag if the input should be parsed automatically on initialization. More...
 
QHash< QString, QLabel * > m_validators
 A list of labels to use as validation markers. More...
 
QHash< QString, QString > m_errors
 A map where key = property name; value = the error for this property (i.e. More...
 
QStringList m_noValidation
 A list of property names whose widgets handle their own validation. More...
 
QVector< QWidget * > m_inputws_opts
 Store a list of the names of input workspace boxes. More...
 
QVector< QLineEdit * > m_outputws_fields
 Store a list of output workspace text edits. More...
 
QHash< QPushButton *, int > m_wsbtn_tracker
 A map to keep track of replace workspace button presses. More...
 
QCheckBox * m_keepOpenCheckBox
 
QPushButton * m_okButton
 
QPushButton * m_exitButton
 
std::vector< Mantid::API::AlgorithmObserver * > m_observers
 A list of AlgorithmObservers to add to the algorithm prior to execution. More...
 
QTimer m_btnTimer
 Enable the close button when the timer fires. More...
 
bool m_statusTracked
 A flag to track whether the status of the algorithm is being tracked. More...
 

Detailed Description

Definition at line 21 of file StartLiveDataDialog.h.

Constructor & Destructor Documentation

◆ StartLiveDataDialog()

MantidQt::CustomDialogs::StartLiveDataDialog::StartLiveDataDialog ( QWidget *  parent = nullptr)

Default Constructor.

Constructor.

Definition at line 78 of file StartLiveDataDialog.cpp.

◆ ~StartLiveDataDialog()

MantidQt::CustomDialogs::StartLiveDataDialog::~StartLiveDataDialog ( )
override

Destructor.

Definition at line 86 of file StartLiveDataDialog.cpp.

Member Function Documentation

◆ accept

void MantidQt::CustomDialogs::StartLiveDataDialog::accept ( )
overrideprivateslot

◆ changeAlgorithm()

Mantid::API::Algorithm_sptr MantidQt::CustomDialogs::StartLiveDataDialog::changeAlgorithm ( MantidQt::MantidWidgets::AlgorithmSelectorWidget selector,
MantidQt::API::AlgorithmPropertiesWidget propWidget 
)
private

◆ changePostProcessingAlgorithm

void MantidQt::CustomDialogs::StartLiveDataDialog::changePostProcessingAlgorithm ( )
slot

Slot called when picking a different algorithm in the AlgorithmSelectorWidget.

Definition at line 310 of file StartLiveDataDialog.cpp.

References m_postProcessingAlg, and ui.

Referenced by initLayout().

◆ changeProcessingAlgorithm

void MantidQt::CustomDialogs::StartLiveDataDialog::changeProcessingAlgorithm ( )
slot

Slot called when picking a different algorithm in the AlgorithmSelectorWidget.

Definition at line 300 of file StartLiveDataDialog.cpp.

References m_processingAlg, and ui.

Referenced by initLayout().

◆ chkPreserveEventsToggled

void MantidQt::CustomDialogs::StartLiveDataDialog::chkPreserveEventsToggled ( )
slot

Slot called when the preserve events checkbox changes.

Definition at line 293 of file StartLiveDataDialog.cpp.

References ui.

Referenced by initLayout().

◆ initLayout()

void MantidQt::CustomDialogs::StartLiveDataDialog::initLayout ( )
overrideprivatevirtual

◆ initListenerPropLayout

void MantidQt::CustomDialogs::StartLiveDataDialog::initListenerPropLayout ( )
privateslot

Update the Listener Properties group box for the current LiveListener.

Definition at line 395 of file StartLiveDataDialog.cpp.

References MantidQt::API::AlgorithmDialog::m_algorithm, MantidQt::API::AlgorithmDialog::m_algProperties, MantidQt::API::AlgorithmDialog::tie(), and ui.

Referenced by initLayout().

◆ parseInput()

void MantidQt::CustomDialogs::StartLiveDataDialog::parseInput ( )
overrideprivatevirtual

Parse the input from the dialog when it has been accepted.

Parse input when the dialog is accepted.

Reimplemented from MantidQt::API::AlgorithmDialog.

Definition at line 225 of file StartLiveDataDialog.cpp.

References m_postProcessingAlg, m_processingAlg, m_usePostProcessAlgo, m_usePostProcessScript, m_useProcessAlgo, m_useProcessScript, MantidQt::API::AlgorithmDialog::storePropertyValue(), and ui.

◆ radioPostProcessClicked

void MantidQt::CustomDialogs::StartLiveDataDialog::radioPostProcessClicked ( )
slot

Slot called when one of the radio buttons in "processing" are picked.

Definition at line 278 of file StartLiveDataDialog.cpp.

References m_usePostProcessAlgo, m_usePostProcessScript, and ui.

Referenced by initLayout().

◆ radioProcessClicked

void MantidQt::CustomDialogs::StartLiveDataDialog::radioProcessClicked ( )
slot

Slot called when one of the radio buttons in "processing" are picked.

Definition at line 269 of file StartLiveDataDialog.cpp.

References m_useProcessAlgo, m_useProcessScript, and ui.

Referenced by initLayout().

◆ radioTimeClicked

void MantidQt::CustomDialogs::StartLiveDataDialog::radioTimeClicked ( )
slot

Slot called when one of the radio buttons in "starting time" are picked.

Definition at line 290 of file StartLiveDataDialog.cpp.

References ui.

Referenced by initLayout().

◆ setDefaultAccumulationMethod

void MantidQt::CustomDialogs::StartLiveDataDialog::setDefaultAccumulationMethod ( const QString &  listener)
privateslot

Slot called when picking a different instrument.

Disables the 'Add' option if the listener is going to pass back histograms.

Parameters
listener:: The listener class name.

Definition at line 322 of file StartLiveDataDialog.cpp.

References Mantid::Kernel::SingletonHolder< T >::Instance(), and ui.

Referenced by initLayout().

◆ updateConnectionChoices

void MantidQt::CustomDialogs::StartLiveDataDialog::updateConnectionChoices ( const QString &  inst_name)
privateslot

Slot to update list of available connections when instrument is changed.

Parameters
inst_nameName of selected instrument

Definition at line 451 of file StartLiveDataDialog.cpp.

References CUSTOM_CONNECTION, index, and ui.

Referenced by initLayout().

◆ updateConnectionDetails

void MantidQt::CustomDialogs::StartLiveDataDialog::updateConnectionDetails ( const QString &  connection)
privateslot

Slot to update connection parameters when connection selected.

Parameters
connectionName of selected live listener connection

Definition at line 477 of file StartLiveDataDialog.cpp.

References CUSTOM_CONNECTION, index, and ui.

Referenced by initLayout().

◆ updateUiElements

void MantidQt::CustomDialogs::StartLiveDataDialog::updateUiElements ( const QString &  inst)
privateslot

Another slot called when picking a different instrument.

Disables UI elements that are not used by the instrument Currently, only TOPAZ listener uses this (and only for the "Starting Time" group.

Parameters
inst:: The instrument name.

Definition at line 359 of file StartLiveDataDialog.cpp.

References ui.

Referenced by initLayout().

Member Data Documentation

◆ CUSTOM_CONNECTION

const QString MantidQt::CustomDialogs::StartLiveDataDialog::CUSTOM_CONNECTION = "[Custom]"
staticprivate

Constant used for custom listener connection setups.

Definition at line 74 of file StartLiveDataDialog.h.

Referenced by updateConnectionChoices(), and updateConnectionDetails().

◆ m_postProcessingAlg

Mantid::API::Algorithm_sptr MantidQt::CustomDialogs::StartLiveDataDialog::m_postProcessingAlg
private

The algorithm for processing the accumulated workspace.

Definition at line 71 of file StartLiveDataDialog.h.

Referenced by changePostProcessingAlgorithm(), and parseInput().

◆ m_processingAlg

Mantid::API::Algorithm_sptr MantidQt::CustomDialogs::StartLiveDataDialog::m_processingAlg
private

The algorithm for processing chunks.

Definition at line 68 of file StartLiveDataDialog.h.

Referenced by changeProcessingAlgorithm(), and parseInput().

◆ m_scrollbars

API::WidgetScrollbarDecorator MantidQt::CustomDialogs::StartLiveDataDialog::m_scrollbars
private

This dialog needs scrollbars on small screens.

Definition at line 60 of file StartLiveDataDialog.h.

Referenced by initLayout().

◆ m_usePostProcessAlgo

bool MantidQt::CustomDialogs::StartLiveDataDialog::m_usePostProcessAlgo
private

Definition at line 64 of file StartLiveDataDialog.h.

Referenced by parseInput(), and radioPostProcessClicked().

◆ m_usePostProcessScript

bool MantidQt::CustomDialogs::StartLiveDataDialog::m_usePostProcessScript
private

Definition at line 65 of file StartLiveDataDialog.h.

Referenced by parseInput(), and radioPostProcessClicked().

◆ m_useProcessAlgo

bool MantidQt::CustomDialogs::StartLiveDataDialog::m_useProcessAlgo
private

Definition at line 62 of file StartLiveDataDialog.h.

Referenced by parseInput(), and radioProcessClicked().

◆ m_useProcessScript

bool MantidQt::CustomDialogs::StartLiveDataDialog::m_useProcessScript
private

Definition at line 63 of file StartLiveDataDialog.h.

Referenced by parseInput(), and radioProcessClicked().

◆ ui

Ui::StartLiveDataDialog MantidQt::CustomDialogs::StartLiveDataDialog::ui
private

The documentation for this class was generated from the following files: