KPageWidgetModel Class Reference
from PyKDE4.kdeui import *
Inherits: KPageModel → QAbstractItemModel → QObject
Detailed Description
This page model is used by
- See also:
- KPageWidget to provide a hierarchical layout of pages.
Method Documentation
__init__ | ( | self, | ||
QObject | parent=0 | |||
) |
Creates a new page widget model.
- Parameters:
-
parent The parent object.
KPageWidgetItem addPage | ( | self, | ||
QWidget | widget, | |||
QString | name | |||
) |
Adds a new top level page to the model.
- 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 model.
- 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 model.
- 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 model.
- 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.
int columnCount ( self, QModelIndex parent=QModelIndex() ) These methods are reimplemented from QAbstractItemModel.
QVariant data ( self, QModelIndex index, int role=Qt.DisplayRole ) Qt.ItemFlags flags ( self, QModelIndex index ) QModelIndex index ( self, int row, int column, QModelIndex parent=QModelIndex() ) QModelIndex index ( self, KPageWidgetItem item ) Returns the index for a given
- See also:
- KPageWidgetItem. The index is invalid if the item can't be found in the model.
KPageWidgetItem insertPage ( self, KPageWidgetItem before, QWidget widget, QString name ) Inserts a new page in the model.
- 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 model.
- 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.
KPageWidgetItem item ( self, QModelIndex index ) Returns the
- See also:
- KPageWidgetItem for a given index or 0 if the index is invalid.
QModelIndex parent ( self, QModelIndex index ) removePage ( self, KPageWidgetItem item ) Removes the page associated with the given
- See also:
- KPageWidgetItem.
int rowCount ( self, QModelIndex parent=QModelIndex() ) bool setData ( self, QModelIndex index, QVariant value, int role=Qt.EditRole ) toggled ( self, KPageWidgetItem page, bool checked ) This signal is emitted whenever a checkable page changes its state.
- Parameters:
-
checked is true when the page is checked, or false if the page is unchecked.
- Signal syntax:
QObject.connect(source, SIGNAL("toggled(KPageWidgetItem*, bool)"), target_slot)