ACF $AcfVersion:0$
COptionsManagerGuiComp.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// Qt includes
6#include <QtCore/QtGlobal>
7#if QT_VERSION >= 0x050000
8#include <QtWidgets/QComboBox>
9#else
10#include <QtGui/QComboBox>
11#endif
12
13
14// ACF includes
15#include <istd/TPointerVector.h>
21#include <GeneratedFiles/iqtprm/ui_COptionsManagerGuiComp.h>
22
23
24namespace iqtprm
25{
26
27
33 Ui::COptionsManagerGuiComp, iprm::IOptionsManager>,
35{
36 Q_OBJECT
37
38public:
40 Ui::COptionsManagerGuiComp, iprm::IOptionsManager> BaseClass;
41
46 {
51
55 LP_TOP
56 };
57
58 I_BEGIN_COMPONENT(COptionsManagerGuiComp);
59 I_ASSIGN(m_optionsLabelAttrPtr, "OptionsLabel", "Command label for the options selector", false, "Select");
60 I_ASSIGN(m_infoLabelAttrPtr, "InfoLabel", "Information label for the options selector", false, "Info");
61 I_ASSIGN(m_infoIconProviderCompPtr, "InfoIconProvider", "Provider of the info icon", false, "InfoIconProvider");
62 I_ASSIGN(m_iconSizeAttrPtr, "IconSize", "Size of the used icons", false, 32);
63 I_ASSIGN(m_labelPositionAttrPtr, "LabelPosition", "Selection label position. 0 - Left from the selector,\n1 - On top of the selector", false, LP_LEFT);
64 I_END_COMPONENT;
65
67
68protected:
69 // reimplemented (iqtgui::TGuiObserverWrap)
70 virtual void OnGuiModelAttached() override;
71 virtual void OnGuiModelDetached() override;
72 virtual void UpdateModel() const override;
73 virtual void UpdateGui(const istd::IChangeable::ChangeSet& changeSet) override;
74
75 // reimplemented (iqtgui::CGuiComponentBase)
76 virtual void OnGuiCreated() override;
77 virtual void OnGuiDestroyed() override;
78 virtual void OnGuiShown() override;
79 virtual void OnGuiRetranslate() override;
80
81 // reimplemented (imod::CMultiModelDispatcherBase)
82 virtual void OnModelChanged(int modelId, const istd::IChangeable::ChangeSet& changeSet) override;
83
84protected Q_SLOTS:
85 void OnSelectionChanged(int index);
87 void OnTextEdited(const QString& text);
88 void OnTextChanged(const QString& text);
89
90private:
91 void UpdateComboBox();
92 void UpdateDescriptionFrame();
93
94private:
95 I_TEXTATTR(m_optionsLabelAttrPtr);
96 I_TEXTATTR(m_infoLabelAttrPtr);
97 I_ATTR(int, m_labelPositionAttrPtr);
98 I_ATTR(int, m_iconSizeAttrPtr);
99 I_REF(iqtgui::IIconProvider, m_infoIconProviderCompPtr);
100
104 bool m_isEditingFlag;
105 istd::TDelPtr<QLabel> m_selectorLabelPtr;
106
107 bool m_isUpdateBlocked;
108};
109
110
111} // namespace iqtprm
112
113
114
115
Generic implementation of a data model changes notifier.
Common interface for the management of dynamic selection constraints.
This interface provides acces to an icon.
Base class for all Qt GUI components.
Simple editor for an exclusive option selection.
void OnTextChanged(const QString &text)
void OnTextEdited(const QString &text)
virtual void OnGuiModelAttached() override
iqtgui::TDesignerGuiObserverCompBase< Ui::COptionsManagerGuiComp, iprm::IOptionsManager > BaseClass
virtual void UpdateGui(const istd::IChangeable::ChangeSet &changeSet) override
virtual void OnGuiModelDetached() override
virtual void OnModelChanged(int modelId, const istd::IChangeable::ChangeSet &changeSet) override
Called when some model observed by dispatcher will be changed.
virtual void UpdateModel() const override
void OnSelectionChanged(int index)
virtual void OnGuiRetranslate() override
virtual void OnGuiDestroyed() override
virtual void OnGuiCreated() override
virtual void OnGuiShown() override
Set of change flags (its IDs).
Definition IChangeable.h:36
Pointer wrapper providing automatic deleting pointed object during destruction.
Definition TDelPtr.h:21
#define I_TEXTATTR(member)
Declare translatable text attribute member.
This package contains Qt based implementations of standard parameter components.