• Skip to content
  • Skip to link menu
KDE 4.1 API Reference
  • KDE API Reference
  • KDE-PIM Libraries
  • Sitemap
  • Contact Us
 

akonadi

Akonadi::CollectionView

Akonadi::CollectionView Class Reference

A view to show a collection tree provided by a CollectionModel. More...

#include <collectionview.h>

Inherits QTreeView.

List of all members.


Signals

void clicked (const Akonadi::Collection &collection)
void currentChanged (const Akonadi::Collection &collection)

Public Member Functions

 CollectionView (KXmlGuiWindow *xmlGuiWindow, QWidget *parent=0)
 CollectionView (QWidget *parent=0)
virtual void setModel (QAbstractItemModel *model)
void setXmlGuiWindow (KXmlGuiWindow *xmlGuiWindow)
virtual ~CollectionView ()

Protected Member Functions

virtual void contextMenuEvent (QContextMenuEvent *event)
virtual void dragLeaveEvent (QDragLeaveEvent *event)
virtual void dragMoveEvent (QDragMoveEvent *event)
virtual void dropEvent (QDropEvent *event)

Detailed Description

A view to show a collection tree provided by a CollectionModel.

When a KXmlGuiWindow is passed to the constructor, the XMLGUI defined context menu akonadi_collectionview_contextmenu is used if available.

Example:

 class MyWindow : public KXmlGuiWindow
 {
   public:
    MyWindow()
      : KXmlGuiWindow()
    {
      Akonadi::CollectionView *view = new Akonadi::CollectionView( this, this );
      setCentralWidget( view );

      Akonadi::CollectionModel *model = new Akonadi::CollectionModel( this );
      view->setModel( model );
    }
 }

Author:
Volker Krause <vkrause@kde.org>

Definition at line 62 of file collectionview.h.


Constructor & Destructor Documentation

CollectionView::CollectionView ( QWidget *  parent = 0  )  [explicit]

Creates a new collection view.

Parameters:
parent The parent widget.

Definition at line 129 of file collectionview.cpp.

CollectionView::CollectionView ( KXmlGuiWindow *  xmlGuiWindow,
QWidget *  parent = 0 
) [explicit]

Creates a new collection view.

Parameters:
xmlGuiWindow The KXmlGuiWindow the view is used in. This is needed for the XMLGUI based context menu. Passing 0 is ok and will disable the builtin context menu.
parent The parent widget.

Definition at line 136 of file collectionview.cpp.

CollectionView::~CollectionView (  )  [virtual]

Destroys the collection view.

Definition at line 144 of file collectionview.cpp.


Member Function Documentation

void Akonadi::CollectionView::clicked ( const Akonadi::Collection &  collection  )  [signal]

This signal is emitted whenever the user has clicked a collection in the view.

Parameters:
collection The clicked collection.

void Akonadi::CollectionView::currentChanged ( const Akonadi::Collection &  collection  )  [signal]

This signal is emitted whenever the current collection in the view has changed.

Parameters:
collection The new current collection.

void CollectionView::setXmlGuiWindow ( KXmlGuiWindow *  xmlGuiWindow  ) 

Sets the KXmlGuiWindow which the view is used in.

This is needed if you want to use the built-in context menu.

Parameters:
xmlGuiWindow The KXmlGuiWindow the view is used in.

Definition at line 243 of file collectionview.cpp.


The documentation for this class was generated from the following files:
  • collectionview.h
  • collectionview.cpp

akonadi

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

KDE-PIM Libraries

Skip menu "KDE-PIM Libraries"
  • akonadi
  • kabc
  • kblog
  • kcal
  • kimap
  • kioslave
  •   imap4
  •   mbox
  • kldap
  • kmime
  • kpimidentities
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Generated for KDE-PIM Libraries by doxygen 1.5.7.1
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal