CToolBoxDelegate.h
Go to the documentation of this file.
1 #ifndef iwidgets_CToolBoxDelegate_included
2 #define iwidgets_CToolBoxDelegate_included
3 
4 
5 // ACF includes
7 
8 
9 namespace iwidgets
10 {
11 
12 
17 {
18 public:
19  // reimplemented (iwidgets::IMultiPageWidgetDelegate)
20  virtual QWidget* CreateContainerWidget(
21  QWidget* parentWidgetPtr,
22  int containerGuiFlags = CGF_NONE,
23  int orientation = Qt::Horizontal);
24  virtual bool ConnectPageIndexListener(
25  QWidget& containerWidget,
26  QObject* receiverPtr,
27  const char* receiverSlotName);
28  virtual bool SetPageHeaderPosition(QWidget& containerWidget, PageHeaderPosition pageHeaderPosition);
29  virtual int InsertPage(
30  QWidget& containerWidget,
31  QWidget* pageWidgetPtr,
32  const QString& pageTitle,
33  int pageIndex = -1);
34  virtual void RemovePage(QWidget& containerWidget, int pageIndex);
35  virtual void ResetPages(QWidget& containerWidget);
36  virtual int GetPagesCount(const QWidget& containerWidget) const;
37  virtual QWidget* GetPageWidgetPtr(const QWidget& containerWidget, int pageIndex) const;
38  virtual int GetCurrentPage(const QWidget& containerWidget) const;
39  virtual bool SetCurrentPage(QWidget& containerWidget, int pageIndex);
40  virtual QString GetPageTitle(const QWidget& containerWidget, int pageIndex) const;
41  virtual void SetPageTitle(QWidget& containerWidget, int pageIndex, const QString& pageTitle);
42  virtual QIcon GetPageIcon(const QWidget& containerWidget, int pageIndex) const;
43  virtual void SetPageIcon(QWidget& containerWidget, int pageIndex, const QIcon& pageIcon);
44  virtual QString GetPageToolTip(const QWidget& containerWidget, int pageIndex) const;
45  virtual void SetPageToolTip(QWidget& containerWidget, int pageIndex, const QString& pageToolTip);
46  virtual bool IsPageEnabled(const QWidget& containerWidget, int pageIndex) const;
47  virtual bool SetPageEnabled(QWidget& containerWidget, int pageIndex, bool isPageEnabled = true);
48  virtual bool IsPageVisible(const QWidget& containerWidget, int pageIndex) const;
49  virtual bool SetPageVisible(QWidget& containerWidget, int pageIndex, bool isPageVisible = true);
50  virtual QSize GetPageIconSize(const QWidget& containerWidget) const;
51  virtual bool SetPageIconSize(QWidget& containerWidget, const QSize& pageIconSize);
52 };
53 
54 
55 } // namespace iwidgets
56 
57 
58 #endif // !iwidgets_CToolBoxDelegate_included
59 
60 
virtual void RemovePage(QWidget &containerWidget, int pageIndex)
Remove the page from the container.
virtual bool IsPageEnabled(const QWidget &containerWidget, int pageIndex) const
Get if the page enabled/disabled.
virtual bool SetCurrentPage(QWidget &containerWidget, int pageIndex)
Set active page in the container.
virtual bool SetPageIconSize(QWidget &containerWidget, const QSize &pageIconSize)
Set the size of the icon for all pages in the container.
virtual bool SetPageVisible(QWidget &containerWidget, int pageIndex, bool isPageVisible=true)
Set page visible/hidden.
virtual QWidget * GetPageWidgetPtr(const QWidget &containerWidget, int pageIndex) const
Get page's widget from the container.
virtual QWidget * CreateContainerWidget(QWidget *parentWidgetPtr, int containerGuiFlags=CGF_NONE, int orientation=Qt::Horizontal)
Create container for the page widgets.
virtual bool IsPageVisible(const QWidget &containerWidget, int pageIndex) const
Get if the page visible/hidden.
virtual int GetCurrentPage(const QWidget &containerWidget) const
Get currently active page in the container.
virtual QString GetPageToolTip(const QWidget &containerWidget, int pageIndex) const
Get the page tool tip.
virtual QString GetPageTitle(const QWidget &containerWidget, int pageIndex) const
Get the title of the given page.
virtual void SetPageToolTip(QWidget &containerWidget, int pageIndex, const QString &pageToolTip)
Set the page tool tip.
virtual QIcon GetPageIcon(const QWidget &containerWidget, int pageIndex) const
Get the page icon.
virtual void ResetPages(QWidget &containerWidget)
Remove all pages from the container.
virtual QSize GetPageIconSize(const QWidget &containerWidget) const
Get the size page icon.
Implementation of the IMultiPageWidgetDelegate interface for QToolBox.
virtual int InsertPage(QWidget &containerWidget, QWidget *pageWidgetPtr, const QString &pageTitle, int pageIndex=-1)
Add a new page to the container.
virtual void SetPageIcon(QWidget &containerWidget, int pageIndex, const QIcon &pageIcon)
Set the page icon.
virtual bool ConnectPageIndexListener(QWidget &containerWidget, QObject *receiverPtr, const char *receiverSlotName)
Connect object, which will be notified about changing of the current selected page index...
virtual bool SetPageHeaderPosition(QWidget &containerWidget, PageHeaderPosition pageHeaderPosition)
Set the position of the page header bar on the container UI.
virtual bool SetPageEnabled(QWidget &containerWidget, int pageIndex, bool isPageEnabled=true)
Set page enabled/disabled.
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 void SetPageTitle(QWidget &containerWidget, int pageIndex, const QString &pageTitle)
Set the page title.
virtual int GetPagesCount(const QWidget &containerWidget) const
Get the number of the pages in the container.

© 2007-2017 Witold Gantzke and Kirill Lepskiy