IMultiPageWidgetDelegate.h
Go to the documentation of this file.
1 #ifndef iwidgets_IMultiPageWidgetDelegate_included
2 #define iwidgets_IMultiPageWidgetDelegate_included
3 
4 
5 // Qt includes
6 #include <QtCore/QtGlobal>
7 #include <QtCore/QSize>
8 #if QT_VERSION >= 0x050000
9 #include <QtWidgets/QWidget>
10 #else
11 #include <QtGui/QWidget>
12 #endif
13 
14 // ACF includes
15 #include <istd/IPolymorphic.h>
16 #include <iwidgets/iwidgets.h>
17 
18 
19 namespace iwidgets
20 {
21 
22 
29 {
30 public:
35  {
40 
45 
50 
55 
60  };
61 
66  {
70  CGF_NONE = 0,
71 
76 
81  };
82 
86  virtual QWidget* CreateContainerWidget(
87  QWidget* parentWidgetPtr,
88  int containerGuiFlags = CGF_NONE,
89  int orientation = Qt::Horizontal) = 0;
90 
97  virtual bool ConnectPageIndexListener(
98  QWidget& containerWidget,
99  QObject* receiverPtr,
100  const char* receiverSlotName) = 0;
101 
105  virtual bool SetPageHeaderPosition(QWidget& containerWidget, PageHeaderPosition pageHeaderPosition) = 0;
106 
112  virtual int InsertPage(
113  QWidget& containerWidget,
114  QWidget* pageWidgetPtr,
115  const QString& pageTitle,
116  int pageIndex = -1) = 0;
117 
121  virtual void RemovePage(QWidget& containerWidget, int pageIndex) = 0;
122 
126  virtual void ResetPages(QWidget& containerWidget) = 0;
127 
131  virtual int GetPagesCount(const QWidget& containerWidget) const = 0;
132 
136  virtual QWidget* GetPageWidgetPtr(const QWidget& containerWidget, int pageIndex) const = 0;
137 
141  virtual int GetCurrentPage(const QWidget& containerWidget) const = 0;
142 
146  virtual bool SetCurrentPage(QWidget& containerWidget, int pageIndex) = 0;
147 
151  virtual QString GetPageTitle(const QWidget& containerWidget, int pageIndex) const = 0;
152 
156  virtual void SetPageTitle(QWidget& containerWidget, int pageIndex, const QString& pageTitle) = 0;
157 
161  virtual QIcon GetPageIcon(const QWidget& containerWidget, int pageIndex) const = 0;
162 
166  virtual void SetPageIcon(QWidget& containerWidget, int pageIndex, const QIcon& pageIcon) = 0;
167 
171  virtual QString GetPageToolTip(const QWidget& containerWidget, int pageIndex) const = 0;
172 
176  virtual void SetPageToolTip(QWidget& containerWidget, int pageIndex, const QString& pageToolTip) = 0;
177 
181  virtual bool IsPageEnabled(const QWidget& containerWidget, int pageIndex) const = 0;
182 
186  virtual bool SetPageEnabled(QWidget& containerWidget, int pageIndex, bool isPageEnabled = true) = 0;
187 
191  virtual bool IsPageVisible(const QWidget& containerWidget, int pageIndex) const = 0;
192 
196  virtual bool SetPageVisible(QWidget& containerWidget, int pageIndex, bool isPageVisible = true) = 0;
197 
201  virtual QSize GetPageIconSize(const QWidget& containerWidget) const = 0;
202 
206  virtual bool SetPageIconSize(QWidget& containerWidget, const QSize& pageIconSize) = 0;
207 };
208 
209 
210 } // namespace iwidgets
211 
212 
213 #endif // !iwidgets_IMultiPageWidgetDelegate_included
214 
215 
virtual QString GetPageToolTip(const QWidget &containerWidget, int pageIndex) const =0
Get the page tool tip.
virtual QWidget * GetPageWidgetPtr(const QWidget &containerWidget, int pageIndex) const =0
Get page's widget from the container.
Default page header position (decided by container implementation)
virtual int GetCurrentPage(const QWidget &containerWidget) const =0
Get currently 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 bool IsPageEnabled(const QWidget &containerWidget, int pageIndex) const =0
Get if the page enabled/disabled.
virtual QIcon GetPageIcon(const QWidget &containerWidget, int pageIndex) const =0
Get the page icon.
ContainerGuiFlags
Flags for specifying the visual behavior of the page widgets in the UI-container. ...
The page header will be placed on the left side of the container if possible.
The page header will be placed on the right side of the container if possible.
Base interface for all used interfaces and implementations.
Definition: IPolymorphic.h:17
virtual bool SetPageHeaderPosition(QWidget &containerWidget, PageHeaderPosition pageHeaderPosition)=0
Set the position of the page header bar on the container UI.
virtual bool SetPageEnabled(QWidget &containerWidget, int pageIndex, bool isPageEnabled=true)=0
Set page enabled/disabled.
virtual QString GetPageTitle(const QWidget &containerWidget, int pageIndex) const =0
Get the title of the given page.
If set, the container will try to minimize the size of the page content.
virtual void SetPageToolTip(QWidget &containerWidget, int pageIndex, const QString &pageToolTip)=0
Set the page tool tip.
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 QWidget * CreateContainerWidget(QWidget *parentWidgetPtr, int containerGuiFlags=CGF_NONE, int orientation=Qt::Horizontal)=0
Create container for the page widgets.
virtual int InsertPage(QWidget &containerWidget, QWidget *pageWidgetPtr, const QString &pageTitle, int pageIndex=-1)=0
Add a new page to the container.
The page header will be placed on the top side of the container if possible.
The page header will be placed on the bottom side of the container if possible.
virtual bool SetPageVisible(QWidget &containerWidget, int pageIndex, bool isPageVisible=true)=0
Set page visible/hidden.
If set, the container will try to preserve the same size of the page widgets.
PageHeaderPosition
Enum for describing of page header bar position on the container widget.
Interface of a delegate object used for operating on concrete UI-container implementation.
Default behavior of the UI container.
virtual bool IsPageVisible(const QWidget &containerWidget, int pageIndex) const =0
Get if the page visible/hidden.
virtual QSize GetPageIconSize(const QWidget &containerWidget) const =0
Get the size page icon.
virtual void SetPageTitle(QWidget &containerWidget, int pageIndex, const QString &pageTitle)=0
Set the page title.
virtual void SetPageIcon(QWidget &containerWidget, int pageIndex, const QIcon &pageIcon)=0
Set the page icon.
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 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.

© 2007-2017 Witold Gantzke and Kirill Lepskiy