• Skip to content
  • Skip to link menu
KDE 4.6 API Reference
  • KDE API Reference
  • KDE-PIM Libraries
  • KDE Home
  • Contact Us
 

akonadi

  • Akonadi
  • EntityTreeView
Signals | Public Member Functions | Protected Member Functions
Akonadi::EntityTreeView Class Reference

A view to show an item/collection tree provided by an EntityTreeModel. More...

#include <entitytreeview.h>

Inherits QTreeView.

List of all members.

Signals

void clicked (const Akonadi::Collection &collection)
void clicked (const Akonadi::Item &item)
void currentChanged (const Akonadi::Collection &collection)
void currentChanged (const Akonadi::Item &item)
void doubleClicked (const Akonadi::Item &item)
void doubleClicked (const Akonadi::Collection &collection)

Public Member Functions

 EntityTreeView (QWidget *parent=0)
 EntityTreeView (KXMLGUIClient *xmlGuiClient, QWidget *parent=0)
virtual ~EntityTreeView ()
bool isDropActionMenuEnabled () const
void setDropActionMenuEnabled (bool enabled)
virtual void setModel (QAbstractItemModel *model)
void setXmlGuiClient (KXMLGUIClient *xmlGuiClient)

Protected Member Functions

virtual void contextMenuEvent (QContextMenuEvent *event)
virtual void dragMoveEvent (QDragMoveEvent *event)
virtual void dropEvent (QDropEvent *event)
virtual void startDrag (Qt::DropActions supportedActions)
virtual void timerEvent (QTimerEvent *event)

Detailed Description

A view to show an item/collection tree provided by an EntityTreeModel.

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

Example:

 using namespace Akonadi;

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

      EntityTreeModel *model = new EntityTreeModel( ... );
      view->setModel( model );
    }
 }
Author:
Volker Krause <vkrause@kde.org>
Stephen Kelly <steveire@gmail.com>
Since:
4.4

Definition at line 70 of file entitytreeview.h.


Constructor & Destructor Documentation

Akonadi::EntityTreeView::EntityTreeView ( QWidget *  parent = 0) [explicit]

Creates a new entity tree view.

Parameters:
parentThe parent widget.
Akonadi::EntityTreeView::EntityTreeView ( KXMLGUIClient *  xmlGuiClient,
QWidget *  parent = 0 
) [explicit]

Creates a new entity tree view.

Parameters:
xmlGuiClientThe KXMLGUIClient 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.
parentThe parent widget.
virtual Akonadi::EntityTreeView::~EntityTreeView ( ) [virtual]

Destroys the entity tree view.


Member Function Documentation

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

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

Parameters:
collectionThe clicked collection.
void Akonadi::EntityTreeView::clicked ( const Akonadi::Item &  item) [signal]

This signal is emitted whenever the user has clicked an item in the view.

Parameters:
itemThe clicked item.
void Akonadi::EntityTreeView::currentChanged ( const Akonadi::Collection &  collection) [signal]

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

Parameters:
collectionThe new current collection.
void Akonadi::EntityTreeView::currentChanged ( const Akonadi::Item &  item) [signal]

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

Parameters:
itemThe new current item.
void Akonadi::EntityTreeView::doubleClicked ( const Akonadi::Item &  item) [signal]

This signal is emitted whenever the user has double clicked an item in the view.

Parameters:
itemThe double clicked item.
void Akonadi::EntityTreeView::doubleClicked ( const Akonadi::Collection &  collection) [signal]

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

Parameters:
collectionThe double clicked collection.
bool Akonadi::EntityTreeView::isDropActionMenuEnabled ( ) const

Returns whether the drop action menu is enabled and will be shown on drop operation.

Since:
4.5
void Akonadi::EntityTreeView::setDropActionMenuEnabled ( bool  enabled)

Sets whether the drop action menu is enabled and will be shown on drop operation.

Since:
4.5
virtual void Akonadi::EntityTreeView::setModel ( QAbstractItemModel *  model) [virtual]

void Akonadi::EntityTreeView::setXmlGuiClient ( KXMLGUIClient *  xmlGuiClient)

Sets the XML GUI client which the view is used in.

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

Parameters:
xmlGuiClientThe KXMLGUIClient the view is used in.

The documentation for this class was generated from the following files:
  • entitytreeview.h
  • dragdropmanager.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
  •   contact
  •   kmime
  • kabc
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  •   richtextbuilders
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Generated for KDE-PIM Libraries by doxygen 1.7.4
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