16#include <adtfui/adtf_ui.h>
17#include <adtfucom3/adtf_ucom3.h>
69 QWidget* pWidget =
new QWidget;
70 pWidget->setLayout(
new QVBoxLayout);
90 RETURN_IF_FAILED(GetSceneGraph().GetObject(
m_pViewer));
103 const adtf::ucom::ant::iobject_ptr<const adtf::streaming::ant::ISample>& pSample)
override
106 if (IS_OK(GetScene(pReader, &pScene)))
108 RETURN_IF_FAILED(UpdateScene(pScene, pSample));
194 QGroupBox* pSelectedGroup =
new QGroupBox(
"Selected Object");
195 pWidget->layout()->addWidget(pSelectedGroup);
196 pWidget->layout()->addItem(
new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Expanding));
197 QGridLayout* pGrid =
new QGridLayout;
198 pSelectedGroup->setLayout(pGrid);
202 pGrid->addWidget(
new QLabel(
"Scene:"), nRow, 0);
207 pGrid->addWidget(
new QLabel(
"Id:"), nRow, 0);
212 pGrid->addWidget(
new QLabel(
"Position:"), nRow, 0);
217 pGrid->addWidget(
new QLabel(
"Rotation:"), nRow, 0);
222 pGrid->addWidget(
new QLabel(
"Dimensions:"), nRow, 0);
227 pGrid->addWidget(
new QLabel(
"Motion Vector:"), nRow, 0);
247 const tChar* strFormat =
"%.3f / %.3f / %.3f";
249 m_pPositionLabel->setText(adtf_util::cString::Format(strFormat, vTmp.x(), vTmp.y(), vTmp.z()).GetPtr());
251 m_pRotationLabel->setText(adtf_util::cString::Format(strFormat, vTmp.x(), vTmp.y(), vTmp.z()).GetPtr());
253 m_pDimLabel->setText(adtf_util::cString::Format(strFormat, vTmp.x(), vTmp.y(), vTmp.z()).GetPtr());
255 m_pMotionLabel->setText(adtf_util::cString::Format(strFormat, vTmp.x(), vTmp.y(), vTmp.z()).GetPtr());
Copyright © Audi Electronics Venture GmbH.
cBaseObjectSelectionMixin()
Constructor.
Base class for objects that can be managed with cBaseObjectScene.
osg::Vec3d GetMotion()
Returns the current motion vector.
osg::Vec3d GetRotation()
Returns the current rotation.
tUInt32 GetId()
Returns the id of the object.
osg::Vec3d GetSize()
Returns the current size.
virtual tResult SetSelected(tBool bSelected)
Gives the object a chance to change its appearance when being selected or unselected.
osg::Vec3d GetPosition()
Returns the current position.
Base class for managing a scene of objects.
virtual const tChar * GetName()
Returns the name of the scene.
cQtWindow Base class for object mixins.
tResult OnIdle() override
Handle a an idle event.
tResult ProcessInput(adtf::streaming::flash::ISampleReader *pReader, const adtf::ucom::ant::iobject_ptr< const adtf::streaming::ant::ISample > &pSample) override
Process input override.
tBool m_bHadSelection
Used to remember whether we had a selection during the last idle call.
QWidget * CreateView() override
Creates the view with the XService.
QLabel * m_pPositionLabel
Pointer to the position label.
adtf::ucom::ant::object_ptr< IViewer > m_pViewer
pointer to the viewer (used for locking)
osg::ref_ptr< cBaseObject > m_pSelectedObject
Remembers the selected object.
tVoid ReleaseView() override
Releases the view with the XService.
QLabel * m_pSceneLabel
Pointer to the pin label.
QLabel * m_pIdLabel
Pointer to the id label.
QLabel * m_pDimLabel
Pointer to the dimension label.
cBaseObjectSelectionMixin()
Constructor.
virtual tResult UpdateWidgets(cBaseObjectScene *pScene, cBaseObject *pObj)
Updates the Qt widgets based on the currently selected object.
QLabel * m_pMotionLabel
Pointer to the motion vector label.
tResult InitScene() override
Init the scene of this mixin.
virtual void AttachItemsToWidget(QWidget *pWidget)
Creates Qt widgets for displaying data.
osg::ref_ptr< cBaseObjectScene > m_pSelectedScene
remembers the scene that the selected object belongs to.
QLabel * m_pRotationLabel
Pointer to the rotation label.
virtual tResult InitScene()
Impelement this to add your graph elements.
Namespace for functionality provided by the Mixin Library.
Namespace for functionality provided by the Display Toolbox.
Copyright © Audi Electronics Venture GmbH.