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 ); }
Method Documentation
__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