Public Types | Signals | Public Member Functions | Static Public Member Functions | Protected Slots | List of all members
iwidgets::CMultiPageWidget Class Reference

Implementation of the widget, which is represented as a set of pages. More...

#include <CMultiPageWidget.h>

Inheritance diagram for iwidgets::CMultiPageWidget:

Public Types

enum  DesignType {
  DT_SIMPLE, DT_TOOL_BOX, DT_TAB_WIDGET, DT_SPLITTER,
  DT_STACK, DT_COLLAPSIBLE_GROUPS, DT_USER = 1024
}
 
typedef QWidget BaseClass
 
typedef
IMultiPageWidgetDelegate::PageHeaderPosition 
PageHeaderPosition
 

Signals

void EmitPageIndexChanged (int pageIndex)
 Signal will be emitted whenever the currently selected page will be changed. More...
 

Public Member Functions

 CMultiPageWidget (QWidget *parentWidgetPtr=NULL, int designMode=DT_SIMPLE, int containerGuiFlags=IMultiPageWidgetDelegate::CGF_NONE, Qt::Orientation orientation=Qt::Vertical)
 Construct the multi page widget. More...
 
virtual QWidget * GetContainerWidgetPtr () const
 Get page container widget. More...
 
void SetDesignMode (int designMode)
 Set design mode. More...
 
void SetContainerGuiFlags (int containerGuiFlags)
 Set flags for container behavior. More...
 
void SetLayoutOrientation (Qt::Orientation orientation)
 Set layout orientation for the pages in the container UI. More...
 
virtual void ResetPages ()
 Remove all pages from the container widget. More...
 
virtual void SetPageHeaderPosition (PageHeaderPosition pageHeaderPosition)
 Set the position of the page header on the container UI. More...
 
virtual int InsertPage (QWidget *pageWidgetPtr, const QString &pageTitle, int pageIndex=-1)
 Add a new page to the container. More...
 
virtual void RemovePage (int pageIndex)
 Remove the page from the container. More...
 
virtual int GetPagesCount () const
 Get the number of the pages in the container. More...
 
virtual QWidget * GetPageWidgetPtr (int pageIndex) const
 Get page's widget from the container. More...
 
virtual int GetCurrentPage () const
 Get currently active page in the container. More...
 
virtual bool SetCurrentPage (int pageIndex)
 Set active page in the container. More...
 
virtual QString GetPageTitle (int pageIndex) const
 Get the title of the given page. More...
 
virtual void SetPageTitle (int pageIndex, const QString &pageTitle)
 Set the page title. More...
 
virtual QIcon GetPageIcon (int pageIndex) const
 Get the page icon. More...
 
virtual void SetPageIcon (int pageIndex, const QIcon &pageIcon)
 Set the page icon. More...
 
virtual QString GetPageToolTip (int pageIndex) const
 Get the page tool tip. More...
 
virtual void SetPageToolTip (int pageIndex, const QString &pageToolTip)
 Set the page tool tip. More...
 
virtual bool IsPageEnabled (int pageIndex) const
 Get if the page enabled/disabled. More...
 
virtual bool SetPageEnabled (int pageIndex, bool isPageEnabled=true)
 Set page enabled/disabled. More...
 
virtual bool IsPageVisible (int pageIndex) const
 Get if the page visible/hidden. More...
 
virtual bool SetPageVisible (int pageIndex, bool isPageVisible=true)
 Set page visible/hidden. More...
 
virtual QSize GetPageIconSize () const
 Get the size page icon. More...
 
virtual bool SetPageIconSize (const QSize &pageIconSize)
 Set the size of the icon for all pages in the container. More...
 
template<class DelegateImpl >
void RegisterMultiPageWidgetDelegate (int uiMode)
 Register your own page widget delegate objects for the given UI mode. More...
 

Static Public Member Functions

static bool IsPageIndexChangeSupported (int designMode)
 Check if switching of pages is supported for this UI mode. More...
 

Protected Slots

void OnPageIndexChanged (int pageIndex)
 

Detailed Description

Implementation of the widget, which is represented as a set of pages.

According to a selected UI presentation mode, it can be a tab widget, stacked layout, tool box, or simple a set of lay-outed widgets.

Definition at line 31 of file CMultiPageWidget.h.

Member Typedef Documentation

Definition at line 35 of file CMultiPageWidget.h.

Definition at line 36 of file CMultiPageWidget.h.

Member Enumeration Documentation

Enumerator
DT_SIMPLE 

The pages will be placed simple beside each other.

DT_TOOL_BOX 

The pages are grouped in a tool box.

DT_TAB_WIDGET 

The pages are grouped in a tab widget.

DT_SPLITTER 

The same as DT_SIMPLE but a splitter manager is used for lay-outing of the pages.

DT_STACK 

The pages are grouped in a stack layout.

DT_COLLAPSIBLE_GROUPS 

The pages will be placed into collapsible panels.

DT_USER 

User defined container implementation.

Definition at line 38 of file CMultiPageWidget.h.

Constructor & Destructor Documentation

iwidgets::CMultiPageWidget::CMultiPageWidget ( QWidget *  parentWidgetPtr = NULL,
int  designMode = DT_SIMPLE,
int  containerGuiFlags = IMultiPageWidgetDelegate::CGF_NONE,
Qt::Orientation  orientation = Qt::Vertical 
)

Construct the multi page widget.

Parameters
designModeSpecify the type of the underlying page container widget.
See Also
DesignType
Parameters
orientationSpecify how the pages are layouted in the container UI.

Member Function Documentation

void iwidgets::CMultiPageWidget::EmitPageIndexChanged ( int  pageIndex)
signal

Signal will be emitted whenever the currently selected page will be changed.

virtual QWidget* iwidgets::CMultiPageWidget::GetContainerWidgetPtr ( ) const
virtual

Get page container widget.

virtual int iwidgets::CMultiPageWidget::GetCurrentPage ( ) const
virtual

Get currently active page in the container.

virtual QIcon iwidgets::CMultiPageWidget::GetPageIcon ( int  pageIndex) const
virtual

Get the page icon.

virtual QSize iwidgets::CMultiPageWidget::GetPageIconSize ( ) const
virtual

Get the size page icon.

virtual int iwidgets::CMultiPageWidget::GetPagesCount ( ) const
virtual

Get the number of the pages in the container.

virtual QString iwidgets::CMultiPageWidget::GetPageTitle ( int  pageIndex) const
virtual

Get the title of the given page.

virtual QString iwidgets::CMultiPageWidget::GetPageToolTip ( int  pageIndex) const
virtual

Get the page tool tip.

virtual QWidget* iwidgets::CMultiPageWidget::GetPageWidgetPtr ( int  pageIndex) const
virtual

Get page's widget from the container.

virtual int iwidgets::CMultiPageWidget::InsertPage ( QWidget *  pageWidgetPtr,
const QString &  pageTitle,
int  pageIndex = -1 
)
virtual

Add a new page to the container.

If pageIndex is negative, the new page will be inserted after the last page. The container overtakes the control about widgetPtr.

Returns
Position of the inserted page.
virtual bool iwidgets::CMultiPageWidget::IsPageEnabled ( int  pageIndex) const
virtual

Get if the page enabled/disabled.

static bool iwidgets::CMultiPageWidget::IsPageIndexChangeSupported ( int  designMode)
static

Check if switching of pages is supported for this UI mode.

virtual bool iwidgets::CMultiPageWidget::IsPageVisible ( int  pageIndex) const
virtual

Get if the page visible/hidden.

void iwidgets::CMultiPageWidget::OnPageIndexChanged ( int  pageIndex)
protectedslot
template<class DelegateImpl >
void iwidgets::CMultiPageWidget::RegisterMultiPageWidgetDelegate ( int  uiMode)

Register your own page widget delegate objects for the given UI mode.

Definition at line 278 of file CMultiPageWidget.h.

virtual void iwidgets::CMultiPageWidget::RemovePage ( int  pageIndex)
virtual

Remove the page from the container.

The page widget will be destroyed.

virtual void iwidgets::CMultiPageWidget::ResetPages ( )
virtual

Remove all pages from the container widget.

void iwidgets::CMultiPageWidget::SetContainerGuiFlags ( int  containerGuiFlags)

Set flags for container behavior.

Existing pages will be re-integrated into the new container widget.

Note
Currently, the switching of the container-UI flags after adding some pages to this object is not implemented!
See Also
IMultiPageWidgetDelegate::ContainerGuiFlags
virtual bool iwidgets::CMultiPageWidget::SetCurrentPage ( int  pageIndex)
virtual

Set active page in the container.

void iwidgets::CMultiPageWidget::SetDesignMode ( int  designMode)

Set design mode.

Existing pages will be re-integrated into the new container widget.

Note
Currently, the switching of the design mode after adding some pages to this object is not implemented!
See Also
DesignType
void iwidgets::CMultiPageWidget::SetLayoutOrientation ( Qt::Orientation  orientation)

Set layout orientation for the pages in the container UI.

Note
Currently, the switching of the layout orientation after adding some pages to this object is not implemented!
See Also
Qt::Orientation
virtual bool iwidgets::CMultiPageWidget::SetPageEnabled ( int  pageIndex,
bool  isPageEnabled = true 
)
virtual

Set page enabled/disabled.

virtual void iwidgets::CMultiPageWidget::SetPageHeaderPosition ( PageHeaderPosition  pageHeaderPosition)
virtual

Set the position of the page header on the container UI.

virtual void iwidgets::CMultiPageWidget::SetPageIcon ( int  pageIndex,
const QIcon &  pageIcon 
)
virtual

Set the page icon.

virtual bool iwidgets::CMultiPageWidget::SetPageIconSize ( const QSize &  pageIconSize)
virtual

Set the size of the icon for all pages in the container.

virtual void iwidgets::CMultiPageWidget::SetPageTitle ( int  pageIndex,
const QString &  pageTitle 
)
virtual

Set the page title.

virtual void iwidgets::CMultiPageWidget::SetPageToolTip ( int  pageIndex,
const QString &  pageToolTip 
)
virtual

Set the page tool tip.

virtual bool iwidgets::CMultiPageWidget::SetPageVisible ( int  pageIndex,
bool  isPageVisible = true 
)
virtual

Set page visible/hidden.


The documentation for this class was generated from the following file:

© 2007-2017 Witold Gantzke and Kirill Lepskiy