6#include <iattr/CAttributesManager.h>
7#include <ilog/TLoggerCompWrap.h>
8#include <imod/TModelWrap.h>
11#include <imtbase/ISelection.h>
12#include <imtbase/TModelUpdateBinder.h>
13#include <imtdev/IDeviceController.h>
84 typedef ilog::CLoggerComponentBase BaseClass;
87 I_REGISTER_INTERFACE(iattr::IAttributesManager);
88 I_REGISTER_SUBELEMENT(StaticAttributes)
89 I_REGISTER_SUBELEMENT_INTERFACE(StaticAttributes, iattr::IAttributesProvider, ExtractStaticAttributes);
90 I_REGISTER_SUBELEMENT_INTERFACE(StaticAttributes, imod::IModel, ExtractStaticAttributes);
91 I_REGISTER_SUBELEMENT_INTERFACE(StaticAttributes, istd::IChangeable, ExtractStaticAttributes);
92 I_REGISTER_SUBELEMENT(InstanceAttributes)
93 I_REGISTER_SUBELEMENT_INTERFACE(InstanceAttributes, iattr::IAttributesProvider, ExtractInstanceAttributes);
94 I_REGISTER_SUBELEMENT_INTERFACE(InstanceAttributes, imod::IModel, ExtractInstanceAttributes);
95 I_REGISTER_SUBELEMENT_INTERFACE(InstanceAttributes, istd::IChangeable, ExtractInstanceAttributes);
96 I_ASSIGN(m_selectionCompPtr,
"DeviceSelection",
"ID of the selected device",
false,
"DeviceSelection");
97 I_ASSIGN(m_controllerCompPtr,
"DeviceController",
"Device controller",
false,
"DeviceController");
98 I_ASSIGN(m_stateProviderCompPtr,
"DeviceStateProvider",
"Device state provider",
false,
"DeviceStateProvider");
105 void OnComponentCreated()
override;
106 void OnComponentDestroyed()
override;
109 DeviceInstancePtr GetDeviceInstance(
const QByteArray& deviceId)
const;
112 void OnSelectionChanged(
const istd::IChangeable::ChangeSet& changeSet,
const imtbase::ISelection* objectPtr);
113 void OnDeviceStateChanged(
const istd::IChangeable::ChangeSet& changeSet,
const IDeviceStateProvider* objectPtr);
114 void OnInstanceAttributesChanged(
const istd::IChangeable::ChangeSet& changeSet,
const iattr::IAttributesProvider* objectPtr);
116 template<
class Interface>
119 return dynamic_cast<Interface*
>(&parent.m_staticAttributes);
122 template<
class Interface>
125 return dynamic_cast<Interface*
>(&parent.m_instanceAttributes);
133 imod::TModelWrap<iattr::CAttributesManager> m_staticAttributes;
134 imod::TModelWrap<iattr::CAttributesManager> m_instanceAttributes;
140 bool m_isConfigurationStoreBlocked =
false;
Selection-based device attributes component.
Common interface for controlling devices.
Interface for tracking device connection states.