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

A dialog for selecting a workspace from the ADS. More...

#include <AddWorkspaceDialog.h>

Inheritance diagram for MantidQt::MantidWidgets::AddWorkspaceDialog:

Public Slots

void handleCancelClicked ()
 
void handleOKClicked ()
 

Signals

void closeDialog ()
 
void okClicked (bool close)
 

Public Member Functions

 AddWorkspaceDialog (QWidget *parent=nullptr)
 Constructor. More...
 
std::vector< Mantid::API::MatrixWorkspace_const_sptrgetWorkspaces () const
 
QLineEdit * workspaceIndiceLineEdit () const
 
std::vector< int > workspaceIndices () const
 
QString workspaceName () const
 
QComboBox * workspaceNameComboBox () const
 Testing accessors. More...
 

Private Slots

void selectAllSpectra (int state)
 Slot. More...
 
void workspaceNameChanged (const QString &)
 Slot. More...
 

Private Member Functions

void addWorkspacesFromGroup (std::vector< Mantid::API::MatrixWorkspace_const_sptr > &workspaces, Mantid::API::WorkspaceGroup_const_sptr const &group) const
 
QStringList availableWorkspaces () const
 
void findCommonMaxIndex (const QString &wsName)
 

Private Attributes

int m_maxIndex
 Maximum index in the selected workspace. More...
 
Ui::AddWorkspaceDialog m_uiForm
 
QString m_workspaceName
 Name of the selected workspace. More...
 
std::vector< int > m_wsIndices
 Selected workspace index. More...
 

Detailed Description

A dialog for selecting a workspace from the ADS.

Definition at line 26 of file AddWorkspaceDialog.h.

Constructor & Destructor Documentation

◆ AddWorkspaceDialog()

MantidQt::MantidWidgets::AddWorkspaceDialog::AddWorkspaceDialog ( QWidget *  parent = nullptr)
explicit

Constructor.

Parameters
parent:: A parent widget.

Definition at line 33 of file AddWorkspaceDialog.cpp.

References availableWorkspaces(), handleCancelClicked(), handleOKClicked(), m_uiForm, selectAllSpectra(), and workspaceNameChanged().

Member Function Documentation

◆ addWorkspacesFromGroup()

void MantidQt::MantidWidgets::AddWorkspaceDialog::addWorkspacesFromGroup ( std::vector< Mantid::API::MatrixWorkspace_const_sptr > &  workspaces,
Mantid::API::WorkspaceGroup_const_sptr const &  group 
) const
private

Definition at line 60 of file AddWorkspaceDialog.cpp.

References workspace.

Referenced by getWorkspaces().

◆ availableWorkspaces()

QStringList MantidQt::MantidWidgets::AddWorkspaceDialog::availableWorkspaces ( ) const
private

◆ closeDialog

void MantidQt::MantidWidgets::AddWorkspaceDialog::closeDialog ( )
signal

Referenced by handleCancelClicked().

◆ findCommonMaxIndex()

void MantidQt::MantidWidgets::AddWorkspaceDialog::findCommonMaxIndex ( const QString &  wsName)
private

Definition at line 120 of file AddWorkspaceDialog.cpp.

References m_maxIndex.

Referenced by workspaceNameChanged().

◆ getWorkspaces()

std::vector< MatrixWorkspace_const_sptr > MantidQt::MantidWidgets::AddWorkspaceDialog::getWorkspaces ( ) const

◆ handleCancelClicked

void MantidQt::MantidWidgets::AddWorkspaceDialog::handleCancelClicked ( )
slot

Definition at line 143 of file AddWorkspaceDialog.cpp.

References closeDialog(), m_workspaceName, and m_wsIndices.

Referenced by AddWorkspaceDialog().

◆ handleOKClicked

void MantidQt::MantidWidgets::AddWorkspaceDialog::handleOKClicked ( )
slot

Definition at line 149 of file AddWorkspaceDialog.cpp.

References m_maxIndex, m_uiForm, m_workspaceName, m_wsIndices, and okClicked().

Referenced by AddWorkspaceDialog().

◆ okClicked

void MantidQt::MantidWidgets::AddWorkspaceDialog::okClicked ( bool  close)
signal

Referenced by handleOKClicked().

◆ selectAllSpectra

void MantidQt::MantidWidgets::AddWorkspaceDialog::selectAllSpectra ( int  state)
privateslot

Slot.

Called when "All Spectra" check box changes its state

Parameters
state:: The state of the check box (Qt::Checked or not).

Definition at line 85 of file AddWorkspaceDialog.cpp.

References m_maxIndex, and m_uiForm.

Referenced by AddWorkspaceDialog().

◆ workspaceIndiceLineEdit()

QLineEdit * MantidQt::MantidWidgets::AddWorkspaceDialog::workspaceIndiceLineEdit ( ) const
inline

Definition at line 39 of file AddWorkspaceDialog.h.

◆ workspaceIndices()

std::vector< int > MantidQt::MantidWidgets::AddWorkspaceDialog::workspaceIndices ( ) const
inline

Definition at line 32 of file AddWorkspaceDialog.h.

◆ workspaceName()

QString MantidQt::MantidWidgets::AddWorkspaceDialog::workspaceName ( ) const
inline

Definition at line 31 of file AddWorkspaceDialog.h.

Referenced by getWorkspaces().

◆ workspaceNameChanged

void MantidQt::MantidWidgets::AddWorkspaceDialog::workspaceNameChanged ( const QString &  wsName)
privateslot

Slot.

Reacts on change of workspace name in the selection combo box.

Parameters
wsName:: Name of newly selected workspace.

Definition at line 72 of file AddWorkspaceDialog.cpp.

References findCommonMaxIndex(), m_maxIndex, and m_uiForm.

Referenced by AddWorkspaceDialog().

◆ workspaceNameComboBox()

QComboBox * MantidQt::MantidWidgets::AddWorkspaceDialog::workspaceNameComboBox ( ) const
inline

Testing accessors.

Definition at line 38 of file AddWorkspaceDialog.h.

Member Data Documentation

◆ m_maxIndex

int MantidQt::MantidWidgets::AddWorkspaceDialog::m_maxIndex
private

Maximum index in the selected workspace.

Definition at line 64 of file AddWorkspaceDialog.h.

Referenced by findCommonMaxIndex(), handleOKClicked(), selectAllSpectra(), and workspaceNameChanged().

◆ m_uiForm

Ui::AddWorkspaceDialog MantidQt::MantidWidgets::AddWorkspaceDialog::m_uiForm
private

◆ m_workspaceName

QString MantidQt::MantidWidgets::AddWorkspaceDialog::m_workspaceName
private

Name of the selected workspace.

Definition at line 60 of file AddWorkspaceDialog.h.

Referenced by handleCancelClicked(), and handleOKClicked().

◆ m_wsIndices

std::vector<int> MantidQt::MantidWidgets::AddWorkspaceDialog::m_wsIndices
private

Selected workspace index.

Definition at line 62 of file AddWorkspaceDialog.h.

Referenced by handleCancelClicked(), and handleOKClicked().


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