KDEUI
KPageModel Class Reference
A base class for a model used by KPageView. More...
#include <kpagemodel.h>

Public Types | |
enum | Role { HeaderRole = Qt::UserRole + 1, WidgetRole } |
Public Member Functions | |
KPageModel (QObject *parent=0) | |
virtual | ~KPageModel () |
Protected Member Functions | |
KPageModel (KPageModelPrivate &dd, QObject *parent) | |
Protected Attributes | |
KPageModelPrivate *const | d_ptr |
Detailed Description
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 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:
KPageView *view = new KPageView( this ); KPageModel *model = new MyPageModel( this ); view->setModel( model );
- See also:
- KPageView
Definition at line 56 of file kpagemodel.h.
Member Enumeration Documentation
enum KPageModel::Role |
Additional roles that KPageView uses.
- Enumerator:
HeaderRole A string to be rendered as page header.
WidgetRole A pointer to the page widget.
This is the widget that is shown when the item is selected.
Definition at line 65 of file kpagemodel.h.
Constructor & Destructor Documentation
KPageModel::KPageModel | ( | QObject * | parent = 0 |
) | [explicit] |
Constructs a page model with the given parent.
Definition at line 29 of file kpagemodel.cpp.
KPageModel::~KPageModel | ( | ) | [virtual] |
Destroys the page model.
Definition at line 40 of file kpagemodel.cpp.
KPageModel::KPageModel | ( | KPageModelPrivate & | dd, | |
QObject * | parent | |||
) | [protected] |
Definition at line 34 of file kpagemodel.cpp.
Member Data Documentation
KPageModelPrivate* const KPageModel::d_ptr [protected] |
Definition at line 95 of file kpagemodel.h.
The documentation for this class was generated from the following files: