BornAgain
1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Holds a graphics scene to draw projections on top of ColorMap. Being a part of ProjectionEditor, provides interaction logic between graphics scene and ProjectionsWidget.
Particularly, it creates temporary ProjectionItem in projection container, when mouse is inside ColorMap viewport.
Definition at line 37 of file ProjectionsEditorCanvas.h.
Public Slots | |
void | onActivityModeChanged (MaskEditorFlags::Activity value) |
void | onEnteringColorMap () |
void | onLeavingColorMap () |
void | onPositionChanged (double x, double y) |
void | onResetViewRequest () |
Signals | |
void | changeActivityRequest (MaskEditorFlags::Activity) |
void | deleteSelectedRequest () |
void | marginsChanged (double left, double right) |
Public Member Functions | |
ProjectionsEditorCanvas (QWidget *parent=nullptr) | |
MaskGraphicsScene * | getScene () |
void | resetContext () |
void | setContext (SessionModel *model, const QModelIndex &shapeContainerIndex, IntensityDataItem *intensityItem) |
void | setSelectionModel (QItemSelectionModel *model) |
Private Member Functions | |
void | setColorMap (ColorMap *colorMap) |
void | setConnected (bool isConnected) |
Private Attributes | |
bool | m_block_update |
ColorMap * | m_colorMap |
QModelIndex | m_containerIndex |
MaskEditorFlags::Activity | m_currentActivity |
IntensityDataItem * | m_intensityDataItem |
MaskItem * | m_liveProjection |
temporary projection item matching mouse move More... | |
SessionModel * | m_model |
MaskGraphicsScene * | m_scene |
PlotStatusLabel * | m_statusLabel |
MaskGraphicsView * | m_view |
ProjectionsEditorCanvas::ProjectionsEditorCanvas | ( | QWidget * | parent = nullptr | ) |
Definition at line 31 of file ProjectionsEditorCanvas.cpp.
References MaskGraphicsView::changeActivityRequest(), changeActivityRequest(), MaskGraphicsView::deleteSelectedRequest(), deleteSelectedRequest(), m_statusLabel, and m_view.
|
signal |
Referenced by ProjectionsEditorCanvas(), and ProjectionsEditor::setup_connections().
|
signal |
Referenced by ProjectionsEditorCanvas(), and ProjectionsEditor::setup_connections().
|
inline |
Definition at line 50 of file ProjectionsEditorCanvas.h.
References m_scene.
Referenced by onActivityModeChanged(), setContext(), and setSelectionModel().
|
signal |
Referenced by setConnected(), and ProjectionsEditor::setup_connections().
|
slot |
Definition at line 147 of file ProjectionsEditorCanvas.cpp.
References getScene(), m_currentActivity, MaskGraphicsScene::onActivityModeChanged(), and onLeavingColorMap().
Referenced by ProjectionsEditor::setup_connections().
|
slot |
Definition at line 89 of file ProjectionsEditorCanvas.cpp.
References MaskEditorFlags::HORIZONTAL_LINE_MODE, SessionModel::insertItem(), m_block_update, m_containerIndex, m_currentActivity, m_liveProjection, m_model, MaskItem::setIsVisibleValue(), and MaskEditorFlags::VERTICAL_LINE_MODE.
Referenced by setConnected().
|
slot |
Definition at line 107 of file ProjectionsEditorCanvas.cpp.
References m_block_update, m_liveProjection, SessionItem::parentItem(), SessionItem::rowOfChild(), and SessionItem::takeRow().
Referenced by onActivityModeChanged(), and setConnected().
|
slot |
Definition at line 124 of file ProjectionsEditorCanvas.cpp.
References MaskEditorFlags::HORIZONTAL_LINE_MODE, m_block_update, m_currentActivity, m_liveProjection, and MaskEditorFlags::VERTICAL_LINE_MODE.
Referenced by setConnected().
|
slot |
Definition at line 141 of file ProjectionsEditorCanvas.cpp.
References m_intensityDataItem, m_view, MaskGraphicsView::onResetViewRequest(), and IntensityDataItem::resetView().
Referenced by ProjectionsEditor::setup_connections().
void ProjectionsEditorCanvas::resetContext | ( | ) |
Definition at line 75 of file ProjectionsEditorCanvas.cpp.
References m_colorMap, m_containerIndex, m_intensityDataItem, m_scene, MaskGraphicsScene::resetContext(), and setConnected().
Referenced by ProjectionsEditor::resetContext().
|
private |
Definition at line 154 of file ProjectionsEditorCanvas.cpp.
References PlotStatusLabel::addPlot(), m_colorMap, m_statusLabel, PlotStatusLabel::reset(), and setConnected().
Referenced by setContext().
|
private |
Definition at line 166 of file ProjectionsEditorCanvas.cpp.
References ScientificPlotEvent::enteringPlot(), ScientificPlotEvent::leavingPlot(), m_colorMap, ColorMap::marginsChanged(), marginsChanged(), onEnteringColorMap(), onLeavingColorMap(), onPositionChanged(), ScientificPlot::plotEvent(), and ScientificPlotEvent::positionChanged().
Referenced by resetContext(), and setColorMap().
void ProjectionsEditorCanvas::setContext | ( | SessionModel * | model, |
const QModelIndex & | shapeContainerIndex, | ||
IntensityDataItem * | intensityItem | ||
) |
Definition at line 59 of file ProjectionsEditorCanvas.cpp.
References MaskGraphicsScene::colorMap(), getScene(), m_containerIndex, m_currentActivity, m_intensityDataItem, m_model, m_scene, m_view, MaskGraphicsScene::onActivityModeChanged(), setColorMap(), MaskGraphicsScene::setMaskContext(), and MaskGraphicsView::updateSize().
Referenced by ProjectionsEditor::setContext().
void ProjectionsEditorCanvas::setSelectionModel | ( | QItemSelectionModel * | model | ) |
Definition at line 84 of file ProjectionsEditorCanvas.cpp.
References getScene(), and MaskGraphicsScene::setSelectionModel().
Referenced by ProjectionsEditor::setContext().
|
private |
Definition at line 79 of file ProjectionsEditorCanvas.h.
Referenced by onEnteringColorMap(), onLeavingColorMap(), and onPositionChanged().
|
private |
Definition at line 70 of file ProjectionsEditorCanvas.h.
Referenced by resetContext(), setColorMap(), and setConnected().
|
private |
Definition at line 75 of file ProjectionsEditorCanvas.h.
Referenced by onEnteringColorMap(), resetContext(), and setContext().
|
private |
Definition at line 78 of file ProjectionsEditorCanvas.h.
Referenced by onActivityModeChanged(), onEnteringColorMap(), onPositionChanged(), and setContext().
|
private |
Definition at line 76 of file ProjectionsEditorCanvas.h.
Referenced by onResetViewRequest(), resetContext(), and setContext().
|
private |
temporary projection item matching mouse move
Definition at line 73 of file ProjectionsEditorCanvas.h.
Referenced by onEnteringColorMap(), onLeavingColorMap(), and onPositionChanged().
|
private |
Definition at line 74 of file ProjectionsEditorCanvas.h.
Referenced by onEnteringColorMap(), and setContext().
|
private |
Definition at line 68 of file ProjectionsEditorCanvas.h.
Referenced by getScene(), resetContext(), and setContext().
|
private |
Definition at line 71 of file ProjectionsEditorCanvas.h.
Referenced by ProjectionsEditorCanvas(), and setColorMap().
|
private |
Definition at line 69 of file ProjectionsEditorCanvas.h.
Referenced by ProjectionsEditorCanvas(), onResetViewRequest(), and setContext().