ACF $AcfVersion:0$
CNameParamGuiComp.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
6#include <iprm/INameParam.h>
7
9
10#include <GeneratedFiles/iqtprm/ui_CNameParamGuiComp.h>
11
12
13namespace iqtprm
14{
15
16
18 Ui::CNameParamGuiComp,
19 iprm::INameParam>
20{
21 Q_OBJECT
22
23public:
25 Ui::CNameParamGuiComp,
31 {
36
40 LP_TOP
41 };
42
43 I_BEGIN_COMPONENT(CNameParamGuiComp);
44 I_ASSIGN(m_labelAttrPtr, "Label", "Label for the named object", false, "");
45 I_ASSIGN(m_labelPositionAttrPtr, "LabelPosition", "Selection label position. 0 - Left from the selector,\n1 - On top of the selector", false, LP_LEFT);
46 I_ASSIGN(m_regularExpressionAttrPtr, "InputFilter", "Input filter in form of a regular expression", false, "");
47 I_ASSIGN(m_updateOnEveryChangeAttrPtr, "UpdateOnEveryTextChange", "If set the model will be updated after every text change, else only if Enter pressed or focus lost", true, true);
48 I_END_COMPONENT;
49
50 // reimplemented (iqtgui::TGuiObserverWrap)
51 virtual void UpdateModel() const override;
52 virtual void UpdateGui(const istd::IChangeable::ChangeSet& changeSet) override;
53
54 // reimplemented (iqtgui::CGuiComponentBase)
55 virtual void OnGuiCreated() override;
56
57private Q_SLOTS:
58 void OnNameChanged(const QString& text);
59 void OnNameEdited();
60
61private:
62 I_TEXTATTR(m_labelAttrPtr);
63 I_ATTR(int, m_labelPositionAttrPtr);
64 I_ATTR(QByteArray, m_regularExpressionAttrPtr);
65 I_ATTR(bool, m_updateOnEveryChangeAttrPtr);
66};
67
68
69} // namespace iqtprm
70
71
72
73
Interface for an object containing a name.
Definition INameParam.h:67
Base class for all Qt GUI components.
virtual void OnGuiCreated() override
virtual void UpdateGui(const istd::IChangeable::ChangeSet &changeSet) override
virtual void UpdateModel() const override
LabelPosition
Command label position.
@ LP_LEFT
Left from the name field.
@ LP_TOP
On top of the name field.
iqtgui::TDesignerGuiObserverCompBase< Ui::CNameParamGuiComp, iprm::INameParam > BaseClass
Set of change flags (its IDs).
Definition IChangeable.h:36
#define I_TEXTATTR(member)
Declare translatable text attribute member.
This package contains Qt based implementations of standard parameter components.