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

kgpg

  • sources
  • kde-4.14
  • kdeutils
  • kgpg
  • model
groupeditproxymodel.h
Go to the documentation of this file.
1 /* Copyright 2008,2014 Rolf Eike Beer <kde@opensource.sf-tec.de>
2  *
3  * This program is free software; you can redistribute it and/or
4  * modify it under the terms of the GNU General Public License as
5  * published by the Free Software Foundation; either version 2 of
6  * the License or (at your option) version 3 or any later version
7  * accepted by the membership of KDE e.V. (or its successor approved
8  * by the membership of KDE e.V.), which shall act as a proxy
9  * defined in Section 14 of version 3 of the license.
10  *
11  * This program 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
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program. If not, see <http://www.gnu.org/licenses/>.
18  */
19 #ifndef GROUPEDITPROXYMODEL_H
20 #define GROUPEDITPROXYMODEL_H
21 
22 #include "core/kgpgkey.h"
23 
24 #include <QSortFilterProxyModel>
25 
26 class KGpgNode;
27 class KGpgItemModel;
28 
29 class GroupEditProxyModel: public QSortFilterProxyModel
30 {
31 public:
32  explicit GroupEditProxyModel(QObject * parent, const bool invert, QList<KGpgNode *> *ids, const KgpgCore::KgpgKeyTrust mintrust = KgpgCore::TRUST_FULL);
33 
34  void setKeyModel(KGpgItemModel *);
35 
36  KGpgNode *nodeForIndex(const QModelIndex &index) const;
37 
38  virtual int rowCount(const QModelIndex &parent = QModelIndex()) const;
39 
40  virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
41  virtual bool hasChildren(const QModelIndex &parent) const;
42  virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
43 
44 protected:
45  virtual bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const;
46  virtual int columnCount(const QModelIndex &) const;
47 
48 private:
49  KGpgItemModel *m_model;
50  bool m_invert;
51  QList<KGpgNode *> *m_ids;
52  KgpgCore::KgpgKeyTrust m_mintrust;
53 };
54 
55 #endif
QSortFilterProxyModel::index
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const
KGpgItemModel
Definition: kgpgitemmodel.h:44
QModelIndex
GroupEditProxyModel::filterAcceptsRow
virtual bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const
Definition: groupeditproxymodel.cpp:47
GroupEditProxyModel::data
virtual QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const
Definition: groupeditproxymodel.cpp:91
GroupEditProxyModel::setKeyModel
void setKeyModel(KGpgItemModel *)
Definition: groupeditproxymodel.cpp:40
GroupEditProxyModel::GroupEditProxyModel
GroupEditProxyModel(QObject *parent, const bool invert, QList< KGpgNode * > *ids, const KgpgCore::KgpgKeyTrust mintrust=KgpgCore::TRUST_FULL)
Definition: groupeditproxymodel.cpp:30
kgpgkey.h
GroupEditProxyModel::hasChildren
virtual bool hasChildren(const QModelIndex &parent) const
Definition: groupeditproxymodel.cpp:135
GroupEditProxyModel::headerData
virtual QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
Definition: groupeditproxymodel.cpp:145
QObject
QList< KGpgNode * >
KgpgCore::TRUST_FULL
you can fully trust this key
Definition: kgpgkey.h:63
GroupEditProxyModel::rowCount
virtual int rowCount(const QModelIndex &parent=QModelIndex()) const
Definition: groupeditproxymodel.cpp:79
KGpgNode
The abstract base class for all classes representing keyring data.
Definition: KGpgNode.h:42
QSortFilterProxyModel
GroupEditProxyModel::nodeForIndex
KGpgNode * nodeForIndex(const QModelIndex &index) const
Definition: groupeditproxymodel.cpp:67
QObject::parent
QObject * parent() const
GroupEditProxyModel::columnCount
virtual int columnCount(const QModelIndex &) const
Definition: groupeditproxymodel.cpp:73
GroupEditProxyModel
Definition: groupeditproxymodel.h:29
QVariant
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:42:08 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kgpg

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

kdeutils API Reference

Skip menu "kdeutils API Reference"
  • ark
  • filelight
  • kcalc
  • kcharselect
  • kdf
  • kfloppy
  • kgpg
  • ktimer
  • kwallet
  • sweeper

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