BornAgain
1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Establish communication between QCPColorMap and ColorMapItem. More...
Classes | |
struct | ColorMapPlotControllerImpl |
Public Member Functions | |
ColorMapPlotController (QCustomPlot *plot, QCPColorScale *color_scale=nullptr) | |
~ColorMapPlotController () override | |
ColorMapItem * | currentItem () const |
void | setItem (SessionItem *item) |
void | setOnAboutToRemoveItem (Callbacks::item_tagrow_t f) |
void | setOnChildPropertyChange (Callbacks::item_str_t f) |
Sets callback to be notified on item's children property change. More... | |
void | setOnDataChange (Callbacks::item_int_t f) |
Sets callback to be notified on item's data change. More... | |
void | setOnItemDestroy (Callbacks::item_t f) |
void | setOnItemInserted (Callbacks::item_tagrow_t f) |
Sets callback to be notified on child insertion. More... | |
void | setOnItemRemoved (Callbacks::item_tagrow_t f) |
Sets callback to be notified on child removal. More... | |
void | setOnPropertyChange (Callbacks::item_str_t f) |
Sets callback to be notified on item's property change. More... | |
Protected Member Functions | |
SessionItem * | item () const |
For necessary manipulations on unsubscription. More... | |
void | subscribe () override |
void | unsubscribe () override |
For necessary manipulations on new item. More... | |
Private Member Functions | |
void | unsubscribe_from_current () |
Private Attributes | |
SessionItem * | m_item {nullptr} |
std::unique_ptr< ColorMapPlotControllerImpl > | p_impl |
Establish communication between QCPColorMap and ColorMapItem.
Provide update on QCPColorMap when ColorMapItem is changed. QCPColorMap is added to QCustomPlot plottables, when controller is created, and removed from plottables, when controller is destroyed.
Definition at line 34 of file colormapplotcontroller.h.
|
explicit |
Definition at line 102 of file colormapplotcontroller.cpp.
|
overridedefault |
|
inlineinherited |
Definition at line 28 of file itemlistener.h.
|
protectedinherited |
For necessary manipulations on unsubscription.
Sets callback to be notified when row is about to be removed.
Callback will be called with (compound_item, tagrow). For MultiLayer containing the T_LAYERS tag, the signal will be triggered on layer deletion with (multilayer*, {T_LAYER, row}) as callback parameters.
Definition at line 112 of file itemlistenerbase.cpp.
Referenced by ModelView::ItemListenerBase::ItemListenerBase(), ModelView::ItemListener< T >::currentItem(), ModelView::Data1DPlotController::Data1DPlotControllerImpl::initGraphFromItem(), ModelView::ViewportAxisPlotController::AxesPlotControllerImpl::setConnected(), ModelView::PenController::PenControllerImpl::update_graph_from_item(), ModelView::AxisTitleController::AxisTitleControllerImpl::updateAxisFromItem(), ModelView::Data1DPlotController::Data1DPlotControllerImpl::updateErrorBarsFromItem(), ModelView::Data1DPlotController::Data1DPlotControllerImpl::updateGraphPointsFromItem(), ModelView::ViewportAxisPlotController::AxesPlotControllerImpl::updateLowerRange(), and ModelView::ViewportAxisPlotController::AxesPlotControllerImpl::updateUpperRange().
|
inherited |
Definition at line 30 of file itemlistenerbase.cpp.
Referenced by ModelView::ItemListenerBase::ItemListenerBase(), and TEST_F().
|
inherited |
Definition at line 102 of file itemlistenerbase.cpp.
Referenced by ModelView::GraphViewportPlotController::subscribe().
|
inherited |
Sets callback to be notified on item's children property change.
Callback will be called with (compound_item, property_name). For MultiLayer containing the layer with "thickness" property, the signal will be triggered on thickness change using (layeritem*, "thickness") as callback parameters.
Definition at line 77 of file itemlistenerbase.cpp.
|
inherited |
Sets callback to be notified on item's data change.
Callback will be called with (SessionItem*, data_role).
Definition at line 59 of file itemlistenerbase.cpp.
Referenced by ModelView::Data2DPlotController::subscribe().
|
inherited |
Definition at line 51 of file itemlistenerbase.cpp.
|
inherited |
Sets callback to be notified on child insertion.
Callback will be called with (compound_item, tag, row). For MultiLayer containing the T_LAYERS tag, the signal will be triggered on layer insertion with (multilayer*, {T_LAYER, row}) as callback parameters.
Definition at line 87 of file itemlistenerbase.cpp.
Referenced by ModelView::ColorMapViewportPlotController::subscribe(), and ModelView::GraphViewportPlotController::subscribe().
|
inherited |
Sets callback to be notified on child removal.
Callback will be called with (compound_item, tag, row). For MultiLayer containing the T_LAYERS tag, the signal will be triggered on layer removal with (multilayer*, {T_LAYER, oldrow}) as callback parameters.
Definition at line 97 of file itemlistenerbase.cpp.
|
inherited |
Sets callback to be notified on item's property change.
Callback will be called with (compound_item, property_name).
Definition at line 67 of file itemlistenerbase.cpp.
Referenced by ModelView::AxisTitleController::subscribe(), subscribe(), ModelView::ColorScalePlotController::subscribe(), ModelView::Data1DPlotController::subscribe(), ModelView::GraphPlotController::subscribe(), ModelView::PenController::subscribe(), and ModelView::ViewportAxisPlotController::subscribe().
|
overrideprotectedvirtual |
Reimplemented from ModelView::ItemListenerBase.
Definition at line 107 of file colormapplotcontroller.cpp.
References ModelView::ColorMapItem::P_GRADIENT, p_impl, ModelView::ColorMapItem::P_INTERPOLATION, ModelView::ColorMapItem::P_LINK, and ModelView::ItemListenerBase::setOnPropertyChange().
|
overrideprotectedvirtual |
For necessary manipulations on new item.
Reimplemented from ModelView::ItemListenerBase.
Definition at line 126 of file colormapplotcontroller.cpp.
References p_impl.
|
privateinherited |
Definition at line 117 of file itemlistenerbase.cpp.
|
privateinherited |
Definition at line 56 of file itemlistenerbase.h.
|
private |
Definition at line 45 of file colormapplotcontroller.h.
Referenced by subscribe(), and unsubscribe().