|
Mantid
|
This class represents the table widget which holds domain data for the FitScriptGenerator interface. More...
#include <FitScriptGeneratorDataTable.h>
Public Types | |
| enum | ColumnIndex { WorkspaceName = 0 , WorkspaceIndex = 1 , StartX = 2 , EndX = 3 } |
Signals | |
| void | itemExited (int newRowIndex) |
Public Member Functions | |
| void | addDomain (QString const &workspaceName, MantidWidgets::WorkspaceIndex workspaceIndex, double startX, double endX) |
| std::vector< FitDomainIndex > | allRows () const |
| FitDomainIndex | currentRow () const |
| double | endX (FitDomainIndex row) const |
| FitScriptGeneratorDataTable (QWidget *parent=nullptr) | |
| FitScriptGeneratorDataTable class methods. More... | |
| void | formatSelection () |
| bool | hasLoadedData () const |
| void | removeDomain (MantidWidgets::FitDomainIndex domainIndex) |
| void | renameWorkspace (QString const &workspaceName, QString const &newName) |
| void | resetSelection () |
| QString | selectedDomainFunctionPrefix () const |
| std::vector< FitDomainIndex > | selectedRows () const |
| void | setFunctionPrefixVisible (bool visible) |
| double | startX (FitDomainIndex row) const |
| MantidWidgets::WorkspaceIndex | workspaceIndex (FitDomainIndex row) const |
| std::string | workspaceName (FitDomainIndex row) const |
| ~FitScriptGeneratorDataTable ()=default | |
Private Slots | |
| void | handleItemClicked (QTableWidgetItem *item) |
| void | handleItemSelectionChanged () |
Private Member Functions | |
| bool | eventFilter (QObject *widget, QEvent *event) override |
| QString | getText (FitDomainIndex row, int column) const |
| QPersistentModelIndex | hoveredRowIndex (QEvent *event) |
| void | setSelectedXValue (double xValue) |
| void | updateVerticalHeaders () |
Private Attributes | |
| QPersistentModelIndex | m_lastHoveredIndex |
| int | m_selectedColumn |
| std::vector< FitDomainIndex > | m_selectedRows |
| double | m_selectedValue |
This class represents the table widget which holds domain data for the FitScriptGenerator interface.
This table has four columns: Workspace Name, Workspace Index, Start X, End X.
This table has been manually created and derived from QTableWidget to allow the table rows to be highlighted when a hover event occurs.
Definition at line 37 of file FitScriptGeneratorDataTable.h.
| Enumerator | |
|---|---|
| WorkspaceName | |
| WorkspaceIndex | |
| StartX | |
| EndX | |
Definition at line 41 of file FitScriptGeneratorDataTable.h.
| MantidQt::MantidWidgets::FitScriptGeneratorDataTable::FitScriptGeneratorDataTable | ( | QWidget * | parent = nullptr | ) |
FitScriptGeneratorDataTable class methods.
Definition at line 82 of file FitScriptGeneratorDataTable.cpp.
References handleItemClicked(), and handleItemSelectionChanged().
|
default |
References Mantid::API::renameWorkspace().
| void MantidQt::MantidWidgets::FitScriptGeneratorDataTable::addDomain | ( | QString const & | workspaceName, |
| MantidWidgets::WorkspaceIndex | workspaceIndex, | ||
| double | startX, | ||
| double | endX | ||
| ) |
Definition at line 247 of file FitScriptGeneratorDataTable.cpp.
References endX(), m_selectedRows, startX(), MantidQt::MantidWidgets::IndexType< Class >::value, workspaceIndex(), and workspaceName().
| std::vector< FitDomainIndex > MantidQt::MantidWidgets::FitScriptGeneratorDataTable::allRows | ( | ) | const |
Definition at line 185 of file FitScriptGeneratorDataTable.cpp.
References index.
| FitDomainIndex MantidQt::MantidWidgets::FitScriptGeneratorDataTable::currentRow | ( | ) | const |
Definition at line 209 of file FitScriptGeneratorDataTable.cpp.
References hasLoadedData(), and selectedRows().
| double MantidQt::MantidWidgets::FitScriptGeneratorDataTable::endX | ( | FitDomainIndex | row | ) | const |
Definition at line 181 of file FitScriptGeneratorDataTable.cpp.
References getText().
Referenced by addDomain().
|
overrideprivate |
Definition at line 115 of file FitScriptGeneratorDataTable.cpp.
References hoveredRowIndex(), index, itemExited(), and m_lastHoveredIndex.
| void MantidQt::MantidWidgets::FitScriptGeneratorDataTable::formatSelection | ( | ) |
Definition at line 280 of file FitScriptGeneratorDataTable.cpp.
References m_selectedColumn, m_selectedRows, setSelectedXValue(), and value.
|
private |
Definition at line 276 of file FitScriptGeneratorDataTable.cpp.
References MantidQt::MantidWidgets::IndexType< Class >::value.
Referenced by endX(), startX(), workspaceIndex(), and workspaceName().
|
privateslot |
Definition at line 128 of file FitScriptGeneratorDataTable.cpp.
References m_selectedColumn, m_selectedRows, m_selectedValue, and selectedRows().
Referenced by FitScriptGeneratorDataTable().
|
privateslot |
Definition at line 135 of file FitScriptGeneratorDataTable.cpp.
References m_selectedRows, and selectedRows().
Referenced by FitScriptGeneratorDataTable().
| bool MantidQt::MantidWidgets::FitScriptGeneratorDataTable::hasLoadedData | ( | ) | const |
Definition at line 218 of file FitScriptGeneratorDataTable.cpp.
Referenced by currentRow().
|
private |
Definition at line 158 of file FitScriptGeneratorDataTable.cpp.
References index, and m_lastHoveredIndex.
Referenced by eventFilter().
|
signal |
Referenced by eventFilter().
| void MantidQt::MantidWidgets::FitScriptGeneratorDataTable::removeDomain | ( | MantidWidgets::FitDomainIndex | domainIndex | ) |
Definition at line 235 of file FitScriptGeneratorDataTable.cpp.
References m_selectedRows, selectedRows(), updateVerticalHeaders(), and MantidQt::MantidWidgets::IndexType< Class >::value.
| void MantidQt::MantidWidgets::FitScriptGeneratorDataTable::renameWorkspace | ( | QString const & | workspaceName, |
| QString const & | newName | ||
| ) |
Definition at line 227 of file FitScriptGeneratorDataTable.cpp.
References workspaceName().
| void MantidQt::MantidWidgets::FitScriptGeneratorDataTable::resetSelection | ( | ) |
Definition at line 285 of file FitScriptGeneratorDataTable.cpp.
References m_selectedValue, and setSelectedXValue().
| QString MantidQt::MantidWidgets::FitScriptGeneratorDataTable::selectedDomainFunctionPrefix | ( | ) | const |
Definition at line 220 of file FitScriptGeneratorDataTable.cpp.
References selectedRows(), and value.
| std::vector< FitDomainIndex > MantidQt::MantidWidgets::FitScriptGeneratorDataTable::selectedRows | ( | ) | const |
Definition at line 195 of file FitScriptGeneratorDataTable.cpp.
References selectedRows().
Referenced by currentRow(), handleItemClicked(), handleItemSelectionChanged(), removeDomain(), selectedDomainFunctionPrefix(), and selectedRows().
| void MantidQt::MantidWidgets::FitScriptGeneratorDataTable::setFunctionPrefixVisible | ( | bool | visible | ) |
Definition at line 287 of file FitScriptGeneratorDataTable.cpp.
|
private |
Definition at line 291 of file FitScriptGeneratorDataTable.cpp.
References m_selectedColumn, m_selectedRows, and value.
Referenced by formatSelection(), and resetSelection().
| double MantidQt::MantidWidgets::FitScriptGeneratorDataTable::startX | ( | FitDomainIndex | row | ) | const |
Definition at line 177 of file FitScriptGeneratorDataTable.cpp.
References getText().
Referenced by addDomain().
|
private |
Definition at line 270 of file FitScriptGeneratorDataTable.cpp.
Referenced by removeDomain().
| MantidWidgets::WorkspaceIndex MantidQt::MantidWidgets::FitScriptGeneratorDataTable::workspaceIndex | ( | FitDomainIndex | row | ) | const |
Definition at line 173 of file FitScriptGeneratorDataTable.cpp.
References getText().
Referenced by addDomain().
| std::string MantidQt::MantidWidgets::FitScriptGeneratorDataTable::workspaceName | ( | FitDomainIndex | row | ) | const |
Definition at line 169 of file FitScriptGeneratorDataTable.cpp.
References getText().
Referenced by addDomain(), and renameWorkspace().
|
private |
Definition at line 90 of file FitScriptGeneratorDataTable.h.
Referenced by eventFilter(), and hoveredRowIndex().
|
private |
Definition at line 88 of file FitScriptGeneratorDataTable.h.
Referenced by formatSelection(), handleItemClicked(), and setSelectedXValue().
|
private |
Definition at line 87 of file FitScriptGeneratorDataTable.h.
Referenced by addDomain(), formatSelection(), handleItemClicked(), handleItemSelectionChanged(), removeDomain(), and setSelectedXValue().
|
private |
Definition at line 89 of file FitScriptGeneratorDataTable.h.
Referenced by handleItemClicked(), and resetSelection().