ACF $AcfVersion:0$
COptionsManagerEditorComp.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/QMenu>
9#else
10#include <QtGui/QMenu>
11#endif
12
13// ACF includes
17
18#include <GeneratedFiles/iqtprm/ui_COptionsManagerEditorComp.h>
19
20
21namespace iqtprm
22{
23
24
26 Ui::COptionsManagerEditorComp,
27 iprm::IOptionsManager>
28{
29 Q_OBJECT
30
31public:
33 Ui::COptionsManagerEditorComp,
35
36 I_BEGIN_COMPONENT(COptionsManagerEditorComp);
37 I_ASSIGN(m_allowAddRemoveAttrPtr, "AllowAddRemove", "If it is false, 'Add' and 'Remove' buttons will be always hidden", true, true);
38 I_ASSIGN(m_allowUpDownAttrPtr, "AllowUpDown", "If it is false, 'Up' and 'Down' buttons will be always hidden", true, true);
39 I_ASSIGN(m_iconSizeAttrPtr, "IconSize", "Size for page icons", false, 32);
40 I_ASSIGN(m_defaultOptionNameAttrPtr, "DefaultOptionName", "Default name of parameter set. Use %1 to insert automatic enumeration", true, "Option %1");
41 I_ASSIGN(m_paramsLoaderCompPtr, "ParamsLoader", "Loader for the parameter set", false, "ParamsLoader");
42 I_END_COMPONENT;
43
45
46protected Q_SLOTS:
52 void on_OptionsList_itemChanged(QListWidgetItem* item);
55
56protected:
58 void UpdateList();
59 int GetSelectedIndex() const;
61 QByteArray GetSelectedParamsSetTypeId() const;
62
63 QString CalculateNewDefaultName() const;
64
65 // reimplemented (iqtgui::TGuiObserverWrap)
66 virtual void OnGuiModelAttached() override;
67 virtual void OnGuiModelDetached() override;
68 virtual void UpdateGui(const istd::IChangeable::ChangeSet& changeSet) override;
69
70 // reimplemented (iqtgui::CComponentBase)
71 virtual void OnGuiCreated() override;
72
73private:
74 void UpdateButtonsVisibility();
75
76private:
77 I_ATTR(bool, m_allowAddRemoveAttrPtr);
78 I_ATTR(bool, m_allowUpDownAttrPtr);
79 I_ATTR(int, m_iconSizeAttrPtr);
80 I_TEXTATTR(m_defaultOptionNameAttrPtr);
81 I_REF(ifile::IFilePersistence, m_paramsLoaderCompPtr);
82
83 mutable int m_lastSelectedIndex;
84};
85
86
87} // namespace iqtprm
88
89
90
91
Interface providing loading and saving of data objects.
Common interface for the management of dynamic selection constraints.
Base class for all Qt GUI components.
virtual void OnGuiModelDetached() override
virtual void OnGuiCreated() override
virtual void UpdateGui(const istd::IChangeable::ChangeSet &changeSet) override
iqtgui::TDesignerGuiObserverCompBase< Ui::COptionsManagerEditorComp, iprm::IOptionsManager > BaseClass
QByteArray GetSelectedParamsSetTypeId() const
QString CalculateNewDefaultName() const
virtual void OnGuiModelAttached() override
void on_OptionsList_itemChanged(QListWidgetItem *item)
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.