• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KDEUI

Public Types | Signals | Public Member Functions | Protected Member Functions | Protected Attributes | Properties | List of all members
KPageView Class Reference

#include <kpageview.h>

Inheritance diagram for KPageView:
Inheritance graph
[legend]

Public Types

enum  FaceType {
  Auto, Plain, List, Tree,
  Tabbed
}
 

Signals

void currentPageChanged (const QModelIndex &current, 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:

KPageModel *model = new MyPageModel();
KPageView *view = new KPageView( this );
view->setModel( model );
view->setFaceType( KPageView::List );
Author
Tobias Koenig (tokoe.nosp@m.@kde.nosp@m..org)

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

KPageView::KPageView ( QWidget *  parent = 0)
explicit

Creates a page view with given parent.

KPageView Implementation.

Definition at line 308 of file kpageview.cpp.

KPageView::~KPageView ( )
virtual

Destroys the page view.

Definition at line 320 of file kpageview.cpp.

KPageView::KPageView ( KPageViewPrivate &  dd,
QWidget *  parent 
)
protected

Definition at line 314 of file kpageview.cpp.

Member Function Documentation

QAbstractItemView * KPageView::createView ( )
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.

void KPageView::currentPageChanged ( const QModelIndex &  current,
const QModelIndex &  previous 
)
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
indexto 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
delegatewhich 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.

bool KPageView::showPageHeader ( ) const
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.

Qt::Alignment KPageView::viewPosition ( ) const
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

KPageViewPrivate* const KPageView::d_ptr
protected

Definition at line 190 of file kpageview.h.

Property Documentation

KPageView::FaceType KPageView::faceType
readwrite

Definition at line 64 of file kpageview.h.


The documentation for this class was generated from the following files:
  • kpageview.h
  • kpageview.cpp
This file is part of the KDE documentation.
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.

KDEUI

Skip menu "KDEUI"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal