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

libkdepim

  • sources
  • kde-4.12
  • kdepim
  • libkdepim
  • misc
statisticsproxymodel.h
Go to the documentation of this file.
1 /*
2  Copyright (c) 2009 Kevin Ottens <ervin@kde.org>
3 
4  This library is free software; you can redistribute it and/or modify it
5  under the terms of the GNU Library General Public License as published by
6  the Free Software Foundation; either version 2 of the License, or (at your
7  option) any later version.
8 
9  This library is distributed in the hope that it will be useful, but WITHOUT
10  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12  License for more details.
13 
14  You should have received a copy of the GNU Library General Public License
15  along with this library; see the file COPYING.LIB. If not, write to the
16  Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17  02110-1301, USA.
18 */
19 
20 #ifndef LIBKDEPIM_STATISTICSPROXYMODEL_H
21 #define LIBKDEPIM_STATISTICSPROXYMODEL_H
22 
23 #include "kdepim_export.h"
24 
25 #include <kidentityproxymodel.h>
26 
27 namespace KPIM {
28 
50 class KDEPIM_EXPORT StatisticsProxyModel : public KIdentityProxyModel
51 {
52  Q_OBJECT
53 
54  public:
60  explicit StatisticsProxyModel( QObject *parent = 0 );
61 
65  virtual ~StatisticsProxyModel();
66 
70  void setToolTipEnabled( bool enable);
71 
75  bool isToolTipEnabled() const;
76 
80  void setExtraColumnsEnabled( bool enable);
81 
85  bool isExtraColumnsEnabled() const;
86 
87 
88  virtual QModelIndex index ( int row, int column, const QModelIndex & parent = QModelIndex() ) const;
89  virtual QModelIndex parent(const QModelIndex& child) const;
90  virtual QVariant data( const QModelIndex & index, int role = Qt::DisplayRole ) const;
91  virtual QVariant headerData( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const;
92  virtual Qt::ItemFlags flags ( const QModelIndex & index ) const;
93  virtual int columnCount( const QModelIndex & parent = QModelIndex() ) const;
94 
95  virtual QModelIndexList match( const QModelIndex& start, int role, const QVariant& value, int hits = 1,
96  Qt::MatchFlags flags = Qt::MatchFlags( Qt::MatchStartsWith | Qt::MatchWrap ) ) const;
97 
98  virtual void setSourceModel(QAbstractItemModel* sourceModel);
99  virtual void connectNotify(const char* signal);
100 
101  QModelIndex mapFromSource(const QModelIndex& sourceIndex) const;
102  QModelIndex mapToSource(const QModelIndex& sourceIndex) const;
103  QModelIndex buddy(const QModelIndex &index) const;
104 
105  QItemSelection mapSelectionToSource(const QItemSelection& selection) const;
106 
107  private:
108  //@cond PRIVATE
109  class Private;
110  Private* const d;
111 
112  Q_PRIVATE_SLOT( d, void proxyDataChanged( QModelIndex, QModelIndex ) )
113  Q_PRIVATE_SLOT( d, void sourceLayoutAboutToBeChanged() )
114  Q_PRIVATE_SLOT( d, void sourceLayoutChanged() )
115  //@endcond
116 };
117 
118 }
119 
120 #endif
kdepim_export.h
KIdentityProxyModel
QObject
KPIM::StatisticsProxyModel
A proxy model that exposes collection statistics through extra columns.
Definition: statisticsproxymodel.h:50
KDEPIM_EXPORT
#define KDEPIM_EXPORT
Definition: kdepim_export.h:35
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:58:03 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

libkdepim

Skip menu "libkdepim"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer

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