7#include <QtCore/QVector>
29 I_ASSIGN_MULTI_0(m_pageNamesAttrPtr,
"Names",
"List of the page titles",
true);
30 I_ASSIGN_MULTI_0(m_pageIdsAttrPtr,
"PageIds",
"List of unique page IDs",
true);
31 I_ASSIGN(m_iconSizeAttrPtr,
"IconSize",
"Size for page icons",
false, 16);
32 I_ASSIGN(m_useHorizontalLayoutAttrPtr,
"UseHorizontalLayout",
"Use horizontal layout",
true,
false);
33 I_ASSIGN(m_useSameStretchingFactorAttrPtr,
"UseSameStretchingFactor",
"Set the same stretching factor for all widgets. Only for group box mode",
false,
false);
34 I_ASSIGN(m_insertSpacerAttrPtr,
"InsertSpacer",
"If enabled, insert spacer after the last page widget",
false,
false);
35 I_ASSIGN(m_lazyPagesInitializationAttrPtr,
"LazyPagesInitialization",
"If enabled, CreateGui for a page will be called only when this page will be selected",
true,
false);
36 I_ASSIGN(m_supressPageTitleAttrPtr,
"SupressPageTitle",
"Supress page title on the container widget",
true,
false);
37 I_ASSIGN(m_defaultPageIndexAttrPtr,
"DefaultStartPageIndex",
"Index of the start page",
true, 0);
38 I_ASSIGN(m_filterWheelEventAttrPtr,
"FilterWheelEvents",
"If true, the container will filter the wheel events for ComboBoxes and SpinBoxes to avoid an accident changing values in them",
true,
true);
43 I_MULTIATTR(QByteArray, m_pageIdsAttrPtr);
44 I_ATTR(
int, m_iconSizeAttrPtr);
45 I_ATTR(
bool, m_useHorizontalLayoutAttrPtr);
46 I_ATTR(
bool, m_useSameStretchingFactorAttrPtr);
47 I_ATTR(
bool, m_insertSpacerAttrPtr);
48 I_ATTR(
bool, m_lazyPagesInitializationAttrPtr);
49 I_ATTR(
bool, m_supressPageTitleAttrPtr);
50 I_ATTR(
int, m_defaultPageIndexAttrPtr);
51 I_ATTR(
bool, m_filterWheelEventAttrPtr);
73 I_REGISTER_SUBELEMENT(PageModel);
80 I_ASSIGN_MULTI_0(m_slaveWidgetsVisualCompPtr,
"GuiVisualInfos",
"Provide visual information for each GUI",
false);
81 I_ASSIGN_TO(m_slaveWidgetsModelCompPtr, m_slaveWidgetsVisualCompPtr,
false);
82 I_ASSIGN_MULTI_0(m_pageActivatorsCompPtr,
"PageActivators",
"Optional activators for each page (enable/disable)",
false);
83 I_ASSIGN_TO(m_pageActivatorsModelCompPtr, m_pageActivatorsCompPtr,
false);
84 I_ASSIGN_MULTI_0(m_pageVisibilityActivatorsCompPtr,
"PageVisibilityActivators",
"Optional visibility activators for each page (show/hide)",
false);
85 I_ASSIGN_TO(m_pageVisibilityActivatorsModelCompPtr, m_pageVisibilityActivatorsCompPtr,
false);
86 I_ASSIGN(m_defaultPageSelectionCompPtr,
"DefaultStartPageSelection",
"If connected, it overrides DefaultStartPageIndex",
false,
"");
176 void UpdatePageState();
179 virtual bool SetSelectedOptionIndex(
int index)
override;
180 virtual ISelectionParam* GetSubselection(
int index)
const override;
183 virtual int GetOptionsFlags()
const override;
184 virtual int GetOptionsCount()
const override;
185 virtual QString GetOptionName(
int index)
const override;
186 virtual QString GetOptionDescription(
int index)
const override;
187 virtual QByteArray GetOptionId(
int index)
const override;
188 virtual bool IsOptionEnabled(
int index)
const override;
191 virtual int GetStatusesCount()
const override;
192 virtual const IVisualStatus* GetVisualStatus(
int statusIndex)
const override;
196 virtual void OnEndChanges(
const ChangeSet& changeSet)
override;
204 template <
class InterfaceType>
218 I_MULTIREF(
imod::IModel, m_pageVisibilityActivatorsModelCompPtr);
226 PageInfo(): isCreated(
false), widgetIndex(-1), widgetPtr(
NULL){}
234 typedef QMap<int, PageInfo> PageIndexToInfoMap;
235 PageIndexToInfoMap m_pageIndexToInfoMap;
Reflects the changes of observed objects as changes of some other object (over istd::IChangeable),...
Generic implementation of a data model changes notifier.
Common interface for model objects, that supports Model/Observer design pattern.
This model wrapper provides a simple connection between a concrete istd::IChangeable implementation a...
Basic implementation of selection parameter.
Interface for objects which can be enabled/disabled.
Constraints of selection from set of possibilities.
Interface allowing to select single option from list of options.
Base class for classes implementing interface iqtgui::IGuiObject.
iqtgui::CGuiComponentBase BaseClass
I_MULTITEXTATTR(m_pageNamesAttrPtr)
virtual QWidget * CreateQtWidget(QWidget *parentPtr) override
Create slave widget object.
virtual void RemovePage(int pageIndex)
Remove a page from the container widget.
imod::CMultiModelDispatcherBase BaseClass2
@ MI_USER
Minimal number which should be used for user-specific data models.
virtual iqtgui::IGuiObject * GetPageGuiComponent(int pageIndex) const =0
Get the UI component for a given page.
bool EnsurePageInitialized(int pageIndex)
virtual void OnGuiRetranslate() override
Called from widget event filter when GUI should be retranslated.
virtual void SetCurrentPage(int pageIndex)
Set current page.
I_REGISTER_SUBELEMENT_INTERFACE_T(PageModel, iprm::ISelectionParam, ExtractPageModel)
virtual void UpdateVisualElements()
Update visual status of the page elements.
imod::TModelWrap< PageModel > m_pageModel
virtual void OnComponentDestroyed() override
CMultiPageGuiCompAttr BaseClass
virtual void CreatePages()
Create all container pages.
virtual void ResetPages()
Clear all container pages.
I_REGISTER_SUBELEMENT_INTERFACE_T(PageModel, istd::IChangeable, ExtractPageModel)
virtual void OnGuiDestroyed() override
Called just before GUI is released.
I_REGISTER_SUBELEMENT_INTERFACE_T(PageModel, iser::ISerializable, ExtractPageModel)
virtual void OnTryClose(bool *ignoredPtr=NULL) override
Called when the application is attempting to close.
virtual bool CreatePage(int pageIndex)
Create a page in the page container widget.
virtual int GetLogicalPageIndex(int physicalWidgetIndex) const
Get logical page index from a given widget index.
virtual int GetPagesCount() const =0
Get the number of the pages in the UI container.
virtual void OnGuiCreated() override
Called just after GUI is initialized.
virtual int GetDesignType() const =0
Get the container UI mode.
I_REGISTER_SUBELEMENT_INTERFACE_T(PageModel, IMultiVisualStatusProvider, ExtractPageModel)
virtual void OnPageChanged(int widgetIndex)
I_REGISTER_SUBELEMENT_INTERFACE_T(PageModel, imod::IModel, ExtractPageModel)
iprm::ISelectionParam & GetPageModelRef()
virtual void OnModelChanged(int modelId, const istd::IChangeable::ChangeSet &changeSet) override
Called when some model observed by dispatcher will be changed.
virtual void OnComponentCreated() override
I_REGISTER_SUBELEMENT_INTERFACE_T(PageModel, iprm::IOptionsList, ExtractPageModel)
Common interface for GUI objects used in ACF component context.
Common interface for a provider of the multiple visual statuses.
Extends standard information provider to provide additional visual informations.
Common class for all classes which objects can be archived or restored from archive.
Set of change flags (its IDs).
Common interface for data model objects, which can be changed.
Standard GUI specific interfaces and components based on Qt.