# class KPageModel

###

Module | kdeui
Namespace |
Class | KPageModel
Inherits | QAbstractItemModel

A base class for a model used by KPageView.

This class is an abstract base class which must be used to implement custom models for KPageView. Additional to the the standard Qt.ItemDataRoles it provides the two roles

- HeaderRole
- WidgetRole

which are used to return a header string for a page and a QWidget pointer to the page itself.

Example:\n

    KPageView *view = new KPageView( this );
    KPageModel *model = new MyPageModel( this );

    view->setModel( model );

See also KPageView Author Tobias Koenig <tokoe@kde.org>

### enums

- Role { HeaderRole, WidgetRole }

enum details

### methods

- KPageModel (parent)

  returns ctor
  KDE 4.1.0 and later only

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

  Constructs a page model with the given parent.

- KPageModel (dd, parent)

  returns ctor
  Not implemented

  Argument | Type | Default
  --- | --- | ---
  dd | KPageModelPrivate |
  parent | QObject |

- KPageModel (a0)

  returns ctor
  before KDE 4.1.0 only

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

### enums - detail

- Role { HeaderRole, WidgetRole }

  A string to be rendered as page header.

  | HeaderRole | - Qt::UserRole+1 | - |
  | WidgetRole | - | - |