7 #include "scene2D/adaptor/SViewportUpdater.hpp" 9 #include <fwRenderQt/data/Viewport.hpp> 10 #include <fwRenderQt/Scene2DGraphicsView.hpp> 12 #include <fwServices/macros.hpp> 21 static const ::fwServices::IService::KeyType s_VIEWPORT_INPUT =
"viewport";
23 SViewportUpdater::SViewportUpdater() noexcept
29 SViewportUpdater::~SViewportUpdater() noexcept
57 ::fwRenderQt::data::Viewport::sptr sceneViewport = this->
getScene2DRender()->getViewport();
58 ::fwRenderQt::data::Viewport::csptr viewportObject =
59 this->getInput< ::fwRenderQt::data::Viewport>(s_VIEWPORT_INPUT);
67 sceneViewport->setX( pairCoord.first );
68 sceneViewport->setY( pairCoord.second );
69 sceneViewport->setWidth( pairSize.first );
70 sceneViewport->setHeight( viewportObject->getHeight() );
SCENE2D_API void processInteraction(::fwRenderQt::data::Event &_event) override
Root class for all scene2d adaptors.
::fwRenderQt::data::Axis::sptr m_xAxis
The x Axis.
This class is a helper to define the connections of a service and its data.
SCENE2D_API void starting() override
Initialize the service activity.
Adaptor implementation that manages the camera on the view (by updating the viewport object)...
FWRENDERQT_API Point2DType mapAdaptorToScene(const Point2DType &_xy, const ::fwRenderQt::data::Axis::sptr &_xAxis, const ::fwRenderQt::data::Axis::sptr &_yAxis) const
SCENE2D_API void configuring() override
Configure the service before starting. Apply the configuration to service.
FWRENDERQT_API std::shared_ptr< ::fwRenderQt::SRender > getScene2DRender() const
Get the render that manages the IAdaptor.
SCENE2D_API KeyConnectionsMap getAutoConnections() const override
Returns proposals to connect service slots to associated objects signals, this method is used for obj...
std::pair< double, double > Point2DType
Point2D coordinate <X, Y>
This bundles contains data and services used to display a 2D Qt scene.
SCENE2D_API void stopping() override
Uninitialize the service activity. The stop() method is always invoked before destroying a service...
::fwRenderQt::data::Axis::sptr m_yAxis
The y Axis.
FWRENDERQT_API void configureParams()
Parse the xml configuration for Axis, z value and opacity.
static FWDATA_APIconst::fwCom::Signals::SignalKeyType s_MODIFIED_SIG
Key in m_signals map of signal m_sigModified.
SCENE2D_API void updating() override
Perform some computations according to object (this service is attached to) attribute values and its ...
This class manage events on the scene 2D (mouse event, keyboard event , ...).
static FWSERVICES_APIconst::fwCom::Slots::SlotKeyType s_UPDATE_SLOT
Slot to call start method.