6#include <icomp/CComponentBase.h>
9#include <imtbase/CSelection.h>
17 public icomp::CComponentBase,
21 typedef icomp::CComponentBase BaseClass;
23 enum AutoSelectionMode
32 I_BEGIN_COMPONENT(CSelectionComp);
33 I_REGISTER_INTERFACE(ISelection);
34 I_REGISTER_INTERFACE(iser::ISerializable);
35 I_ASSIGN(m_constraintsCompPtr,
"Constraints",
"Selection constraints",
false,
"");
36 I_ASSIGN(m_initialSelectionModeAttrPtr,
"SelectionMode",
"Initial selection mode\n0 - SM_SINGLE\n1 - SM_MULTI",
true, 0);
37 I_ASSIGN(m_autoSelectioModeAttrPtr,
"AutoSelectionMode",
"Automatic selection mode when changing constraints.\n0 - Do nothing\n1 - Select all\n2 - Clear selection\n3 - Set predefined IDs\n4 - Unselect missing IDs",
true, 0);
38 I_ASSIGN_MULTI_0(m_initialSelectionIdsAttrPtr,
"InitialSelectionIds",
"Predefined IDs for initial selection",
false);
39 I_ASSIGN_MULTI_0(m_autoSelectionIdsAttrPtr,
"AutoSelectionIds",
"Predefined IDs for auto selection mode 3",
false);
44 virtual void OnConstraintsUpdated(
const istd::IChangeable::ChangeSet& changeset,
const ICollectionInfo* modelPtr)
override;
47 virtual void OnComponentCreated()
override;
48 virtual void OnComponentDestroyed()
override;
51 I_REF(ICollectionInfo, m_constraintsCompPtr);
52 I_ATTR(
int, m_initialSelectionModeAttrPtr);
53 I_ATTR(
int, m_autoSelectioModeAttrPtr);
54 I_MULTIATTR(QByteArray, m_initialSelectionIdsAttrPtr);
55 I_MULTIATTR(QByteArray, m_autoSelectionIdsAttrPtr);
57 ICollectionInfo::Ids m_lastConstraints;