KDE 4.9 PyKDE API Reference

- KDE's Python API

# KPageWidget Class Reference

`from PyKDE4.kdeui import *`

Inherits: KPageView → QWidget → QObject

## Detailed Description

Page widget with many layouts (faces).

See also:
  KPageView with hierarchical page model.

Author:
  Tobias Koenig (tokoe@kde.org)

## Signals

| currentPageChanged (KPageWidgetItem current, KPageWidgetItem before)
| pageRemoved (KPageWidgetItem page)
| pageToggled (KPageWidgetItem page, bool checked)

## Methods

| __init__ (self, QWidget parent=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)
KPageWidgetItem | insertPage (self, KPageWidgetItem before, QWidget widget, QString name)
| insertPage (self, KPageWidgetItem before, KPageWidgetItem item)
| removePage (self, KPageWidgetItem item)
| setCurrentPage (self, KPageWidgetItem item)

## Signal Documentation

currentPageChanged | ( | 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)`

pageRemoved | ( | KPageWidgetItem | page
| ) |  |  |

This signal is emitted when a page is removed.

Parameters:

  | page | The page which is removed

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

pageToggled | ( | 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("pageToggled(KPageWidgetItem*, bool)"), target_slot)`

## Method Documentation

__init__ | ( | self, |
|  | QWidget | parent=0
| ) |  |  |

Creates a new page widget.

Parameters:

  | parent | The parent widget.

KPageWidgetItem addPage | ( | self, |
|  | QWidget | widget,
|  | QString | name
| ) |  |  |

Adds a new top level page to the widget.

Parameters:

  item

  The
  See also:
    KPageWidgetItem which describes the page.

addPage | ( | self, |
|  | KPageWidgetItem | item
| ) |  |  |

Adds a new top level page to the widget.

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

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.

addSubPage | ( | self, |
|  | KPageWidgetItem | parent,
|  | KPageWidgetItem | item
| ) |  |  |

Inserts a new sub page in the widget.

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.

KPageWidgetItem insertPage | ( | self, |
|  | KPageWidgetItem | before,
|  | QWidget | widget,
|  | QString | name
| ) |  |  |

Inserts a new page in the widget.

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.

insertPage | ( | self, |
|  | KPageWidgetItem | before,
|  | KPageWidgetItem | item
| ) |  |  |

Inserts a new page in the widget.

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.

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.