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

knode

  • sources
  • kde-4.12
  • kdepim
  • knode
kncollectionview.h
Go to the documentation of this file.
1 /*
2  KNode, the KDE newsreader
3  Copyright (c) 2004-2005 Volker Krause <vkrause@kde.org>
4  Copyright (c) 2009 Olivier Trichet <nive@nivalis.org>
5 
6  This program is free software; you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation; either version 2 of the License, or
9  (at your option) any later version.
10  You should have received a copy of the GNU General Public License
11  along with this program; if not, write to the Free Software Foundation,
12  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, US
13 */
14 
15 #ifndef KNODE_KNCOLLECTIONVIEW_H
16 #define KNODE_KNCOLLECTIONVIEW_H
17 
18 #include "kngroup.h"
19 #include "knfolder.h"
20 #include "knnntpaccount.h"
21 
22 #include <foldertreewidget.h>
23 
24 class QContextMenuEvent;
25 class QDropEvent;
26 
27 using namespace KPIM;
28 
30 class KNCollectionView : public FolderTreeWidget
31 {
32 
33  Q_OBJECT
34 
35  public:
36  explicit KNCollectionView( QWidget *parent );
37  ~KNCollectionView();
38 
40  void setActive( QTreeWidgetItem *item );
41 
42  void readConfig();
43  void writeConfig();
44 
45  public slots:
46  void addAccount( KNNntpAccount::Ptr a );
47  void removeAccount( KNNntpAccount::Ptr a );
48  void updateAccount( KNNntpAccount::Ptr a );
49  void reloadAccounts();
50 
51  void addGroup( KNGroup::Ptr g );
52  void removeGroup( KNGroup::Ptr g );
53  void updateGroup( KNGroup::Ptr g );
54 
55  void addFolder( KNFolder::Ptr f );
56  void removeFolder( KNFolder::Ptr f );
57  void activateFolder( KNFolder::Ptr f );
58  void updateFolder( KNFolder::Ptr f );
59  void addPendingFolders();
60  void reloadFolders();
61 
62  void reload();
63 
64  void nextGroup();
65  void prevGroup();
66 
67  // KMail like keyboard navigation
68  void decCurrentFolder();
69  void incCurrentFolder();
70  void selectCurrentFolder();
71 
72  signals:
77  void contextMenu( QTreeWidgetItem *item, const QPoint &position );
78 
79  protected:
85  virtual void contextMenuEvent( QContextMenuEvent *event );
86 
87 
88  virtual void paintEvent( QPaintEvent *event );
89 
90 
91  // Drag and drop
95  virtual void dragEnterEvent ( QDragEnterEvent *event );
99  virtual void dragLeaveEvent ( QDragLeaveEvent *event );
104  virtual void dragMoveEvent( QDragMoveEvent *event );
108  virtual void dropEvent( QDropEvent *event );
114  void handleDragNDropEvent( QDropEvent *event, bool enforceDrop );
115 
119  virtual QStringList mimeTypes() const;
120 
127  virtual void startDrag( Qt::DropActions supportedActions );
128 
129 
130  private:
132  void loadLayout();
133 
134  QTreeWidgetItem *mActiveItem;
135 
140  QTreeWidgetItem *mDragTargetItem;
141 };
142 
143 #endif // KNODE_KNCOLLECTIONVIEW_H
KPIM::FolderTreeWidget
A tree widget useful for displaying a tree of folders containing messages.
Definition: foldertreewidget.h:73
knfolder.h
QWidget
KNFolder::Ptr
boost::shared_ptr< KNFolder > Ptr
Shared pointer to a KNFolder.
Definition: knfolder.h:38
kngroup.h
KNNntpAccount::Ptr
boost::shared_ptr< KNNntpAccount > Ptr
Shared pointer to a KNNntpAccount.
Definition: knnntpaccount.h:62
knnntpaccount.h
foldertreewidget.h
A basic implementation of an UI for a tree of folders.
KNCollectionView
The group/folder tree.
Definition: kncollectionview.h:30
QTreeWidgetItem
KNGroup::Ptr
boost::shared_ptr< KNGroup > Ptr
Shared pointer to a KNGroup.
Definition: kngroup.h:47
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:58:36 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

knode

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

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