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

This class defines a widget for selecting a workspace of file path by using a combination of two child MantidWidgets: FileFinderWidget and WorkspaceSelector. More...

#include <DataSelector.h>

Inheritance diagram for MantidQt::MantidWidgets::DataSelector:
MantidQt::API::MantidWidget

Signals

void dataReady (const QString &wsname)
 Signal emitted when data is ready from a workspace selector or file browser. More...
 
void filesFound ()
 Signal emitted when files were found but widget isn't autoloading. More...
 
void fileViewVisible ()
 Signal emitted when file input is visible. More...
 
void loadClicked ()
 Signal emitted when the load button is clicked. More...
 
void workspaceViewVisible ()
 Signal emitted when workspace selector is visible. More...
 
- Signals inherited from MantidQt::API::MantidWidget
void runAsPythonScript (const QString &code, bool)
 

Public Member Functions

bool allowMultipleFiles () const
 Return whether this widget allows multiple files to be specified within the edit box. More...
 
void allowMultipleFiles (const bool allow)
 Set whether this widget allows multiple files to be specifed or not. More...
 
 DataSelector (QWidget *parent=nullptr)
 
ButtonOpts doButtonOpt () const
 Returns the preference for how the dialog control should be. More...
 
void doButtonOpt (const ButtonOpts buttonOpt)
 Set how the browse should appear. More...
 
bool doMultiEntry () const
 Whether to find the number of entries in the file or assume (the normal situation) of one entry. More...
 
void doMultiEntry (const bool multiEntry)
 Set to true to enable the period number box. More...
 
bool extsAsSingleOption () const
 Returns whether the file dialog should display the exts as a single list or as multiple items. More...
 
void extsAsSingleOption (const bool value)
 Sets whether the file dialog should display the exts as a single list or as multiple items. More...
 
QString getAlgorithmProperty () const
 Returns the algorithm name. More...
 
virtual QString getCurrentDataName () const
 Get the currently available file or workspace name. More...
 
QStringList getFBSuffixes ()
 Gets the suffixes allowed by the file browser. More...
 
QString getFullFilePath () const
 Get the current file path in the FileFinderWidget widget. More...
 
QString getInstrumentOverride ()
 Gets the instrument override. More...
 
QString getLabelText () const
 Return the label text on the widget. More...
 
QString getLoadBtnText () const
 Gets the load button text. More...
 
QString getProblem () const
 Get file problem, empty string means no error. More...
 
QString getValidatingAlgorithm () const
 Gets if the validating algorithm of workspace selector. More...
 
QStringList getWorkspaceTypes () const
 Gets the workspace types allowed by the workspace selector. More...
 
QString getWsNameFromFiles () const
 Get the workspace name from the list of files. More...
 
QStringList getWSSuffixes ()
 Gets the suffixes allowed by the workspace selector. More...
 
bool isFileSelectorVisible () const
 Get whether the file selector is currently being shown. More...
 
bool isForDirectory () const
 Returns if this widget is for selecting a directory or not. More...
 
void isForDirectory (const bool mode)
 Sets directory searching mode. More...
 
bool isForRunFiles () const
 Returns if this widget is for run file searching or not. More...
 
void isForRunFiles (const bool mode)
 Sets whether this widget is for run file searching or not. More...
 
bool isOptional () const
 Gets if optional. More...
 
void isOptional (bool)
 Sets if optional. More...
 
virtual bool isValid ()
 Checks if widget is in a valid state. More...
 
bool isWorkspaceSelectorVisible () const
 Get whether the workspace selector is currently being shown. More...
 
LiveButtonOpts liveButtonState () const
 Gets the live button state. More...
 
void liveButtonState (const LiveButtonOpts option)
 Sets the live button state. More...
 
void readSettings (const QString &)
 Read settings from the given group. More...
 
void saveSettings (const QString &)
 Save settings in the given group. More...
 
void setAlgorithmProperty (const QString &text)
 Sets an algorithm name that can be tied to this widget. More...
 
void setAutoLoad (bool)
 Sets will auto load. More...
 
void setFBSuffixes (const QStringList &suffixes)
 Sets the suffixes allowed by the file browser. More...
 
void setInstrumentOverride (const QString &instName)
 Sets the instrument override. More...
 
void setLabelText (const QString &text)
 Set the text on the label. More...
 
void setLoadBtnText (const QString &)
 Sets the load button text. More...
 
void setSelectorIndex (int index)
 Sets which selector (file or workspace) is visible. More...
 
void setShowLoad (bool load)
 Set if the load button should be shown. More...
 
void setTypeSelectorVisible (bool visible)
 Sets if the option to choose selector is visible. More...
 
void setValidatingAlgorithm (const QString &algName)
 Sets the validating algorithm of workspace selector. More...
 
void setWorkspaceSelectorIndex (QString const &workspaceName)
 Set the index of the combobox containing the loaded workspace. More...
 
void setWorkspaceTypes (const QStringList &types)
 Sets the workspace types allowed by the workspace selector. More...
 
void setWSSuffixes (const QStringList &suffixes)
 Sets the suffixes allowed by the workspace selector. More...
 
bool showHiddenWorkspaces () const
 Gets if the workspace selector shows hidden workspaces. More...
 
void showHiddenWorkspaces (bool show)
 Sets if the workspace selector shows hidden workspaces. More...
 
bool showWorkspaceGroups () const
 Gets if the workspace selector shows group workspaces. More...
 
void showWorkspaceGroups (bool show)
 Sets if the workspace selector shows workspace groups. More...
 
bool willAutoLoad () const
 Gets will auto load. More...
 
bool willShowLoad ()
 Check if the widget will show the load button. More...
 
 ~DataSelector () override
 
- Public Member Functions inherited from MantidQt::API::MantidWidget
virtual QVariant getUserInput () const
 Returns a QVariant containing what the widget classes as user input so that input can be returned through a common interface. More...
 
virtual void setUserInput (const QVariant &value)
 Sets a value on a mantid widget through a common interface. More...
 

Protected Member Functions

void dragEnterEvent (QDragEnterEvent *) override
 Called when an item is dragged onto a control. More...
 
void dropEvent (QDropEvent *) override
 Called when an item is dropped. More...
 
- Protected Member Functions inherited from MantidQt::API::MantidWidget
 MantidWidget (QWidget *parent=nullptr)
 Default constructor. More...
 
QString runPythonCode (const QString &code, bool no_output=false)
 Run python code that is passed to it and, optionally, return anything it wrote to standard output as a string. More...
 

Properties

QString Algorithm
 
QString algorithmAndProperty
 
bool autoLoad
 
ButtonOpts buttonOpts
 
bool extsAsSingleOption
 
QStringList fileBrowserSuffixes
 
bool findDirectory
 
bool findRunFiles
 
QString instrumentOverride
 
QString label
 
LiveButtonOpts liveButton
 
QString loadLabelText
 
bool multiEntry
 
bool multipleFiles
 
bool optional
 
bool ShowGroups
 
bool ShowHidden
 
bool showLoad
 
QStringList workspaceSuffixes
 
QStringList WorkspaceTypes
 

Private Slots

void handleAutoLoadComplete (bool error)
 Slot called if the widget fails to auto load the file. More...
 
void handleFileInput ()
 Slot called when file input is available. More...
 
void handleViewChanged (int index)
 Slot called when the current view is changed. More...
 
void handleWorkspaceInput ()
 Slot called when workspace input is available. More...
 

Private Member Functions

void autoLoadFile (const QString &filenames)
 Attempt to automatically load a file. More...
 

Private Attributes

MantidQt::API::AlgorithmRunner m_algRunner
 Algorithm Runner used to run the load algorithm. More...
 
bool m_autoLoad
 Flag to enable auto loading. By default this is set to true. More...
 
bool m_isOptional
 Flag if optional. More...
 
bool m_showLoad
 Flag to show or hide the load button. By default this is set to true. More...
 
Ui::DataSelector m_uiForm
 Member containing the widgets child widgets. More...
 

Detailed Description

This class defines a widget for selecting a workspace of file path by using a combination of two child MantidWidgets: FileFinderWidget and WorkspaceSelector.

This widget combines the two to produce a single composite widget that emits signals when the user has chosen appropriate input.

Author
Samuel Jackson
Date
07/08/2013

Definition at line 35 of file DataSelector.h.

Constructor & Destructor Documentation

◆ DataSelector()

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

◆ ~DataSelector()

MantidQt::MantidWidgets::DataSelector::~DataSelector ( )
overridedefault

Member Function Documentation

◆ allowMultipleFiles() [1/2]

bool MantidQt::MantidWidgets::DataSelector::allowMultipleFiles ( ) const
inline

Return whether this widget allows multiple files to be specified within the edit box.

Returns
True if multiple files can be specified, false otherwise

Definition at line 117 of file DataSelector.h.

◆ allowMultipleFiles() [2/2]

void MantidQt::MantidWidgets::DataSelector::allowMultipleFiles ( const bool  allow)
inline

Set whether this widget allows multiple files to be specifed or not.

Parameters
allow:: If true then the widget will accept multiple files else only a single file may be specified

Definition at line 126 of file DataSelector.h.

◆ autoLoadFile()

void MantidQt::MantidWidgets::DataSelector::autoLoadFile ( const QString &  filepath)
private

Attempt to automatically load a file.

Attempt to load a file if the widget is set to attempt auto-loading.

Function creates an instance of the load algorithm and attaches it to a algorithm runner to attempt loading.

Parameters
filepath:: The file path to load

Definition at line 212 of file DataSelector.cpp.

References getWsNameFromFiles(), Mantid::Kernel::SingletonHolder< T >::Instance(), m_algRunner, and MantidQt::API::AlgorithmRunner::startAlgorithm().

Referenced by handleFileInput().

◆ dataReady

void MantidQt::MantidWidgets::DataSelector::dataReady ( const QString &  wsname)
signal

Signal emitted when data is ready from a workspace selector or file browser.

Referenced by handleAutoLoadComplete(), and handleWorkspaceInput().

◆ doButtonOpt() [1/2]

ButtonOpts MantidQt::MantidWidgets::DataSelector::doButtonOpt ( ) const
inline

Returns the preference for how the dialog control should be.

Returns
the setting

Definition at line 237 of file DataSelector.h.

◆ doButtonOpt() [2/2]

void MantidQt::MantidWidgets::DataSelector::doButtonOpt ( const ButtonOpts  buttonOpt)
inline

Set how the browse should appear.

Parameters
buttonOpt:: the preference for the control, if there will be one, to activate the dialog box

Definition at line 245 of file DataSelector.h.

◆ doMultiEntry() [1/2]

bool MantidQt::MantidWidgets::DataSelector::doMultiEntry ( ) const
inline

Whether to find the number of entries in the file or assume (the normal situation) of one entry.

Returns
true if the widget is to look for multiple entries

Definition at line 169 of file DataSelector.h.

◆ doMultiEntry() [2/2]

void MantidQt::MantidWidgets::DataSelector::doMultiEntry ( const bool  multiEntry)
inline

Set to true to enable the period number box.

Parameters
multiEntrywhether to show the multiperiod box

Definition at line 175 of file DataSelector.h.

◆ dragEnterEvent()

void MantidQt::MantidWidgets::DataSelector::dragEnterEvent ( QDragEnterEvent *  de)
overrideprotected

Called when an item is dragged onto a control.

Parameters
de:: the drag event data package

Definition at line 450 of file DataSelector.cpp.

◆ dropEvent()

void MantidQt::MantidWidgets::DataSelector::dropEvent ( QDropEvent *  de)
overrideprotected

Called when an item is dropped.

Parameters
de:: the drop event data package

Definition at line 402 of file DataSelector.cpp.

References m_uiForm, and setWorkspaceSelectorIndex().

◆ extsAsSingleOption() [1/2]

bool MantidQt::MantidWidgets::DataSelector::extsAsSingleOption ( ) const
inline

Returns whether the file dialog should display the exts as a single list or as multiple items.

Returns
boolean

Definition at line 195 of file DataSelector.h.

◆ extsAsSingleOption() [2/2]

void MantidQt::MantidWidgets::DataSelector::extsAsSingleOption ( const bool  value)
inline

Sets whether the file dialog should display the exts as a single list or as multiple items.

Parameters
value:: If true the file dialog wil contain a single entry will all filters

Definition at line 203 of file DataSelector.h.

References value.

◆ filesFound

void MantidQt::MantidWidgets::DataSelector::filesFound ( )
signal

Signal emitted when files were found but widget isn't autoloading.

Referenced by handleFileInput().

◆ fileViewVisible

void MantidQt::MantidWidgets::DataSelector::fileViewVisible ( )
signal

Signal emitted when file input is visible.

Referenced by handleViewChanged().

◆ getAlgorithmProperty()

QString MantidQt::MantidWidgets::DataSelector::getAlgorithmProperty ( ) const
inline

Returns the algorithm name.

Returns
The algorithm name

Definition at line 181 of file DataSelector.h.

◆ getCurrentDataName()

QString MantidQt::MantidWidgets::DataSelector::getCurrentDataName ( ) const
virtual

Get the currently available file or workspace name.

Gets the name of item selected in the DataSelector.

This will return the currently selected item in the workspace selector, if the workspace view is active. If the file view is active, it will return the basename of the file. If multiple files are allowed, and auto-loading is off, it will return the full user input. If there is no valid input the method returns an empty string.

Returns
The name of the current data item

Definition at line 312 of file DataSelector.cpp.

References getFullFilePath(), getWsNameFromFiles(), index, m_autoLoad, and m_uiForm.

Referenced by isValid().

◆ getFBSuffixes()

QStringList MantidQt::MantidWidgets::DataSelector::getFBSuffixes ( )
inline

Gets the suffixes allowed by the file browser.

Returns
List of suffixes allowed by the file browser

Definition at line 210 of file DataSelector.h.

◆ getFullFilePath()

QString MantidQt::MantidWidgets::DataSelector::getFullFilePath ( ) const

Get the current file path in the FileFinderWidget widget.

Gets the full file path currently in the file browser.

Returns
The full file path

Definition at line 280 of file DataSelector.cpp.

References m_uiForm.

Referenced by getCurrentDataName(), and getWsNameFromFiles().

◆ getInstrumentOverride()

QString MantidQt::MantidWidgets::DataSelector::getInstrumentOverride ( )
inline

Gets the instrument override.

Returns
List of instrument override

Definition at line 224 of file DataSelector.h.

◆ getLabelText()

QString MantidQt::MantidWidgets::DataSelector::getLabelText ( ) const
inline

Return the label text on the widget.

Returns
The current value of the text on the label

Definition at line 156 of file DataSelector.h.

◆ getLoadBtnText()

QString MantidQt::MantidWidgets::DataSelector::getLoadBtnText ( ) const

Gets the load button text.

Gets the text displayed on the load button.

Returns
The text on the load button

Definition at line 358 of file DataSelector.cpp.

References m_uiForm.

◆ getProblem()

QString MantidQt::MantidWidgets::DataSelector::getProblem ( ) const

Get file problem, empty string means no error.

Return the error.

Returns
A string explaining the error.

Definition at line 190 of file DataSelector.cpp.

References isFileSelectorVisible(), and m_uiForm.

Referenced by MantidQt::CustomInterfaces::UserInputValidator::checkDataSelectorIsValid().

◆ getValidatingAlgorithm()

QString MantidQt::MantidWidgets::DataSelector::getValidatingAlgorithm ( ) const
inline

Gets if the validating algorithm of workspace selector.

Returns
validating algorithm

Definition at line 323 of file DataSelector.h.

◆ getWorkspaceTypes()

QStringList MantidQt::MantidWidgets::DataSelector::getWorkspaceTypes ( ) const
inline

Gets the workspace types allowed by the workspace selector.

Returns
List of workspace types allowed by the workspace selector

Definition at line 281 of file DataSelector.h.

◆ getWsNameFromFiles()

QString MantidQt::MantidWidgets::DataSelector::getWsNameFromFiles ( ) const

Get the workspace name from the list of files.

Gets the workspace name that is created after loading the files.

Returns
The workspace name that is created after loading the files

Definition at line 287 of file DataSelector.cpp.

References getFullFilePath(), and m_uiForm.

Referenced by autoLoadFile(), getCurrentDataName(), and handleAutoLoadComplete().

◆ getWSSuffixes()

QStringList MantidQt::MantidWidgets::DataSelector::getWSSuffixes ( )
inline

Gets the suffixes allowed by the workspace selector.

Returns
List of suffixes allowed by the workspace selector

Definition at line 267 of file DataSelector.h.

◆ handleAutoLoadComplete

void MantidQt::MantidWidgets::DataSelector::handleAutoLoadComplete ( bool  error)
privateslot

Slot called if the widget fails to auto load the file.

Handles when the load algorithm completes.

Parameters
error:: Whether loading completed without error

Definition at line 229 of file DataSelector.cpp.

References dataReady(), error, getWsNameFromFiles(), and m_uiForm.

Referenced by DataSelector().

◆ handleFileInput

void MantidQt::MantidWidgets::DataSelector::handleFileInput ( )
privateslot

Slot called when file input is available.

Handle signals when files are found or the user manually clicks load.

Definition at line 99 of file DataSelector.cpp.

References autoLoadFile(), filesFound(), m_autoLoad, and m_uiForm.

Referenced by DataSelector().

◆ handleViewChanged

void MantidQt::MantidWidgets::DataSelector::handleViewChanged ( int  index)
privateslot

Slot called when the current view is changed.

Handles when the view changes between workspace and file selection.

Parameters
index:: The index the stacked widget has been switched too.

Definition at line 259 of file DataSelector.cpp.

References fileViewVisible(), handleWorkspaceInput(), index, m_uiForm, and workspaceViewVisible().

Referenced by DataSelector().

◆ handleWorkspaceInput

void MantidQt::MantidWidgets::DataSelector::handleWorkspaceInput ( )
privateslot

Slot called when workspace input is available.

Handles when the user select a workspace in the workspace selector.

Definition at line 242 of file DataSelector.cpp.

References dataReady(), and m_uiForm.

Referenced by DataSelector(), and handleViewChanged().

◆ isFileSelectorVisible()

bool MantidQt::MantidWidgets::DataSelector::isFileSelectorVisible ( ) const

Get whether the file selector is currently being shown.

Get if the file selector is currently being shown.

Returns
:: true if it is visible, otherwise false

Definition at line 131 of file DataSelector.cpp.

References index, and m_uiForm.

Referenced by getProblem(), isValid(), and isWorkspaceSelectorVisible().

◆ isForDirectory() [1/2]

bool MantidQt::MantidWidgets::DataSelector::isForDirectory ( ) const
inline

Returns if this widget is for selecting a directory or not.

Returns
True if selecting a directory

Definition at line 144 of file DataSelector.h.

◆ isForDirectory() [2/2]

void MantidQt::MantidWidgets::DataSelector::isForDirectory ( const bool  mode)
inline

Sets directory searching mode.

Parameters
modeTrue to search for directories only

Definition at line 150 of file DataSelector.h.

◆ isForRunFiles() [1/2]

bool MantidQt::MantidWidgets::DataSelector::isForRunFiles ( ) const
inline

Returns if this widget is for run file searching or not.

Returns
True if this widget searches for run files, false otherwise

Definition at line 132 of file DataSelector.h.

◆ isForRunFiles() [2/2]

void MantidQt::MantidWidgets::DataSelector::isForRunFiles ( const bool  mode)
inline

Sets whether this widget is for run file searching or not.

Parameters
mode:: True if this widget searches for run files, false otherwise

Definition at line 138 of file DataSelector.h.

◆ isOptional() [1/2]

bool MantidQt::MantidWidgets::DataSelector::isOptional ( ) const

Gets if optional.

Return whether empty input is allowed.

Returns
:: Flag if is optional

Definition at line 84 of file DataSelector.cpp.

References m_isOptional.

◆ isOptional() [2/2]

void MantidQt::MantidWidgets::DataSelector::isOptional ( bool  optional)

Sets if optional.

Sets if the text field is optional.

Parameters
optional:: Set the optional status of the text field

Definition at line 90 of file DataSelector.cpp.

References m_isOptional, m_uiForm, and optional.

◆ isValid()

bool MantidQt::MantidWidgets::DataSelector::isValid ( )
virtual

Checks if widget is in a valid state.

Check if the data selector is in a valid state.

Checks using the relvant widgets isValid method depending on what view is currently being shown

Returns
:: If the data selector is valid

Definition at line 151 of file DataSelector.cpp.

References getCurrentDataName(), isFileSelectorVisible(), isValid(), m_autoLoad, and m_uiForm.

Referenced by MantidQt::CustomInterfaces::UserInputValidator::checkDataSelectorIsValid(), and isValid().

◆ isWorkspaceSelectorVisible()

bool MantidQt::MantidWidgets::DataSelector::isWorkspaceSelectorVisible ( ) const

Get whether the workspace selector is currently being shown.

Get if the workspace selector is currently being shown.

Returns
:: true if it is visible, otherwise false

Definition at line 141 of file DataSelector.cpp.

References isFileSelectorVisible().

◆ liveButtonState() [1/2]

LiveButtonOpts MantidQt::MantidWidgets::DataSelector::liveButtonState ( ) const
inline

Gets the live button state.

Returns
live button option

Definition at line 252 of file DataSelector.h.

◆ liveButtonState() [2/2]

void MantidQt::MantidWidgets::DataSelector::liveButtonState ( const LiveButtonOpts  option)
inline

Sets the live button state.

Parameters
option:: livebutton option

Definition at line 259 of file DataSelector.h.

◆ loadClicked

void MantidQt::MantidWidgets::DataSelector::loadClicked ( )
signal

Signal emitted when the load button is clicked.

Referenced by DataSelector().

◆ readSettings()

void MantidQt::MantidWidgets::DataSelector::readSettings ( const QString &  group)

Read settings from the given group.

Parameters
group:: The name of the group key to retrieve data from

Definition at line 371 of file DataSelector.cpp.

References m_uiForm.

◆ saveSettings()

void MantidQt::MantidWidgets::DataSelector::saveSettings ( const QString &  group)

Save settings in the given group.

Save settings to the given group.

Parameters
group:: The name of the group key to save to

Definition at line 377 of file DataSelector.cpp.

References m_uiForm.

◆ setAlgorithmProperty()

void MantidQt::MantidWidgets::DataSelector::setAlgorithmProperty ( const QString &  text)
inline

Sets an algorithm name that can be tied to this widget.

Parameters
text:: The name of the algorithm and property in the form [AlgorithmName|PropertyName]

Definition at line 188 of file DataSelector.h.

◆ setAutoLoad()

void MantidQt::MantidWidgets::DataSelector::setAutoLoad ( bool  load)

Sets will auto load.

Sets whether the widget will attempt to auto load files.

Parameters
load:: Whether the widget will auto load

Definition at line 351 of file DataSelector.cpp.

References m_autoLoad.

◆ setFBSuffixes()

void MantidQt::MantidWidgets::DataSelector::setFBSuffixes ( const QStringList &  suffixes)
inline

Sets the suffixes allowed by the file browser.

Parameters
suffixes:: List of suffixes allowed by the file browser

Definition at line 217 of file DataSelector.h.

◆ setInstrumentOverride()

void MantidQt::MantidWidgets::DataSelector::setInstrumentOverride ( const QString &  instName)
inline

Sets the instrument override.

Parameters
instName:: name of instrument override

Definition at line 231 of file DataSelector.h.

◆ setLabelText()

void MantidQt::MantidWidgets::DataSelector::setLabelText ( const QString &  text)
inline

Set the text on the label.

Parameters
text:: A string giving the label to use for the text

Definition at line 162 of file DataSelector.h.

◆ setLoadBtnText()

void MantidQt::MantidWidgets::DataSelector::setLoadBtnText ( const QString &  text)

Sets the load button text.

Sets the text shown on the load button.

Parameters
text:: The text to display on the button

Definition at line 365 of file DataSelector.cpp.

References m_uiForm.

◆ setSelectorIndex()

void MantidQt::MantidWidgets::DataSelector::setSelectorIndex ( int  index)

Sets which selector (file or workspace) is visible.

Sets whether the file or workspace selector is visible.

Definition at line 119 of file DataSelector.cpp.

References index, and m_uiForm.

◆ setShowLoad()

void MantidQt::MantidWidgets::DataSelector::setShowLoad ( bool  load)

Set if the load button should be shown.

Set if the load button will be shown or not This will change if the button widget is visible and enabled.

Parameters
load:: Whether the load button will be shown

Definition at line 392 of file DataSelector.cpp.

References m_showLoad, and m_uiForm.

◆ setTypeSelectorVisible()

void MantidQt::MantidWidgets::DataSelector::setTypeSelectorVisible ( bool  visible)

Sets if the option to choose selector is visible.

Sets whether the file or workspace type selector is visible.

Definition at line 124 of file DataSelector.cpp.

References m_uiForm.

◆ setValidatingAlgorithm()

void MantidQt::MantidWidgets::DataSelector::setValidatingAlgorithm ( const QString &  algName)
inline

Sets the validating algorithm of workspace selector.

Parameters
algName:: validating algorithm

Definition at line 330 of file DataSelector.h.

◆ setWorkspaceSelectorIndex()

void MantidQt::MantidWidgets::DataSelector::setWorkspaceSelectorIndex ( QString const &  workspaceName)

Set the index of the combobox containing the loaded workspace.

This sets the workspace selector's index to the workspace which was dragged and dropped onto the data selector.

Parameters
workspaceName:: the name of the workspace dragged onto the selector

Definition at line 441 of file DataSelector.cpp.

References index, and m_uiForm.

Referenced by dropEvent().

◆ setWorkspaceTypes()

void MantidQt::MantidWidgets::DataSelector::setWorkspaceTypes ( const QStringList &  types)
inline

Sets the workspace types allowed by the workspace selector.

Parameters
types:: List of workspace types allowed by the workspace selector

Definition at line 288 of file DataSelector.h.

◆ setWSSuffixes()

void MantidQt::MantidWidgets::DataSelector::setWSSuffixes ( const QStringList &  suffixes)
inline

Sets the suffixes allowed by the workspace selector.

Parameters
suffixes:: List of suffixes allowed by the workspace selector

Definition at line 274 of file DataSelector.h.

◆ showHiddenWorkspaces() [1/2]

bool MantidQt::MantidWidgets::DataSelector::showHiddenWorkspaces ( ) const
inline

Gets if the workspace selector shows hidden workspaces.

Returns
Boolean flag if hidden workspaces are shown

Definition at line 295 of file DataSelector.h.

◆ showHiddenWorkspaces() [2/2]

void MantidQt::MantidWidgets::DataSelector::showHiddenWorkspaces ( bool  show)
inline

Sets if the workspace selector shows hidden workspaces.

Parameters
show:: Boolean flag if hidden workspaces are shown

Definition at line 302 of file DataSelector.h.

◆ showWorkspaceGroups() [1/2]

bool MantidQt::MantidWidgets::DataSelector::showWorkspaceGroups ( ) const
inline

Gets if the workspace selector shows group workspaces.

Returns
Boolean flag if group workspaces are shown

Definition at line 309 of file DataSelector.h.

◆ showWorkspaceGroups() [2/2]

void MantidQt::MantidWidgets::DataSelector::showWorkspaceGroups ( bool  show)
inline

Sets if the workspace selector shows workspace groups.

Parameters
show:: Boolean flag if group workspaces are shown

Definition at line 316 of file DataSelector.h.

◆ willAutoLoad()

bool MantidQt::MantidWidgets::DataSelector::willAutoLoad ( ) const

Gets will auto load.

Gets whether the widget will attempt to auto load files.

Returns
Whether the widget will auto load

Definition at line 344 of file DataSelector.cpp.

References m_autoLoad.

◆ willShowLoad()

bool MantidQt::MantidWidgets::DataSelector::willShowLoad ( )

Check if the widget will show the load button.

Check if the load button will be shown on the interface.

Returns
If the load button will be shown or not

Definition at line 384 of file DataSelector.cpp.

References m_showLoad.

◆ workspaceViewVisible

void MantidQt::MantidWidgets::DataSelector::workspaceViewVisible ( )
signal

Signal emitted when workspace selector is visible.

Referenced by handleViewChanged().

Member Data Documentation

◆ m_algRunner

MantidQt::API::AlgorithmRunner MantidQt::MantidWidgets::DataSelector::m_algRunner
private

Algorithm Runner used to run the load algorithm.

Definition at line 367 of file DataSelector.h.

Referenced by autoLoadFile(), and DataSelector().

◆ m_autoLoad

bool MantidQt::MantidWidgets::DataSelector::m_autoLoad
private

Flag to enable auto loading. By default this is set to true.

Definition at line 369 of file DataSelector.h.

Referenced by getCurrentDataName(), handleFileInput(), isValid(), setAutoLoad(), and willAutoLoad().

◆ m_isOptional

bool MantidQt::MantidWidgets::DataSelector::m_isOptional
private

Flag if optional.

Definition at line 373 of file DataSelector.h.

Referenced by isOptional().

◆ m_showLoad

bool MantidQt::MantidWidgets::DataSelector::m_showLoad
private

Flag to show or hide the load button. By default this is set to true.

Definition at line 371 of file DataSelector.h.

Referenced by setShowLoad(), and willShowLoad().

◆ m_uiForm

Ui::DataSelector MantidQt::MantidWidgets::DataSelector::m_uiForm
private

Property Documentation

◆ Algorithm

QString MantidQt::MantidWidgets::DataSelector::Algorithm
readwrite

Definition at line 35 of file DataSelector.h.

◆ algorithmAndProperty

QString MantidQt::MantidWidgets::DataSelector::algorithmAndProperty
readwrite

Definition at line 35 of file DataSelector.h.

◆ autoLoad

bool MantidQt::MantidWidgets::DataSelector::autoLoad
readwrite

Definition at line 35 of file DataSelector.h.

◆ buttonOpts

ButtonOpts MantidQt::MantidWidgets::DataSelector::buttonOpts
readwrite

Definition at line 35 of file DataSelector.h.

◆ extsAsSingleOption

bool MantidQt::MantidWidgets::DataSelector::extsAsSingleOption
readwrite

Definition at line 35 of file DataSelector.h.

◆ fileBrowserSuffixes

QStringList MantidQt::MantidWidgets::DataSelector::fileBrowserSuffixes
readwrite

Definition at line 35 of file DataSelector.h.

◆ findDirectory

bool MantidQt::MantidWidgets::DataSelector::findDirectory
readwrite

Definition at line 35 of file DataSelector.h.

◆ findRunFiles

bool MantidQt::MantidWidgets::DataSelector::findRunFiles
readwrite

Definition at line 35 of file DataSelector.h.

◆ instrumentOverride

QString MantidQt::MantidWidgets::DataSelector::instrumentOverride
readwrite

Definition at line 35 of file DataSelector.h.

◆ label

QString MantidQt::MantidWidgets::DataSelector::label
readwrite

Definition at line 35 of file DataSelector.h.

◆ liveButton

LiveButtonOpts MantidQt::MantidWidgets::DataSelector::liveButton
readwrite

Definition at line 35 of file DataSelector.h.

◆ loadLabelText

QString MantidQt::MantidWidgets::DataSelector::loadLabelText
readwrite

Definition at line 35 of file DataSelector.h.

◆ multiEntry

bool MantidQt::MantidWidgets::DataSelector::multiEntry
readwrite

Definition at line 35 of file DataSelector.h.

◆ multipleFiles

bool MantidQt::MantidWidgets::DataSelector::multipleFiles
readwrite

Definition at line 35 of file DataSelector.h.

◆ optional

bool MantidQt::MantidWidgets::DataSelector::optional
readwrite

Definition at line 35 of file DataSelector.h.

Referenced by isOptional().

◆ ShowGroups

bool MantidQt::MantidWidgets::DataSelector::ShowGroups
readwrite

Definition at line 35 of file DataSelector.h.

◆ ShowHidden

bool MantidQt::MantidWidgets::DataSelector::ShowHidden
readwrite

Definition at line 35 of file DataSelector.h.

◆ showLoad

bool MantidQt::MantidWidgets::DataSelector::showLoad
readwrite

Definition at line 35 of file DataSelector.h.

◆ workspaceSuffixes

QStringList MantidQt::MantidWidgets::DataSelector::workspaceSuffixes
readwrite

Definition at line 35 of file DataSelector.h.

◆ WorkspaceTypes

QStringList MantidQt::MantidWidgets::DataSelector::WorkspaceTypes
readwrite

Definition at line 35 of file DataSelector.h.


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