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

KDEUI

  • kdeui
  • paged
kpageview.h
Go to the documentation of this file.
1/*
2 This file is part of the KDE Libraries
3
4 Copyright (C) 2006 Tobias Koenig (tokoe@kde.org)
5
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public
8 License as published by the Free Software Foundation; either
9 version 2 of the License, or (at your option) any later version.
10
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Library General Public License for more details.
15
16 You should have received a copy of the GNU Library General Public License
17 along with this library; see the file COPYING.LIB. If not, write to
18 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 Boston, MA 02110-1301, USA.
20*/
21
22#ifndef KPAGEVIEW_H
23#define KPAGEVIEW_H
24
25#include <kdeui_export.h>
26
27#include <QtGui/QWidget>
28
29class KPageModel;
30
31class QAbstractItemDelegate;
32class QAbstractItemView;
33class QModelIndex;
34class KPageViewPrivate;
35class QAbstractItemModel;
36
60class KDEUI_EXPORT KPageView : public QWidget
61{
62 Q_OBJECT
63 Q_ENUMS( FaceType )
64 Q_PROPERTY( FaceType faceType READ faceType WRITE setFaceType )
65 Q_DECLARE_PRIVATE(KPageView)
66
67 public:
85 enum FaceType
86 {
87 Auto,
88 Plain,
89 List,
90 Tree,
91 Tabbed
92 };
93
97 explicit KPageView( QWidget *parent = 0 );
98
102 virtual ~KPageView();
103
109 void setModel(QAbstractItemModel *model);
110
114 QAbstractItemModel* model() const;
115
119 void setFaceType( FaceType faceType );
120
124 FaceType faceType() const;
125
130 void setCurrentPage( const QModelIndex &index );
131
136 QModelIndex currentPage() const;
137
142 void setItemDelegate( QAbstractItemDelegate *delegate );
143
147 QAbstractItemDelegate* itemDelegate() const;
148
153 void setDefaultWidget( QWidget *widget );
154
155 Q_SIGNALS:
160 void currentPageChanged( const QModelIndex &current, const QModelIndex &previous );
161
162 protected:
170 virtual QAbstractItemView* createView();
171
178 virtual bool showPageHeader() const;
179
187 virtual Qt::Alignment viewPosition() const;
188
189 KPageView(KPageViewPrivate &dd, QWidget *parent);
190 KPageViewPrivate *const d_ptr;
191
192 private:
193 Q_PRIVATE_SLOT(d_func(), void _k_rebuildGui())
194 Q_PRIVATE_SLOT(d_func(), void _k_modelChanged())
195 Q_PRIVATE_SLOT(d_func(), void _k_pageSelected(const QItemSelection &, const QItemSelection &))
196 Q_PRIVATE_SLOT(d_func(), void _k_dataChanged(const QModelIndex &, const QModelIndex &))
197};
198
199#endif
KPageModel
A base class for a model used by KPageView.
Definition: kpagemodel.h:57
KPageView
A base class which can handle multiple pages.
Definition: kpageview.h:61
KPageView::FaceType
FaceType
This enum is used to decide which type of navigation view shall be used in the page view.
Definition: kpageview.h:86
KPageView::List
@ List
Definition: kpageview.h:89
KPageView::Auto
@ Auto
Definition: kpageview.h:87
KPageView::Tree
@ Tree
Definition: kpageview.h:90
KPageView::Plain
@ Plain
Definition: kpageview.h:88
KPageView::currentPageChanged
void currentPageChanged(const QModelIndex &current, const QModelIndex &previous)
This signal is emitted whenever the current page changes.
KPageView::d_ptr
KPageViewPrivate *const d_ptr
Definition: kpageview.h:190
QAbstractItemModel
QWidget
kdeui_export.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 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-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 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
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
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