BornAgain
1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Holds a graphics scene to draw projections on top of ColorMap. More...
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=0) | |
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 |
SessionItem * | m_liveProjection |
temporary projection item matching mouse move More... | |
SessionModel * | m_model |
MaskGraphicsScene * | m_scene |
PlotStatusLabel * | m_statusLabel |
MaskGraphicsView * | m_view |
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.
ProjectionsEditorCanvas::ProjectionsEditorCanvas | ( | QWidget * | parent = 0 | ) |
Definition at line 27 of file ProjectionsEditorCanvas.cpp.
References changeActivityRequest(), MaskGraphicsView::changeActivityRequest(), deleteSelectedRequest(), MaskGraphicsView::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 145 of file ProjectionsEditorCanvas.cpp.
References getScene(), m_currentActivity, MaskGraphicsScene::onActivityModeChanged(), and onLeavingColorMap().
Referenced by ProjectionsEditor::setup_connections().
|
slot |
Definition at line 85 of file ProjectionsEditorCanvas.cpp.
References MaskEditorFlags::HORIZONTAL_LINE_MODE, SessionModel::insertItem(), m_block_update, m_containerIndex, m_currentActivity, m_liveProjection, m_model, MaskItem::P_IS_VISIBLE, SessionItem::setItemValue(), and MaskEditorFlags::VERTICAL_LINE_MODE.
Referenced by setConnected().
|
slot |
Definition at line 105 of file ProjectionsEditorCanvas.cpp.
References m_block_update, m_liveProjection, SessionItem::parent(), SessionItem::rowOfChild(), and SessionItem::takeRow().
Referenced by onActivityModeChanged(), and setConnected().
|
slot |
Definition at line 122 of file ProjectionsEditorCanvas.cpp.
References MaskEditorFlags::HORIZONTAL_LINE_MODE, m_block_update, m_currentActivity, m_liveProjection, VerticalLineItem::P_POSX, HorizontalLineItem::P_POSY, SessionItem::setItemValue(), and MaskEditorFlags::VERTICAL_LINE_MODE.
Referenced by setConnected().
|
slot |
Definition at line 139 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 71 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 152 of file ProjectionsEditorCanvas.cpp.
References PlotStatusLabel::addPlot(), ASSERT, m_colorMap, m_statusLabel, PlotStatusLabel::reset(), and setConnected().
Referenced by setContext().
|
private |
Definition at line 164 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 55 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 80 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().