• 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
keytreeview.h
Go to the documentation of this file.
1 /* Copyright 2008 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 KEYTREEVIEW_H
20 #define KEYTREEVIEW_H
21 
22 #include <QTreeView>
23 
24 #include <KUrl>
25 
26 #include "core/kgpgkey.h"
27 
28 class QDragMoveEvent;
29 class QDropEvent;
30 
31 class KGpgNode;
32 class KeyListProxyModel;
33 class KConfigGroup;
34 
35 class KeyTreeView: public QTreeView
36 {
37  Q_OBJECT
38 private:
39  KeyListProxyModel *m_proxy;
40 
41 public:
42  explicit KeyTreeView(QWidget *parent = 0, KeyListProxyModel *model = 0);
43 
44  QList<KGpgNode *> selectedNodes(bool *psame = NULL, KgpgCore::KgpgItemType *pt = NULL) const;
45  KGpgNode *selectedNode() const;
46 
47  void restoreLayout(KConfigGroup &cg);
48  void saveLayout(KConfigGroup &cg) const;
49 
50  bool isEditing() const;
51 
52 signals:
53  void importDrop(const KUrl::List &urls);
54  void returnPressed();
55 
56 public slots:
57  void selectNode(KGpgNode *nd);
58  void resizeColumnsToContents();
59 
60 protected:
61  virtual void contentsDragMoveEvent(QDragMoveEvent *e);
62  virtual void contentsDropEvent(QDropEvent *e);
63  virtual void startDrag(Qt::DropActions);
64  virtual void keyPressEvent(QKeyEvent *event);
65 };
66 
67 #endif
QWidget
KeyTreeView::selectNode
void selectNode(KGpgNode *nd)
Definition: keytreeview.cpp:94
KeyTreeView::isEditing
bool isEditing() const
Definition: keytreeview.cpp:226
KeyTreeView
Definition: keytreeview.h:35
QDragMoveEvent
KeyTreeView::restoreLayout
void restoreLayout(KConfigGroup &cg)
Definition: keytreeview.cpp:106
KeyTreeView::contentsDropEvent
virtual void contentsDropEvent(QDropEvent *e)
Definition: keytreeview.cpp:162
KeyTreeView::selectedNodes
QList< KGpgNode * > selectedNodes(bool *psame=NULL, KgpgCore::KgpgItemType *pt=NULL) const
Definition: keytreeview.cpp:45
kgpgkey.h
KeyTreeView::contentsDragMoveEvent
virtual void contentsDragMoveEvent(QDragMoveEvent *e)
Definition: keytreeview.cpp:156
KeyTreeView::selectedNode
KGpgNode * selectedNode() const
Definition: keytreeview.cpp:83
KeyTreeView::importDrop
void importDrop(const KUrl::List &urls)
KeyTreeView::returnPressed
void returnPressed()
QDropEvent
QList< KGpgNode * >
KGpgNode
The abstract base class for all classes representing keyring data.
Definition: KGpgNode.h:42
KeyListProxyModel
Definition: keylistproxymodel.h:30
KeyTreeView::saveLayout
void saveLayout(KConfigGroup &cg) const
Definition: keytreeview.cpp:141
QKeyEvent
QAbstractItemView::event
virtual bool event(QEvent *event)
QTreeView
Qt::DropActions
typedef DropActions
KeyTreeView::resizeColumnsToContents
void resizeColumnsToContents()
Definition: keytreeview.cpp:207
KeyTreeView::KeyTreeView
KeyTreeView(QWidget *parent=0, KeyListProxyModel *model=0)
Definition: keytreeview.cpp:34
QAbstractItemView::model
QAbstractItemModel * model() const
QObject::parent
QObject * parent() const
KeyTreeView::keyPressEvent
virtual void keyPressEvent(QKeyEvent *event)
Definition: keytreeview.cpp:214
KeyTreeView::startDrag
virtual void startDrag(Qt::DropActions)
Definition: keytreeview.cpp:176
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