ImagingTools Core SDK
CGuiElementRepresentationControllerComp.h
1// SPDX-License-Identifier: LGPL-2.1-or-later OR GPL-2.0-or-later OR GPL-3.0-or-later OR LicenseRef-ImtCore-Commercial
2#pragma once
3
4
5// ImtCore includes
6#include <imtserverapp/CObjectRepresentationControllerCompBase.h>
7#include <imtserverapp/CCommandRepresentationController.h>
8#include <imtserverapp/IGuiElementModel.h>
9
10
11namespace imtserverapp
12{
13
14
15class CGuiElementRepresentationControllerComp: public imtserverapp::CObjectRepresentationControllerCompBase
16{
17public:
18 typedef imtserverapp::CObjectRepresentationControllerCompBase BaseClass;
19
20 I_BEGIN_COMPONENT(CGuiElementRepresentationControllerComp)
21 I_END_COMPONENT;
22
23protected:
24 virtual bool SetupItemModel(const imtserverapp::IGuiElementModel& guiElementModel, QJsonObject& representation, const iprm::IParamsSet* paramsPtr) const;
25
26 // reimplemented (imtserverapp::CObjectRepresentationControllerCompBase)
27 virtual bool GetRepresentationFromValue(const istd::IChangeable& dataModel, QJsonObject& representation, const iprm::IParamsSet* paramsPtr = nullptr) const override;
28
29 // reimplemented (IRepresentationController)
30 virtual bool IsModelSupported(const istd::IChangeable& dataModel) const override;
31 virtual bool GetDataModelFromRepresentation(const QJsonObject& representation, istd::IChangeable& dataModel) const override;
32
33 // reimplemented (icomp::CComponentBase)
34 virtual void OnComponentCreated() override;
35
36private:
37 istd::TSmartPtr<imtserverapp::CCommandRepresentationController> m_commandRepresentationControllerPtr;
38};
39
40
41} // namespace imtbase
42