BornAgain
1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Actions for ImportDataEditor. More...
Public Slots | |
void | onAddCanvas () |
Create new canvas and append it to the end of canvas container. More... | |
void | onDeleteItem () |
Delete currently selected items. More... | |
void | onImportDialogRequest () |
void | onMergeCanvases () |
Merge selected canvases. All graphs will appear below canvas selected first. More... | |
void | onRedo () |
void | onUndo () |
Signals | |
void | invokeImportDialogRequest () |
Public Member Functions | |
ImportDataEditorActions (ExperimentalDataModel *model, QObject *parent=nullptr) | |
bool | isUndoEnabled () const |
void | setSelectionModel (DataSelectionModel *selection_model) |
Private Slots | |
void | onSelectionChanged (const QItemSelection &selected, const QItemSelection &deselected) |
Processes changed selection. More... | |
Private Member Functions | |
ModelView::UndoStackInterface * | undoStack () const |
Private Attributes | |
ExperimentalDataModel * | m_dataModel {nullptr} |
DataSelectionModel * | m_selectionModel {nullptr} |
Actions for ImportDataEditor.
Definition at line 34 of file importdataeditoractions.h.
gui2::ImportDataEditorActions::ImportDataEditorActions | ( | ExperimentalDataModel * | model, |
QObject * | parent = nullptr |
||
) |
Definition at line 37 of file importdataeditoractions.cpp.
|
signal |
Referenced by onImportDialogRequest(), and gui2::ImportDataEditor::setupConnections().
bool gui2::ImportDataEditorActions::isUndoEnabled | ( | ) | const |
Definition at line 55 of file importdataeditoractions.cpp.
References m_dataModel, and ModelView::SessionModel::undoStack().
Referenced by gui2::ImportDataEditorToolBar::ImportDataEditorToolBar(), onDeleteItem(), onImportDialogRequest(), onMergeCanvases(), onRedo(), and onUndo().
|
slot |
Create new canvas and append it to the end of canvas container.
Definition at line 62 of file importdataeditoractions.cpp.
References gui2::ExperimentalDataModel::addCanvas(), and m_dataModel.
Referenced by gui2::ImportDataEditorToolBar::ImportDataEditorToolBar().
|
slot |
Delete currently selected items.
Definition at line 82 of file importdataeditoractions.cpp.
References ModelView::UndoStackInterface::beginMacro(), ModelView::UndoStackInterface::endMacro(), isUndoEnabled(), m_dataModel, m_selectionModel, gui2::ExperimentalDataModel::removeCanvas(), gui2::ExperimentalDataModel::removeGraph(), gui2::DataSelectionModel::selectedCanvas(), gui2::DataSelectionModel::selectedGraphs(), and undoStack().
Referenced by gui2::ImportDataEditorToolBar::ImportDataEditorToolBar().
|
slot |
Definition at line 113 of file importdataeditoractions.cpp.
References ModelView::UndoStackInterface::beginMacro(), ModelView::UndoStackInterface::endMacro(), invokeImportDialogRequest(), isUndoEnabled(), and undoStack().
Referenced by gui2::ImportDataEditorToolBar::ImportDataEditorToolBar().
|
slot |
Merge selected canvases. All graphs will appear below canvas selected first.
Definition at line 69 of file importdataeditoractions.cpp.
References ModelView::UndoStackInterface::beginMacro(), ModelView::UndoStackInterface::endMacro(), isUndoEnabled(), m_dataModel, m_selectionModel, gui2::ExperimentalDataModel::mergeCanvases(), gui2::DataSelectionModel::selectedCanvas(), and undoStack().
Referenced by gui2::ImportDataEditorToolBar::ImportDataEditorToolBar().
|
slot |
Definition at line 105 of file importdataeditoractions.cpp.
References isUndoEnabled(), m_dataModel, ModelView::UndoStackInterface::redo(), and ModelView::SessionModel::undoStack().
Referenced by gui2::ImportDataEditorToolBar::ImportDataEditorToolBar().
|
privateslot |
Processes changed selection.
Will change line style of selected graph from solid to dashed line.
Definition at line 127 of file importdataeditoractions.cpp.
Referenced by setSelectionModel().
|
slot |
Definition at line 97 of file importdataeditoractions.cpp.
References isUndoEnabled(), m_dataModel, ModelView::UndoStackInterface::undo(), and ModelView::SessionModel::undoStack().
Referenced by gui2::ImportDataEditorToolBar::ImportDataEditorToolBar().
void gui2::ImportDataEditorActions::setSelectionModel | ( | DataSelectionModel * | selection_model | ) |
Definition at line 42 of file importdataeditoractions.cpp.
References m_selectionModel, and onSelectionChanged().
Referenced by gui2::ImportDataEditor::ImportDataEditor().
|
private |
Definition at line 139 of file importdataeditoractions.cpp.
References m_dataModel, and ModelView::SessionModel::undoStack().
Referenced by onDeleteItem(), onImportDialogRequest(), and onMergeCanvases().
|
private |
Definition at line 61 of file importdataeditoractions.h.
Referenced by isUndoEnabled(), onAddCanvas(), onDeleteItem(), onMergeCanvases(), onRedo(), onUndo(), and undoStack().
|
private |
Definition at line 62 of file importdataeditoractions.h.
Referenced by onDeleteItem(), onMergeCanvases(), and setSelectionModel().