# class KPageWidgetModel

###

Module | kdeui
Namespace |
Class | KPageWidgetModel
Inherits | KPageModel

This page model is used by

See also KPageWidget to provide a hierarchical layout of pages.

### methods

- KPageWidgetModel (parent)

  returns ctor
  KDE 4.1.0 and later only

  Argument | Type | Default
  --- | --- | ---
  parent | QObject | 0

  Creates a new page widget model.

  parent - The parent object.

- KPageWidgetModel (a0)

  returns ctor
  before KDE 4.1.0 only

  Argument | Type | Default
  --- | --- | ---
  a0 | QObject | 0

- addPage (widget, name)

  returns KPageWidgetItem

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

  Adds a new top level page to the model.

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

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

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

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

  See also KPageWidgetItem.

  item - The

  See also KPageWidgetItem which describes the page.

- columnCount (parent)

  returns int

  Argument | Type | Default
  --- | --- | ---
  parent | QModelIndex | QModelIndex()

  These methods are reimplemented from QAbstractItemModel.

- data (index, role)

  returns QVariant

  Argument | Type | Default
  --- | --- | ---
  index | QModelIndex |
  role | int | Qt.DisplayRole

- flags (index)

  returns Qt.ItemFlags

  Argument | Type | Default
  --- | --- | ---
  index | QModelIndex |

- index (row, column, parent)

  returns QModelIndex

  Argument | Type | Default
  --- | --- | ---
  row | int |
  column | int |
  parent | QModelIndex | QModelIndex()

- index (item)

  returns QModelIndex

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

  Returns the index for a given

  See also KPageWidgetItem. The index is invalid if the item can't be found in the model.

- insertPage (before, widget, name)

  returns KPageWidgetItem

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

  Inserts a new page in the model.

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

  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.

- item (index)

  returns KPageWidgetItem

  Argument | Type | Default
  --- | --- | ---
  index | QModelIndex |

  Returns the

  See also KPageWidgetItem for a given index or 0 if the index is invalid.

- parent (index)

  returns QModelIndex

  Argument | Type | Default
  --- | --- | ---
  index | QModelIndex |

- removePage (item)

  returns Nothing

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

  Removes the page associated with the given

  See also KPageWidgetItem.

- rowCount (parent)

  returns int

  Argument | Type | Default
  --- | --- | ---
  parent | QModelIndex | QModelIndex()

- setData (index, value, role)

  returns bool

  Argument | Type | Default
  --- | --- | ---
  index | QModelIndex |
  value | QVariant |
  role | int | Qt.EditRole

- toggled (page, checked)

  returns Nothing
  SIGNAL ("toggled (KPageWidgetItem*, bool)")

  Argument | Type | Default
  --- | --- | ---
  page | KPageWidgetItem |
  checked | bool |

  This signal is emitted whenever a checkable page changes its state. checked - is true when the page - is checked, or false if the page - is unchecked.