ICF 3.1.1.10
Technical documentation of ICF Libraries
IMultiPageWidgetDelegate.h
Go to the documentation of this file.
1/********************************************************************************
2** This file is part of the ICF Framework. Copyright (C) Witold Gantzke & Kirill Lepskiy
3** ICF Framework may be used under the terms of the LGPL License v. 2.1 by the Free Software Foundation.
4********************************************************************************/
5
6#ifndef iwidgets_IMultiPageWidgetDelegate_included
7#define iwidgets_IMultiPageWidgetDelegate_included
8
9
10// Qt includes
11#include <QtCore/QtGlobal>
12#include <QtCore/QSize>
13#include <QtWidgets/QWidget>
14
15// ICF includes
16#include <istd/IPolymorphic.h>
17#include <iwidgets/iwidgets.h>
18
19
20namespace iwidgets
21{
22
23
29class IMultiPageWidgetDelegate: virtual public istd::IPolymorphic
30{
31public:
62
83
87 virtual QWidget* CreateContainerWidget(
88 QWidget* parentWidgetPtr,
89 int containerGuiFlags = CGF_NONE,
90 int orientation = Qt::Horizontal) = 0;
91
99 QWidget& containerWidget,
100 QObject* receiverPtr,
101 const char* receiverSlotName) = 0;
102
106 virtual bool SetPageHeaderPosition(QWidget& containerWidget, PageHeaderPosition pageHeaderPosition) = 0;
107
113 virtual int InsertPage(
114 QWidget& containerWidget,
115 QWidget* pageWidgetPtr,
116 const QString& pageTitle,
117 int pageIndex = -1) = 0;
118
122 virtual void RemovePage(QWidget& containerWidget, int pageIndex) = 0;
123
127 virtual void ResetPages(QWidget& containerWidget) = 0;
128
132 virtual int GetPagesCount(const QWidget& containerWidget) const = 0;
133
137 virtual QWidget* GetPageWidgetPtr(const QWidget& containerWidget, int pageIndex) const = 0;
138
142 virtual int GetCurrentPage(const QWidget& containerWidget) const = 0;
143
147 virtual bool SetCurrentPage(QWidget& containerWidget, int pageIndex) = 0;
148
152 virtual QString GetPageTitle(const QWidget& containerWidget, int pageIndex) const = 0;
153
157 virtual void SetPageTitle(QWidget& containerWidget, int pageIndex, const QString& pageTitle) = 0;
158
162 virtual QIcon GetPageIcon(const QWidget& containerWidget, int pageIndex) const = 0;
163
167 virtual void SetPageIcon(QWidget& containerWidget, int pageIndex, const QIcon& pageIcon) = 0;
168
172 virtual QString GetPageToolTip(const QWidget& containerWidget, int pageIndex) const = 0;
173
177 virtual void SetPageToolTip(QWidget& containerWidget, int pageIndex, const QString& pageToolTip) = 0;
178
182 virtual bool IsPageEnabled(const QWidget& containerWidget, int pageIndex) const = 0;
183
187 virtual bool SetPageEnabled(QWidget& containerWidget, int pageIndex, bool isPageEnabled = true) = 0;
188
192 virtual bool IsPageVisible(const QWidget& containerWidget, int pageIndex) const = 0;
193
197 virtual bool SetPageVisible(QWidget& containerWidget, int pageIndex, bool isPageVisible = true) = 0;
198
202 virtual QSize GetPageIconSize(const QWidget& containerWidget) const = 0;
203
207 virtual bool SetPageIconSize(QWidget& containerWidget, const QSize& pageIconSize) = 0;
208};
209
210
211} // namespace iwidgets
212
213
214#endif // !iwidgets_IMultiPageWidgetDelegate_included
215
216
Interface of a delegate object used for operating on concrete UI-container implementation.
virtual bool SetPageEnabled(QWidget &containerWidget, int pageIndex, bool isPageEnabled=true)=0
Set page enabled/disabled.
ContainerGuiFlags
Flags for specifying the visual behavior of the page widgets in the UI-container.
@ CGF_UNIFORM_SIZES
If set, the container will try to preserve the same size of the page widgets.
@ CGF_COMPACT
If set, the container will try to minimize the size of the page content.
@ CGF_NONE
Default behavior of the UI container.
virtual bool IsPageEnabled(const QWidget &containerWidget, int pageIndex) const =0
Get if the page enabled/disabled.
virtual void SetPageIcon(QWidget &containerWidget, int pageIndex, const QIcon &pageIcon)=0
Set the page icon.
virtual int InsertPage(QWidget &containerWidget, QWidget *pageWidgetPtr, const QString &pageTitle, int pageIndex=-1)=0
Add a new page to the container.
virtual void SetPageToolTip(QWidget &containerWidget, int pageIndex, const QString &pageToolTip)=0
Set the page tool tip.
PageHeaderPosition
Enum for describing of page header bar position on the container widget.
@ PHP_AUTO
Default page header position (decided by container implementation)
@ PHP_RIGHT
The page header will be placed on the right side of the container if possible.
@ PHP_TOP
The page header will be placed on the top side of the container if possible.
@ PHP_LEFT
The page header will be placed on the left side of the container if possible.
@ PHP_BOTTOM
The page header will be placed on the bottom side of the container if possible.
virtual QString GetPageTitle(const QWidget &containerWidget, int pageIndex) const =0
Get the title of the given page.
virtual QWidget * CreateContainerWidget(QWidget *parentWidgetPtr, int containerGuiFlags=CGF_NONE, int orientation=Qt::Horizontal)=0
Create container for the page widgets.
virtual QWidget * GetPageWidgetPtr(const QWidget &containerWidget, int pageIndex) const =0
Get page's widget from the container.
virtual int GetCurrentPage(const QWidget &containerWidget) const =0
Get currently active page in the container.
virtual void SetPageTitle(QWidget &containerWidget, int pageIndex, const QString &pageTitle)=0
Set the page title.
virtual void ResetPages(QWidget &containerWidget)=0
Remove all pages from the container.
virtual bool SetCurrentPage(QWidget &containerWidget, int pageIndex)=0
Set active page in the container.
virtual bool SetPageIconSize(QWidget &containerWidget, const QSize &pageIconSize)=0
Set the size of the icon for all pages in the container.
virtual QString GetPageToolTip(const QWidget &containerWidget, int pageIndex) const =0
Get the page tool tip.
virtual int GetPagesCount(const QWidget &containerWidget) const =0
Get the number of the pages in the container.
virtual void RemovePage(QWidget &containerWidget, int pageIndex)=0
Remove the page from the container.
virtual bool SetPageHeaderPosition(QWidget &containerWidget, PageHeaderPosition pageHeaderPosition)=0
Set the position of the page header bar on the container UI.
virtual bool ConnectPageIndexListener(QWidget &containerWidget, QObject *receiverPtr, const char *receiverSlotName)=0
Connect object, which will be notified about changing of the current selected page index.
virtual bool IsPageVisible(const QWidget &containerWidget, int pageIndex) const =0
Get if the page visible/hidden.
virtual QIcon GetPageIcon(const QWidget &containerWidget, int pageIndex) const =0
Get the page icon.
virtual bool SetPageVisible(QWidget &containerWidget, int pageIndex, bool isPageVisible=true)=0
Set page visible/hidden.
virtual QSize GetPageIconSize(const QWidget &containerWidget) const =0
Get the size page icon.
Namespace contains implementation of Qt widget extensions.

© Witold Gantzke and Kirill Lepskiy