KDEUI
#include <kpageview.h>
Public Types | |
enum | FaceType { Auto, Plain, List, Tree, Tabbed } |
Signals | |
void | currentPageChanged (const QModelIndex ¤t, const QModelIndex &previous) |
Public Member Functions | |
KPageView (QWidget *parent=0) | |
virtual | ~KPageView () |
QModelIndex | currentPage () const |
FaceType | faceType () const |
QAbstractItemDelegate * | itemDelegate () const |
QAbstractItemModel * | model () const |
void | setCurrentPage (const QModelIndex &index) |
void | setDefaultWidget (QWidget *widget) |
void | setFaceType (FaceType faceType) |
void | setItemDelegate (QAbstractItemDelegate *delegate) |
void | setModel (QAbstractItemModel *model) |
Protected Member Functions | |
KPageView (KPageViewPrivate &dd, QWidget *parent) | |
virtual QAbstractItemView * | createView () |
virtual bool | showPageHeader () const |
virtual Qt::Alignment | viewPosition () const |
Protected Attributes | |
KPageViewPrivate *const | d_ptr |
Properties | |
FaceType | faceType |
Detailed Description
A base class which can handle multiple pages.
This class provides a widget base class which handles multiple pages and allows the user to switch between these pages in different ways.
Currently, Auto
, Plain
, List
, Tree
and Tabbed
face types are available.
- See also
- KPageWidget
Example:
Definition at line 60 of file kpageview.h.
Member Enumeration Documentation
enum KPageView::FaceType |
This enum is used to decide which type of navigation view shall be used in the page view.
- Auto - Depending on the number of pages in the model, the Plain (one page), the List (several pages) or the Tree face (nested pages) will be used. This is the default face type.
- Plain - No navigation view will be visible and only the first page of the model will be shown.
- List - An icon list is used as navigation view.
- Tree - A tree list is used as navigation view.
- Tabbed - A tab widget is used as navigation view.
Enumerator | |
---|---|
Auto | |
Plain | |
List | |
Tree | |
Tabbed |
Definition at line 85 of file kpageview.h.
Constructor & Destructor Documentation
|
explicit |
Creates a page view with given parent.
KPageView Implementation.
Definition at line 308 of file kpageview.cpp.
|
virtual |
Destroys the page view.
Definition at line 320 of file kpageview.cpp.
|
protected |
Definition at line 314 of file kpageview.cpp.
Member Function Documentation
|
protectedvirtual |
Returns the navigation view, depending on the current face type.
This method can be reimplemented to provide custom navigation views.
Definition at line 422 of file kpageview.cpp.
QModelIndex KPageView::currentPage | ( | ) | const |
Returns the index for the current page or an invalid index if no current page exists.
Definition at line 377 of file kpageview.cpp.
|
signal |
This signal is emitted whenever the current page changes.
The previous page index is replaced by the current index.
FaceType KPageView::faceType | ( | ) | const |
Returns the face type of the page view.
QAbstractItemDelegate * KPageView::itemDelegate | ( | ) | const |
Returns the item delegate of the page view.
Definition at line 393 of file kpageview.cpp.
QAbstractItemModel * KPageView::model | ( | ) | const |
Returns the model of the page view.
Definition at line 350 of file kpageview.cpp.
void KPageView::setCurrentPage | ( | const QModelIndex & | index | ) |
Sets the page with.
- Parameters
-
index to be the current page and emits the
- See also
- currentPageChanged signal.
Definition at line 368 of file kpageview.cpp.
void KPageView::setDefaultWidget | ( | QWidget * | widget | ) |
Sets the widget
which will be shown when a page is selected that has no own widget set.
Definition at line 402 of file kpageview.cpp.
void KPageView::setFaceType | ( | FaceType | faceType | ) |
Sets the face type of the page view.
Definition at line 355 of file kpageview.cpp.
void KPageView::setItemDelegate | ( | QAbstractItemDelegate * | delegate | ) |
Sets the item.
- Parameters
-
delegate which can be used customize the page view.
Definition at line 386 of file kpageview.cpp.
void KPageView::setModel | ( | QAbstractItemModel * | model | ) |
Sets the model
of the page view.
The model has to provide data for the roles defined in KPageModel::Role.
Definition at line 325 of file kpageview.cpp.
|
protectedvirtual |
Returns whether the page header should be visible.
This method can be reimplemented for adapting custom views.
Definition at line 448 of file kpageview.cpp.
|
protectedvirtual |
Returns the position where the navigation view should be located according to the page stack.
This method can be reimplemented for adapting custom views.
Definition at line 463 of file kpageview.cpp.
Member Data Documentation
|
protected |
Definition at line 190 of file kpageview.h.
Property Documentation
|
readwrite |
Definition at line 64 of file kpageview.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:49:17 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.