|
Mantid
|
This class defines a widget for selecting multiple workspace present in the AnalysisDataService and adding to a QTableWidget. More...
#include <WorkspaceMultiSelector.h>
Signals | |
| void | emptied () |
| void | focussed () |
Public Member Functions | |
| void | connectObservers () const |
| Subscribes this object to the Poco NotificationCentre. | |
| void | disconnectObservers () const |
| De-subscribes this object from the Poco NotificationCentre. | |
| const QStringList & | getWSSuffixes () const |
| bool | isValid () const |
| void | refresh () |
| void | resetIndexRangeToDefault () |
| StringPairVec | retrieveSelectedNameIndexPairs () |
| void | setupTable () |
| Setup table dimensions and headers from the parent class. | |
| void | setWSSuffixes (const QStringList &suffix) |
| void | unifyRange () |
| WorkspaceMultiSelector (QWidget *parent=nullptr) | |
| Default Constructor. | |
| ~WorkspaceMultiSelector () override | |
| Destructor. | |
Protected Member Functions | |
| void | focusInEvent (QFocusEvent *) override |
| Called when there is an interaction with the widget. | |
Properties | |
| QStringList | Suffix |
Private Member Functions | |
| void | addItem (const std::string &name) |
| void | addItems (const std::vector< std::string > &names) |
| bool | checkEligibility (const std::string &name) const |
| void | handleAddEvent (Mantid::API::WorkspaceAddNotification_ptr pNf) |
| void | handleClearEvent (Mantid::API::ClearADSNotification_ptr pNf) |
| void | handleRemEvent (Mantid::API::WorkspacePostDeleteNotification_ptr pNf) |
| void | handleRenameEvent (Mantid::API::WorkspaceRenameNotification_ptr pNf) |
| void | handleReplaceEvent (Mantid::API::WorkspaceAfterReplaceNotification_ptr pNf) |
| bool | hasValidSuffix (const std::string &name) const |
| void | renameItem (const std::string &newName, int row) |
This class defines a widget for selecting multiple workspace present in the AnalysisDataService and adding to a QTableWidget.
Subscribes to the WorkspaceAddNotification and WorkspaceDeleteNotification from the ADS.
Types of workspace to show can be restricted in several ways:
By listing allowed WorkspaceIDs to show (Workspace2D, TableWorkspace, etc) By deciding whether or not to show "hidden" workspaces (identified with a double underscore at the start of the workspace name By providing a suffix that the workspace name must have
Definition at line 37 of file WorkspaceMultiSelector.h.
|
explicit |
Default Constructor.
Definition at line 47 of file WorkspaceMultiSelector.cpp.
References connectObservers(), and refresh().
|
override |
Destructor.
Destructor for WorkspaceMultiSelector De-subscribes this object from the Poco NotificationCentre.
Definition at line 61 of file WorkspaceMultiSelector.cpp.
References disconnectObservers().
|
private |
Definition at line 112 of file WorkspaceMultiSelector.cpp.
References MantidQt::MantidWidgets::WorkspaceUtils::getIndexString(), indexCol, name, and namesCol.
Referenced by addItems(), handleAddEvent(), handleRenameEvent(), and handleReplaceEvent().
|
private |
Definition at line 129 of file WorkspaceMultiSelector.cpp.
References addItem(), checkEligibility(), and name.
Referenced by refresh().
|
private |
Definition at line 242 of file WorkspaceMultiSelector.cpp.
References hasValidSuffix(), name, and workspace.
Referenced by addItems(), handleAddEvent(), handleRenameEvent(), and handleReplaceEvent().
| void MantidQt::MantidWidgets::WorkspaceMultiSelector::connectObservers | ( | ) | const |
Subscribes this object to the Poco NotificationCentre.
Definition at line 91 of file WorkspaceMultiSelector.cpp.
References m_addObserver, m_clearObserver, m_remObserver, m_renameObserver, m_replaceObserver, and Mantid::Kernel::DataService< T >::notificationCenter.
Referenced by WorkspaceMultiSelector().
| void MantidQt::MantidWidgets::WorkspaceMultiSelector::disconnectObservers | ( | ) | const |
De-subscribes this object from the Poco NotificationCentre.
Definition at line 80 of file WorkspaceMultiSelector.cpp.
References m_addObserver, m_clearObserver, m_remObserver, m_renameObserver, and m_replaceObserver.
Referenced by ~WorkspaceMultiSelector().
|
signal |
Referenced by handleClearEvent(), and handleRemEvent().
|
overrideprotected |
Called when there is an interaction with the widget.
Definition at line 267 of file WorkspaceMultiSelector.cpp.
References focussed().
|
signal |
Referenced by focusInEvent().
| const QStringList & MantidQt::MantidWidgets::WorkspaceMultiSelector::getWSSuffixes | ( | ) | const |
Definition at line 105 of file WorkspaceMultiSelector.cpp.
References m_suffix.
|
private |
Definition at line 172 of file WorkspaceMultiSelector.cpp.
References addItem(), checkEligibility(), and m_adsMutex.
|
private |
Definition at line 192 of file WorkspaceMultiSelector.cpp.
References emptied(), and m_adsMutex.
|
private |
Definition at line 179 of file WorkspaceMultiSelector.cpp.
References emptied(), m_adsMutex, and name.
|
private |
Definition at line 201 of file WorkspaceMultiSelector.cpp.
References addItem(), checkEligibility(), m_adsMutex, and renameItem().
|
private |
Definition at line 227 of file WorkspaceMultiSelector.cpp.
References addItem(), checkEligibility(), m_adsMutex, and name.
|
private |
Definition at line 249 of file WorkspaceMultiSelector.cpp.
References m_suffix, and name.
Referenced by checkEligibility().
| bool MantidQt::MantidWidgets::WorkspaceMultiSelector::isValid | ( | ) | const |
Definition at line 100 of file WorkspaceMultiSelector.cpp.
| void MantidQt::MantidWidgets::WorkspaceMultiSelector::refresh | ( | ) |
Definition at line 257 of file WorkspaceMultiSelector.cpp.
References addItems(), and m_adsMutex.
Referenced by setWSSuffixes(), and WorkspaceMultiSelector().
|
private |
Definition at line 123 of file WorkspaceMultiSelector.cpp.
References MantidQt::MantidWidgets::WorkspaceUtils::getIndexString(), indexCol, and namesCol.
Referenced by handleRenameEvent().
| void MantidQt::MantidWidgets::WorkspaceMultiSelector::resetIndexRangeToDefault | ( | ) |
Definition at line 152 of file WorkspaceMultiSelector.cpp.
References MantidQt::MantidWidgets::WorkspaceUtils::getIndexString(), index, indexCol, and namesCol.
| StringPairVec MantidQt::MantidWidgets::WorkspaceMultiSelector::retrieveSelectedNameIndexPairs | ( | ) |
Definition at line 136 of file WorkspaceMultiSelector.cpp.
| void MantidQt::MantidWidgets::WorkspaceMultiSelector::setupTable | ( | ) |
Setup table dimensions and headers from the parent class.
Definition at line 66 of file WorkspaceMultiSelector.cpp.
References MantidQt::MantidWidgets::getRegexValidatorString(), and MantidQt::MantidWidgets::SpectraValidator.
| void MantidQt::MantidWidgets::WorkspaceMultiSelector::setWSSuffixes | ( | const QStringList & | suffix | ) |
Definition at line 107 of file WorkspaceMultiSelector.cpp.
| void MantidQt::MantidWidgets::WorkspaceMultiSelector::unifyRange | ( | ) |
Definition at line 162 of file WorkspaceMultiSelector.cpp.
|
private |
Poco Observers for ADS Notifications.
Definition at line 89 of file WorkspaceMultiSelector.h.
Referenced by connectObservers(), and disconnectObservers().
|
private |
Definition at line 97 of file WorkspaceMultiSelector.h.
Referenced by handleAddEvent(), handleClearEvent(), handleRemEvent(), handleRenameEvent(), handleReplaceEvent(), and refresh().
|
private |
Definition at line 91 of file WorkspaceMultiSelector.h.
Referenced by connectObservers(), and disconnectObservers().
|
private |
Definition at line 90 of file WorkspaceMultiSelector.h.
Referenced by connectObservers(), and disconnectObservers().
|
private |
Definition at line 92 of file WorkspaceMultiSelector.h.
Referenced by connectObservers(), and disconnectObservers().
|
private |
Definition at line 93 of file WorkspaceMultiSelector.h.
Referenced by connectObservers(), and disconnectObservers().
|
private |
Definition at line 95 of file WorkspaceMultiSelector.h.
Referenced by getWSSuffixes(), hasValidSuffix(), and setWSSuffixes().
|
readwrite |
Definition at line 40 of file WorkspaceMultiSelector.h.