Mantid
Loading...
Searching...
No Matches
Public Slots | Signals | Public Member Functions | Properties | Private Attributes | List of all members
MantidQt::MantidWidgets::ProcessingAlgoWidget Class Reference

A widget containing an algorithm selector and algorithm properties list, or a script editor window. More...

#include <ProcessingAlgoWidget.h>

Inheritance diagram for MantidQt::MantidWidgets::ProcessingAlgoWidget:

Public Slots

void btnLoadClicked ()
 Slot called when the Load button is clicked.
 
void btnSaveClicked ()
 Slot called when the save button is clicked.
 
void changeAlgorithm ()
 Slot called when the algorithm selected changes.
 

Signals

void changedAlgorithm ()
 Signal emitted when the algorithm changes.
 

Public Member Functions

bool algoVisible ()
 
void algoVisible (bool vis)
 Sets whether the algorithm stuff is visible.
 
ProcessingAlgoWidgetSettings captureSettings () const
 Capture current widget state without persistent access.
 
bool editorVisible ()
 
void editorVisible (bool vis)
 Sets whether the script editor is visible.
 
Mantid::API::Algorithm_sptr getAlgorithm ()
 
QString getScriptText ()
 
QString getSelectedAlgorithm ()
 
QString infoString ()
 
void infoString (const QString &text)
 Sets the info string displayed at the top.
 
 ProcessingAlgoWidget (QWidget *parent=nullptr)
 Default Constructor.
 
void restoreSettings (const ProcessingAlgoWidgetSettings &settings)
 Apply an immutable settings snapshot without persistent access.
 
void saveInput ()
 Save the inputs to algorithm history.
 
void setInputHistory (MantidQt::API::AbstractAlgorithmInputHistory *inputHistory)
 Sets the AlgorithmInputHistory object recording the algorithm properties.
 
void setScriptText (const QString &text)
 Set the script editor text.
 
void setSelectedAlgorithm (QString algo)
 Set the name of the selected algorithm.
 
 ~ProcessingAlgoWidget () override
 Destructor.
 

Properties

bool algoVisible
 
bool editorVisible
 
QString infoString
 

Private Attributes

Mantid::API::Algorithm_sptr m_alg
 Current algorithm with properties set.
 
QString m_lastFile
 Last saved file path.
 
Ui::ProcessingAlgoWidget ui
 The form generated by Qt Designer.
 

Detailed Description

A widget containing an algorithm selector and algorithm properties list, or a script editor window.

Allows the user to pick a processing step, either as a python script or an algorithm.

For use initially in the StartLiveDataDialog.

Definition at line 42 of file ProcessingAlgoWidget.h.

Constructor & Destructor Documentation

◆ ProcessingAlgoWidget()

MantidQt::MantidWidgets::ProcessingAlgoWidget::ProcessingAlgoWidget ( QWidget *  parent = nullptr)

◆ ~ProcessingAlgoWidget()

MantidQt::MantidWidgets::ProcessingAlgoWidget::~ProcessingAlgoWidget ( )
override

Member Function Documentation

◆ algoVisible() [1/2]

bool MantidQt::MantidWidgets::ProcessingAlgoWidget::algoVisible ( )
inline
Returns
true if the algorithm stuff is visible

Definition at line 64 of file ProcessingAlgoWidget.h.

◆ algoVisible() [2/2]

void MantidQt::MantidWidgets::ProcessingAlgoWidget::algoVisible ( bool  vis)
inline

Sets whether the algorithm stuff is visible.

Definition at line 66 of file ProcessingAlgoWidget.h.

◆ btnLoadClicked

void MantidQt::MantidWidgets::ProcessingAlgoWidget::btnLoadClicked ( )
slot

Slot called when the Load button is clicked.

Definition at line 116 of file ProcessingAlgoWidget.cpp.

References m_lastFile, and ui.

Referenced by ProcessingAlgoWidget().

◆ btnSaveClicked

void MantidQt::MantidWidgets::ProcessingAlgoWidget::btnSaveClicked ( )
slot

Slot called when the save button is clicked.

Definition at line 94 of file ProcessingAlgoWidget.cpp.

References m_lastFile, and ui.

Referenced by ProcessingAlgoWidget().

◆ captureSettings()

ProcessingAlgoWidgetSettings MantidQt::MantidWidgets::ProcessingAlgoWidget::captureSettings ( ) const

Capture current widget state without persistent access.

Definition at line 88 of file ProcessingAlgoWidget.cpp.

References m_lastFile.

Referenced by ~ProcessingAlgoWidget().

◆ changeAlgorithm

void MantidQt::MantidWidgets::ProcessingAlgoWidget::changeAlgorithm ( )
slot

Slot called when the algorithm selected changes.

Definition at line 133 of file ProcessingAlgoWidget.cpp.

References changedAlgorithm(), m_alg, and ui.

Referenced by ProcessingAlgoWidget(), and setSelectedAlgorithm().

◆ changedAlgorithm

void MantidQt::MantidWidgets::ProcessingAlgoWidget::changedAlgorithm ( )
signal

Signal emitted when the algorithm changes.

Referenced by changeAlgorithm().

◆ editorVisible() [1/2]

bool MantidQt::MantidWidgets::ProcessingAlgoWidget::editorVisible ( )
inline
Returns
true if the script editor is visible

Definition at line 59 of file ProcessingAlgoWidget.h.

◆ editorVisible() [2/2]

void MantidQt::MantidWidgets::ProcessingAlgoWidget::editorVisible ( bool  vis)
inline

Sets whether the script editor is visible.

Definition at line 61 of file ProcessingAlgoWidget.h.

◆ getAlgorithm()

Mantid::API::Algorithm_sptr MantidQt::MantidWidgets::ProcessingAlgoWidget::getAlgorithm ( )
inline
Returns
the last selected algorithm

Definition at line 84 of file ProcessingAlgoWidget.h.

References m_alg.

◆ getScriptText()

QString MantidQt::MantidWidgets::ProcessingAlgoWidget::getScriptText ( )
Returns
the text in the script editor

Definition at line 171 of file ProcessingAlgoWidget.cpp.

References ui.

◆ getSelectedAlgorithm()

QString MantidQt::MantidWidgets::ProcessingAlgoWidget::getSelectedAlgorithm ( )
inline
Returns
the name of the selected algorithm

Definition at line 69 of file ProcessingAlgoWidget.h.

◆ infoString() [1/2]

QString MantidQt::MantidWidgets::ProcessingAlgoWidget::infoString ( )
inline
Returns
the info string displayed at the top

Definition at line 54 of file ProcessingAlgoWidget.h.

◆ infoString() [2/2]

void MantidQt::MantidWidgets::ProcessingAlgoWidget::infoString ( const QString &  text)
inline

Sets the info string displayed at the top.

Definition at line 56 of file ProcessingAlgoWidget.h.

◆ restoreSettings()

void MantidQt::MantidWidgets::ProcessingAlgoWidget::restoreSettings ( const ProcessingAlgoWidgetSettings &  settings)

Apply an immutable settings snapshot without persistent access.

Definition at line 84 of file ProcessingAlgoWidget.cpp.

References MantidQt::MantidWidgets::ProcessingAlgoWidgetSettings::lastFile(), and m_lastFile.

Referenced by ProcessingAlgoWidget().

◆ saveInput()

void MantidQt::MantidWidgets::ProcessingAlgoWidget::saveInput ( )

Save the inputs to algorithm history.

Definition at line 81 of file ProcessingAlgoWidget.cpp.

References ui.

◆ setInputHistory()

void MantidQt::MantidWidgets::ProcessingAlgoWidget::setInputHistory ( MantidQt::API::AbstractAlgorithmInputHistory *  inputHistory)
inline

Sets the AlgorithmInputHistory object recording the algorithm properties.

Definition at line 79 of file ProcessingAlgoWidget.h.

◆ setScriptText()

void MantidQt::MantidWidgets::ProcessingAlgoWidget::setScriptText ( const QString &  text)

Set the script editor text.

Definition at line 173 of file ProcessingAlgoWidget.cpp.

References ui.

◆ setSelectedAlgorithm()

void MantidQt::MantidWidgets::ProcessingAlgoWidget::setSelectedAlgorithm ( QString  algo)

Set the name of the selected algorithm.

Updates the GUI.

Parameters
algo:: name of the algorithm

Definition at line 165 of file ProcessingAlgoWidget.cpp.

References changeAlgorithm(), and ui.

Member Data Documentation

◆ m_alg

Mantid::API::Algorithm_sptr MantidQt::MantidWidgets::ProcessingAlgoWidget::m_alg
private

Current algorithm with properties set.

Definition at line 105 of file ProcessingAlgoWidget.h.

Referenced by changeAlgorithm().

◆ m_lastFile

QString MantidQt::MantidWidgets::ProcessingAlgoWidget::m_lastFile
private

Last saved file path.

Definition at line 108 of file ProcessingAlgoWidget.h.

Referenced by btnLoadClicked(), btnSaveClicked(), captureSettings(), and restoreSettings().

◆ ui

Ui::ProcessingAlgoWidget MantidQt::MantidWidgets::ProcessingAlgoWidget::ui
private

Property Documentation

◆ algoVisible

bool MantidQt::MantidWidgets::ProcessingAlgoWidget::algoVisible
readwrite

Definition at line 46 of file ProcessingAlgoWidget.h.

◆ editorVisible

bool MantidQt::MantidWidgets::ProcessingAlgoWidget::editorVisible
readwrite

Definition at line 45 of file ProcessingAlgoWidget.h.

◆ infoString

QString MantidQt::MantidWidgets::ProcessingAlgoWidget::infoString
readwrite

Definition at line 44 of file ProcessingAlgoWidget.h.


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