ACF $AcfVersion:0$
CNameParamComp.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-2.1-or-later OR GPL-2.0-or-later OR GPL-3.0-or-later OR LicenseRef-ACF-Commercial
2#pragma once
3
4
5// ACF includes
7
8#include <iprm/CNameParam.h>
9
10
11namespace iprm
12{
13
14
20 public iprm::CNameParam
21{
22public:
25
26 I_BEGIN_COMPONENT(CNameParamComp);
27 I_REGISTER_INTERFACE(iprm::INameParam);
28 I_REGISTER_INTERFACE(iser::ISerializable);
29 I_REGISTER_INTERFACE(istd::IChangeable);
30 I_ASSIGN(m_defaultNameAttrPtr, "DefaultName", "Default name", false, "");
31 I_ASSIGN(m_isNameFixedAttrPtr, "IsNameFixed", "When enabled, the name is fixed and cannot be changed during run tume", true, false);
32 I_END_COMPONENT;
33
34 // reimplemented (iprm::INameParam)
35 virtual void SetName(const QString& name) override;
36 virtual bool IsNameFixed() const override;
37
38protected:
39 // reimplemented (icomp::CComponentBase)
40 virtual void OnComponentCreated() override;
41
42private:
43 I_TEXTATTR(m_defaultNameAttrPtr);
44 I_ATTR(bool, m_isNameFixedAttrPtr);
45};
46
47
48} // namespace iprm
49
50
51
52
Base class for component implementation.
Component for automatic creation of the Universally Unique Identifier (UUID)
virtual void SetName(const QString &name) override
Set the object name.
iprm::CNameParam BaseClass2
virtual bool IsNameFixed() const override
Return true if the name is fixed (non-editable).
icomp::CComponentBase BaseClass
virtual void OnComponentCreated() override
Implementation of a named object over iprm::INameParam interface.
Definition CNameParam.h:17
Interface for an object containing a name.
Definition INameParam.h:67
Common class for all classes which objects can be archived or restored from archive.
Common interface for data model objects, which can be changed.
Definition IChangeable.h:28
#define I_TEXTATTR(member)
Declare translatable text attribute member.
Contains interfaces and implementations of flexible parameter concept.