# class KPageDialog

###

Module | kdeui
Namespace |
Class | KPageDialog
Inherits | KDialog

A dialog base class which can handle multiple pages.

This class provides a dialog base class which handles multiple pages and allows the user to switch between these pages in different ways.

Currently, Auto, Plain, List, Tree and Tabbed face types are available (@see KPageView).

Example:\n

    UrlDialog.UrlDialog( QWidget *parent )
    : KPageDialog( parent )
    {
    setFaceType( List );

    QLabel *label = new QLabel( "Test Page" );
    addPage( label, i18n( "My Test Page" ) );

    label = new QLabel( "Second Test Page" );
    KPageWidgetItem *page = new KPageWidgetItem( label, i18n( "My Second Test Page" ) );
    page->setHeader( i18n( "My header string" ) );
    page->setIcon( KIcon( "file" ) );

    addPage( page );
    }

Author Tobias Koenig (tokoe@kde.org)

### enums

- FaceType { Auto, Plain, List, Tree, Tabbed }

enum details

### methods

- KPageDialog (parent, flags)

  returns ctor
  KDE 4.1.0 and later only

  Argument | Type | Default
  --- | --- | ---
  parent | QWidget | 0
  flags | Qt.WFlags | 0

  Creates a new page dialog.

- KPageDialog (widget, parent, flags)

  returns ctor

  Argument | Type | Default
  --- | --- | ---
  widget | KPageWidget |
  parent | QWidget |
  flags | Qt.WFlags | 0

  This constructor can be used by subclasses to provide a custom page widget.

  widget - The KPageWidget object will be reparented to this object, so you can create it without parent and you are not allowed to delete it.

- KPageDialog (dd, widget, parent, flags)

  returns ctor
  Not implemented

  Argument | Type | Default
  --- | --- | ---
  dd | KPageDialogPrivate |
  widget | KPageWidget |
  parent | QWidget |
  flags | Qt.WFlags | 0

- KPageDialog (a0, a1)

  returns ctor
  before KDE 4.1.0 only

  Argument | Type | Default
  --- | --- | ---
  a0 | QWidget | 0
  a1 | Qt.WFlags | 0

- addPage (widget, name)

  returns KPageWidgetItem

  Argument | Type | Default
  --- | --- | ---
  widget | QWidget |
  name | QString |

  Adds a new top level page to the dialog.

  widget - The widget of the page.

  name - The name which is displayed in the navigation view.

  Returns The associated

  See also KPageWidgetItem.

- addPage (item)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  item | KPageWidgetItem |

  Adds a new top level page to the dialog.

  item - The

  See also KPageWidgetItem which describes the page.

- addSubPage (parent, widget, name)

  returns KPageWidgetItem

  Argument | Type | Default
  --- | --- | ---
  parent | KPageWidgetItem |
  widget | QWidget |
  name | QString |

  Inserts a new sub page in the dialog.

  parent - The new page will be insert as child of this

  See also KPageWidgetItem.

  widget - The widget of the page.

  name - The name which is displayed in the navigation view.

  Returns The associated

  See also KPageWidgetItem.

- addSubPage (parent, item)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  parent | KPageWidgetItem |
  item | KPageWidgetItem |

  Inserts a new sub page in the dialog.

  parent - The new page will be insert as child of this

  See also KPageWidgetItem.

  item - The

  See also KPageWidgetItem which describes the page.

- currentPage ( )

  returns KPageWidgetItem

  Returns the

  See also KPageWidgetItem for the current page or 0 if there is no current page.

- currentPageChanged (current, before)

  returns Nothing
  SIGNAL ("currentPageChanged (KPageWidgetItem*, KPageWidgetItem*)")

  Argument | Type | Default
  --- | --- | ---
  current | KPageWidgetItem |
  before | KPageWidgetItem |

  This signal is emitted whenever the current page has changed.

  item - The new current page or 0 if no current page is available.

- insertPage (before, widget, name)

  returns KPageWidgetItem

  Argument | Type | Default
  --- | --- | ---
  before | KPageWidgetItem |
  widget | QWidget |
  name | QString |

  Inserts a new page in the dialog.

  before - The new page will be insert before this

  See also KPageWidgetItem on the same level in hierarchy.

  widget - The widget of the page.

  name - The name which is displayed in the navigation view.

  Returns The associated

  See also KPageWidgetItem.

- insertPage (before, item)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  before | KPageWidgetItem |
  item | KPageWidgetItem |

  Inserts a new page in the dialog.

  before - The new page will be insert before this

  See also KPageWidgetItem on the same level in hierarchy.

  item - The

  See also KPageWidgetItem which describes the page.

- pageRemoved (page)

  returns Nothing
  SIGNAL ("pageRemoved (KPageWidgetItem*)")

  Argument | Type | Default
  --- | --- | ---
  page | KPageWidgetItem |

  This signal is emitted whenever a page has been removed.

  page - The page which has been removed

- pageWidget ( )

  returns KPageWidget

  Returns the page widget of the dialog or 0 if no page widget is set.

- pageWidget ( )

  returns KPageWidget
  Not implemented

  Returns the page widget of the dialog or 0 if no page widget is set.

- removePage (item)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  item | KPageWidgetItem |

  Removes the page associated with the given

  See also KPageWidgetItem.

- setCurrentPage (item)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  item | KPageWidgetItem |

  Sets the page which is associated with the given

  See also KPageWidgetItem to be the current page and emits the currentPageChanged() signal.

- setFaceType (faceType)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  faceType | KPageDialog.FaceType |

  Sets the face type of the dialog.

### enums - detail

- FaceType { Auto, Plain, List, Tree, Tabbed }

- Auto - A dialog with a face based on the structure of the
available pages. If only a single page is added, the dialog behaves like in Plain mode, with multiple pages without sub pages it behaves like in List mode and like in Tree mode otherwise.
- Plain - A normal dialog.
- List - A dialog with an icon list on the left side and a
representation of the contents on the right side.
- Tree - A dialog with a tree on the left side and a
representation of the contents on the right side.
- Tabbed - A dialog with a tab bar above the representation
of the contents.

| Auto | - KPageView::Auto | - |
| Plain | - KPageView::Plain | - |
| List | - KPageView::List | - |
| Tree | - KPageView::Tree | - |
| Tabbed | - KPageView::Tabbed | - |