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

KDEUI

  • sources
  • kde-4.14
  • kdelibs
  • 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 
29 class KPageModel;
30 
31 class QAbstractItemDelegate;
32 class QAbstractItemView;
33 class QModelIndex;
34 class KPageViewPrivate;
35 class QAbstractItemModel;
36 
60 class 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
QModelIndex
QWidget
KPageView::Tree
Definition: kpageview.h:90
QAbstractItemView
KPageModel
A base class for a model used by KPageView.
Definition: kpagemodel.h:56
KPageView::FaceType
FaceType
This enum is used to decide which type of navigation view shall be used in the page view...
Definition: kpageview.h:85
Qt::Alignment
typedef Alignment
KPageView::List
Definition: kpageview.h:89
KPageView
A base class which can handle multiple pages.
Definition: kpageview.h:60
KPageView::Plain
Definition: kpageview.h:88
QItemSelection
kdeui_export.h
QAbstractItemModel
KPageView::d_ptr
KPageViewPrivate *const d_ptr
Definition: kpageview.h:190
KPageView::Auto
Definition: kpageview.h:87
QAbstractItemDelegate
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:23:59 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
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • 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