KDE 4.3 PyKDE API Reference
  • KDE's Python API
  • Overview
  • PyKDE Home
  • Sitemap
  • Contact Us
 

KPageDialog Class Reference

from PyKDE4.kdeui import *

Inherits: KDialog → QDialog → QWidget → QObject
Subclasses: KAssistantDialog, KConfigDialog

Detailed Description

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)


Enumerations

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

Signals

 currentPageChanged (KPageWidgetItem current, KPageWidgetItem before)
 pageRemoved (KPageWidgetItem page)

Methods

 __init__ (self, QWidget parent=0, Qt.WFlags flags=0)
 __init__ (self, KPageWidget widget, QWidget parent, Qt.WFlags flags=0)
 __init__ (self, KPageDialogPrivate dd, KPageWidget widget, QWidget parent, Qt.WFlags flags=0)
KPageWidgetItem addPage (self, QWidget widget, QString name)
 addPage (self, KPageWidgetItem item)
KPageWidgetItem addSubPage (self, KPageWidgetItem parent, QWidget widget, QString name)
 addSubPage (self, KPageWidgetItem parent, KPageWidgetItem item)
KPageWidgetItem currentPage (self)
 currentPageChanged (self, KPageWidgetItem current, KPageWidgetItem before)
KPageWidgetItem insertPage (self, KPageWidgetItem before, QWidget widget, QString name)
 insertPage (self, KPageWidgetItem before, KPageWidgetItem item)
 pageRemoved (self, KPageWidgetItem page)
KPageWidget pageWidget (self)
KPageWidget pageWidget (self)
 removePage (self, KPageWidgetItem item)
 setCurrentPage (self, KPageWidgetItem item)
 setFaceType (self, KPageDialog.FaceType faceType)

Method Documentation

__init__ (  self,
QWidget  parent=0,
Qt.WFlags  flags=0
)

Creates a new page dialog.

__init__ (  self,
KPageWidget  widget,
QWidget  parent,
Qt.WFlags  flags=0
)

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

Parameters:
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.

__init__ (  self,
KPageDialogPrivate  dd,
KPageWidget  widget,
QWidget  parent,
Qt.WFlags  flags=0
)
KPageWidgetItem addPage (  self,
QWidget  widget,
QString  name
)

Adds a new top level page to the dialog.

Parameters:
widget  The widget of the page.
name  The name which is displayed in the navigation view.

Returns:
The associated
See also:
KPageWidgetItem.

addPage (  self,
KPageWidgetItem  item
)

Adds a new top level page to the dialog.

Parameters:
item  The
See also:
KPageWidgetItem which describes the page.

KPageWidgetItem addSubPage (  self,
KPageWidgetItem  parent,
QWidget  widget,
QString  name
)

Inserts a new sub page in the dialog.

Parameters:
parent  The new page will be insert as child of this
See also:
KPageWidgetItem.

Parameters:
widget  The widget of the page.
name  The name which is displayed in the navigation view.

Returns:
The associated
See also:
KPageWidgetItem.

addSubPage (  self,
KPageWidgetItem  parent,
KPageWidgetItem  item
)

Inserts a new sub page in the dialog.

Parameters:
parent  The new page will be insert as child of this
See also:
KPageWidgetItem.

Parameters:
item  The
See also:
KPageWidgetItem which describes the page.

KPageWidgetItem currentPage (   self )

Returns the

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

currentPageChanged (  self,
KPageWidgetItem  current,
KPageWidgetItem  before
)

This signal is emitted whenever the current page has changed.

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

Signal syntax:
QObject.connect(source, SIGNAL("currentPageChanged(KPageWidgetItem*, KPageWidgetItem*)"), target_slot)
KPageWidgetItem insertPage (  self,
KPageWidgetItem  before,
QWidget  widget,
QString  name
)

Inserts a new page in the dialog.

Parameters:
before  The new page will be insert before this
See also:
KPageWidgetItem on the same level in hierarchy.

Parameters:
widget  The widget of the page.
name  The name which is displayed in the navigation view.

Returns:
The associated
See also:
KPageWidgetItem.

insertPage (  self,
KPageWidgetItem  before,
KPageWidgetItem  item
)

Inserts a new page in the dialog.

Parameters:
before  The new page will be insert before this
See also:
KPageWidgetItem on the same level in hierarchy.

Parameters:
item  The
See also:
KPageWidgetItem which describes the page.

pageRemoved (  self,
KPageWidgetItem  page
)

This signal is emitted whenever a page has been removed.

Parameters:
page  The page which has been removed

Signal syntax:
QObject.connect(source, SIGNAL("pageRemoved(KPageWidgetItem*)"), target_slot)
KPageWidget pageWidget (   self )

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

KPageWidget pageWidget (   self )

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

removePage (  self,
KPageWidgetItem  item
)

Removes the page associated with the given

See also:
KPageWidgetItem.

setCurrentPage (  self,
KPageWidgetItem  item
)

Sets the page which is associated with the given

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

setFaceType (  self,
KPageDialog.FaceType  faceType
)

Sets the face type of the dialog.


Enumeration Documentation

FaceType

  • 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.

    Enumerator:
    Auto = KPageView::Auto
    Plain = KPageView::Plain
    List = KPageView::List
    Tree = KPageView::Tree
    Tabbed = KPageView::Tabbed

    • Full Index

    Modules

    • akonadi
    • dnssd
    • kdecore
    • kdeui
    • khtml
    • kio
    • knewstuff
    • kparts
    • kutils
    • nepomuk
    • phonon
    • plasma
    • polkitqt
    • solid
    • soprano
    This documentation is maintained by Simon Edwards.
    KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal