Mantid
Loading...
Searching...
No Matches
Public Slots | Signals | Public Member Functions | Properties | Private Member Functions | 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. More...
 
void btnSaveClicked ()
 Slot called when the save button is clicked. More...
 
void changeAlgorithm ()
 Slot called when the algorithm selected changes. More...
 

Signals

void changedAlgorithm ()
 Signal emitted when the algorithm changes. More...
 

Public Member Functions

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

Properties

bool algoVisible
 
bool editorVisible
 
QString infoString
 

Private Member Functions

void loadSettings ()
 Load QSettings from .ini-type files. More...
 
void saveSettings ()
 Save settings for next time. More...
 

Private Attributes

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

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 23 of file ProcessingAlgoWidget.h.

Constructor & Destructor Documentation

◆ ProcessingAlgoWidget()

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

Default Constructor.

Constructor.

Definition at line 27 of file ProcessingAlgoWidget.cpp.

References btnLoadClicked(), btnSaveClicked(), changeAlgorithm(), loadSettings(), and ui.

◆ ~ProcessingAlgoWidget()

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

Destructor.

Definition at line 55 of file ProcessingAlgoWidget.cpp.

References saveSettings().

Member Function Documentation

◆ algoVisible() [1/2]

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

Definition at line 45 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 47 of file ProcessingAlgoWidget.h.

◆ btnLoadClicked

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

Slot called when the Load button is clicked.

Definition at line 103 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 81 of file ProcessingAlgoWidget.cpp.

References m_lastFile, and ui.

Referenced by ProcessingAlgoWidget().

◆ changeAlgorithm

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

Slot called when the algorithm selected changes.

Definition at line 120 of file ProcessingAlgoWidget.cpp.

References changedAlgorithm(), Mantid::Kernel::SingletonHolder< T >::Instance(), 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 40 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 42 of file ProcessingAlgoWidget.h.

◆ getAlgorithm()

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

Definition at line 65 of file ProcessingAlgoWidget.h.

◆ getScriptText()

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

Definition at line 158 of file ProcessingAlgoWidget.cpp.

References ui.

◆ getSelectedAlgorithm()

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

Definition at line 50 of file ProcessingAlgoWidget.h.

◆ infoString() [1/2]

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

Definition at line 35 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 37 of file ProcessingAlgoWidget.h.

◆ loadSettings()

void MantidQt::MantidWidgets::ProcessingAlgoWidget::loadSettings ( )
private

Load QSettings from .ini-type files.

Definition at line 63 of file ProcessingAlgoWidget.cpp.

References m_lastFile.

Referenced by ProcessingAlgoWidget().

◆ saveInput()

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

Save the inputs to algorithm history.

Definition at line 59 of file ProcessingAlgoWidget.cpp.

References ui.

◆ saveSettings()

void MantidQt::MantidWidgets::ProcessingAlgoWidget::saveSettings ( )
private

Save settings for next time.

Definition at line 72 of file ProcessingAlgoWidget.cpp.

References m_lastFile.

Referenced by ~ProcessingAlgoWidget().

◆ setInputHistory()

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

Sets the AlgorithmInputHistory object recording the algorithm properties.

Definition at line 60 of file ProcessingAlgoWidget.h.

◆ setScriptText()

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

Set the script editor text.

Definition at line 160 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 152 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 84 of file ProcessingAlgoWidget.h.

Referenced by changeAlgorithm().

◆ m_lastFile

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

Last saved file path.

Definition at line 87 of file ProcessingAlgoWidget.h.

Referenced by btnLoadClicked(), btnSaveClicked(), loadSettings(), and saveSettings().

◆ ui

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

Property Documentation

◆ algoVisible

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

Definition at line 23 of file ProcessingAlgoWidget.h.

◆ editorVisible

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

Definition at line 23 of file ProcessingAlgoWidget.h.

◆ infoString

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

Definition at line 23 of file ProcessingAlgoWidget.h.


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