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

A widget consisting of a ComboBox and a TreeWidget to allow a user to select an algorithm either by category or by typing. More...

#include <AlgorithmSelectorWidget.h>

Inheritance diagram for MantidQt::MantidWidgets::AlgorithmSelectorWidget:

Public Slots

void executeSelected ()
 Slot called to execute whatever is the selected algorithm. More...
 
void findAlgTextChanged (const QString &text)
 Show the selection in the tree when it changes in the combo. More...
 
void treeSelectionChanged ()
 Show the selection in the combo when it changes in the tree. More...
 
void update ()
 Update the lists of algorithms. More...
 

Signals

void algorithmFactoryUpdateReceived ()
 
void algorithmSelectionChanged (const QString &, int)
 
void executeAlgorithm (const QString &, int)
 

Public Member Functions

 AlgorithmSelectorWidget (QWidget *parent)
 Constructor. More...
 
SelectedAlgorithm getSelectedAlgorithm ()
 Return the selected algorithm. More...
 
void setSelectedAlgorithm (QString &algName)
 Set which algorithm is currently selected. More...
 
bool showExecuteButton () const
 Is the the execute button visible. More...
 
void showExecuteButton (const bool)
 Show/hide the execute button. More...
 
 ~AlgorithmSelectorWidget () override
 Destructor. More...
 

Protected Attributes

QPushButton * m_execButton
 
FindAlgComboBoxm_findAlg
 
AlgorithmTreeWidgetm_tree
 

Properties

bool showExecuteButton
 

Private Member Functions

void handleAlgorithmFactoryUpdate (Mantid::API::AlgorithmFactoryUpdateNotification_ptr)
 Callback for AlgorithmFactory update notifications. More...
 

Private Attributes

bool m_updateInProgress
 
Poco::NObserver< AlgorithmSelectorWidget, Mantid::API::AlgorithmFactoryUpdateNotificationm_updateObserver
 Observes algorithm factory update notifications. More...
 

Detailed Description

A widget consisting of a ComboBox and a TreeWidget to allow a user to select an algorithm either by category or by typing.

Date
2012-03-06

Definition at line 57 of file AlgorithmSelectorWidget.h.

Constructor & Destructor Documentation

◆ AlgorithmSelectorWidget()

MantidQt::MantidWidgets::AlgorithmSelectorWidget::AlgorithmSelectorWidget ( QWidget *  parent)

◆ ~AlgorithmSelectorWidget()

MantidQt::MantidWidgets::AlgorithmSelectorWidget::~AlgorithmSelectorWidget ( )
override

Destructor.

Definition at line 74 of file AlgorithmSelectorWidget.cpp.

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

Member Function Documentation

◆ algorithmFactoryUpdateReceived

void MantidQt::MantidWidgets::AlgorithmSelectorWidget::algorithmFactoryUpdateReceived ( )
signal

◆ algorithmSelectionChanged

void MantidQt::MantidWidgets::AlgorithmSelectorWidget::algorithmSelectionChanged ( const QString &  ,
int   
)
signal

◆ executeAlgorithm

void MantidQt::MantidWidgets::AlgorithmSelectorWidget::executeAlgorithm ( const QString &  ,
int   
)
signal

◆ executeSelected

void MantidQt::MantidWidgets::AlgorithmSelectorWidget::executeSelected ( )
slot

Slot called to execute whatever is the selected algorithm.

Definition at line 96 of file AlgorithmSelectorWidget.cpp.

References executeAlgorithm(), and getSelectedAlgorithm().

Referenced by AlgorithmSelectorWidget().

◆ findAlgTextChanged

void MantidQt::MantidWidgets::AlgorithmSelectorWidget::findAlgTextChanged ( const QString &  text)
slot

Show the selection in the tree when it changes in the combo.

Definition at line 105 of file AlgorithmSelectorWidget.cpp.

References algorithmSelectionChanged(), getSelectedAlgorithm(), m_findAlg, and m_tree.

Referenced by AlgorithmSelectorWidget().

◆ getSelectedAlgorithm()

SelectedAlgorithm MantidQt::MantidWidgets::AlgorithmSelectorWidget::getSelectedAlgorithm ( )

Return the selected algorithm.

The tree has priority. If nothing is selected in the tree, return the ComboBox selection

Definition at line 135 of file AlgorithmSelectorWidget.cpp.

References MantidQt::MantidWidgets::AlgorithmTreeWidget::getSelectedAlgorithm(), MantidQt::MantidWidgets::FindAlgComboBox::getSelectedAlgorithm(), m_findAlg, m_tree, and MantidQt::MantidWidgets::SelectedAlgorithm::name.

Referenced by executeSelected(), findAlgTextChanged(), and treeSelectionChanged().

◆ handleAlgorithmFactoryUpdate()

void MantidQt::MantidWidgets::AlgorithmSelectorWidget::handleAlgorithmFactoryUpdate ( Mantid::API::AlgorithmFactoryUpdateNotification_ptr  )
private

Callback for AlgorithmFactory update notifications.

The algorithm factory has been updated, refresh the widget.

Definition at line 162 of file AlgorithmSelectorWidget.cpp.

References algorithmFactoryUpdateReceived().

◆ setSelectedAlgorithm()

void MantidQt::MantidWidgets::AlgorithmSelectorWidget::setSelectedAlgorithm ( QString &  algName)

Set which algorithm is currently selected.

Does not fire any signals. Updates the combobox, deselects in the tree.

Parameters
algName:: name of the algorithm

Definition at line 148 of file AlgorithmSelectorWidget.cpp.

References m_findAlg, and m_tree.

◆ showExecuteButton() [1/2]

bool MantidQt::MantidWidgets::AlgorithmSelectorWidget::showExecuteButton ( ) const

Is the the execute button visible.

Definition at line 79 of file AlgorithmSelectorWidget.cpp.

References m_execButton.

◆ showExecuteButton() [2/2]

void MantidQt::MantidWidgets::AlgorithmSelectorWidget::showExecuteButton ( const bool  val)

Show/hide the execute button.

Definition at line 82 of file AlgorithmSelectorWidget.cpp.

References m_execButton.

◆ treeSelectionChanged

void MantidQt::MantidWidgets::AlgorithmSelectorWidget::treeSelectionChanged ( )
slot

Show the selection in the combo when it changes in the tree.

Definition at line 121 of file AlgorithmSelectorWidget.cpp.

References algorithmSelectionChanged(), getSelectedAlgorithm(), and m_findAlg.

Referenced by AlgorithmSelectorWidget().

◆ update

void MantidQt::MantidWidgets::AlgorithmSelectorWidget::update ( )
slot

Member Data Documentation

◆ m_execButton

QPushButton* MantidQt::MantidWidgets::AlgorithmSelectorWidget::m_execButton
protected

Definition at line 83 of file AlgorithmSelectorWidget.h.

Referenced by AlgorithmSelectorWidget(), and showExecuteButton().

◆ m_findAlg

FindAlgComboBox* MantidQt::MantidWidgets::AlgorithmSelectorWidget::m_findAlg
protected

◆ m_tree

AlgorithmTreeWidget* MantidQt::MantidWidgets::AlgorithmSelectorWidget::m_tree
protected

◆ m_updateInProgress

bool MantidQt::MantidWidgets::AlgorithmSelectorWidget::m_updateInProgress
private

Definition at line 91 of file AlgorithmSelectorWidget.h.

Referenced by update().

◆ m_updateObserver

Poco::NObserver<AlgorithmSelectorWidget, Mantid::API::AlgorithmFactoryUpdateNotification> MantidQt::MantidWidgets::AlgorithmSelectorWidget::m_updateObserver
private

Observes algorithm factory update notifications.

Definition at line 89 of file AlgorithmSelectorWidget.h.

Referenced by AlgorithmSelectorWidget(), and ~AlgorithmSelectorWidget().

Property Documentation

◆ showExecuteButton

bool MantidQt::MantidWidgets::AlgorithmSelectorWidget::showExecuteButton
readwrite

Definition at line 47 of file AlgorithmSelectorWidget.h.


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