BornAgain
1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
The JobSelectorActions class contains actions to run/remove jobs. More...
Public Slots | |
void | equalizeSelectedToJob (int selected_id) |
Puts all IntensityDataItem axes range to the selected job. More... | |
void | onContextMenuRequest (const QPoint &point, const QModelIndex &indexAtPoint={}) |
Generates context menu at given point. More... | |
void | onRemoveJob () |
void | onRunJob () |
Public Member Functions | |
JobSelectorActions (JobModel *jobModel, QObject *parent=0) | |
void | setSelectionModel (QItemSelectionModel *selectionModel) |
Private Member Functions | |
bool | canRemoveJob (const QModelIndex &index) const |
bool | canRunJob (const QModelIndex &index) const |
void | initItemContextMenu (QMenu &menu, const QModelIndex &indexAtPoint) |
void | setAllActionsEnabled (bool value) |
void | setupEqualizeMenu (QMenu &menu) |
Private Attributes | |
JobModel * | m_jobModel |
QAction * | m_removeJobAction |
QAction * | m_runJobAction |
QItemSelectionModel * | m_selectionModel |
The JobSelectorActions class contains actions to run/remove jobs.
Actions are used by the toolbar and JobSelectorList's context menu.
Definition at line 30 of file JobSelectorActions.h.
JobSelectorActions::JobSelectorActions | ( | JobModel * | jobModel, |
QObject * | parent = 0 |
||
) |
Definition at line 26 of file JobSelectorActions.cpp.
References m_removeJobAction, m_runJobAction, onRemoveJob(), and onRunJob().
|
private |
Definition at line 173 of file JobSelectorActions.cpp.
References JobModel::getJobItemForIndex(), JobItem::getStatus(), JobItem::isRunning(), and m_jobModel.
Referenced by initItemContextMenu(), and onRemoveJob().
|
private |
Definition at line 160 of file JobSelectorActions.cpp.
References JobModel::getJobItemForIndex(), JobItem::getStatus(), JobItem::isRunning(), and m_jobModel.
Referenced by initItemContextMenu(), and onRunJob().
|
slot |
Puts all IntensityDataItem axes range to the selected job.
Definition at line 82 of file JobSelectorActions.cpp.
References ASSERT, JobModel::getJobItemForIndex(), IntensityDataItem::getLowerX(), IntensityDataItem::getLowerY(), IntensityDataItem::getLowerZ(), IntensityDataItem::getUpperX(), IntensityDataItem::getUpperY(), IntensityDataItem::getUpperZ(), JobItem::intensityDataItem(), m_jobModel, and m_selectionModel.
Referenced by setupEqualizeMenu().
|
private |
Definition at line 111 of file JobSelectorActions.cpp.
References canRemoveJob(), canRunJob(), m_removeJobAction, m_runJobAction, m_selectionModel, and setupEqualizeMenu().
Referenced by onContextMenuRequest().
|
slot |
Generates context menu at given point.
If indexAtPoint is provided, the actions will be done for corresponding JobItem
Definition at line 72 of file JobSelectorActions.cpp.
References initItemContextMenu(), and setAllActionsEnabled().
Referenced by JobSelectorWidget::JobSelectorWidget().
|
slot |
Definition at line 58 of file JobSelectorActions.cpp.
References canRemoveJob(), m_jobModel, m_selectionModel, and JobModel::removeJob().
Referenced by JobSelectorActions(), and JobSelectorToolBar::JobSelectorToolBar().
|
slot |
Definition at line 49 of file JobSelectorActions.cpp.
References canRunJob(), m_jobModel, m_selectionModel, and JobModel::runJob().
Referenced by JobSelectorActions(), and JobSelectorToolBar::JobSelectorToolBar().
|
private |
Definition at line 154 of file JobSelectorActions.cpp.
References m_removeJobAction, and m_runJobAction.
Referenced by onContextMenuRequest().
void JobSelectorActions::setSelectionModel | ( | QItemSelectionModel * | selectionModel | ) |
Definition at line 44 of file JobSelectorActions.cpp.
References m_selectionModel.
Referenced by JobSelectorWidget::JobSelectorWidget().
|
private |
Definition at line 130 of file JobSelectorActions.cpp.
References equalizeSelectedToJob(), JobModel::getJobItemForIndex(), SessionItem::itemName(), m_jobModel, and m_selectionModel.
Referenced by initItemContextMenu().
|
private |
Definition at line 53 of file JobSelectorActions.h.
Referenced by canRemoveJob(), canRunJob(), equalizeSelectedToJob(), onRemoveJob(), onRunJob(), and setupEqualizeMenu().
|
private |
Definition at line 51 of file JobSelectorActions.h.
Referenced by JobSelectorActions(), initItemContextMenu(), and setAllActionsEnabled().
|
private |
Definition at line 50 of file JobSelectorActions.h.
Referenced by JobSelectorActions(), initItemContextMenu(), and setAllActionsEnabled().
|
private |
Definition at line 52 of file JobSelectorActions.h.
Referenced by equalizeSelectedToJob(), initItemContextMenu(), onRemoveJob(), onRunJob(), setSelectionModel(), and setupEqualizeMenu().