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

akonadi

  • Akonadi
  • EntityTreeView
Signals | Public Member Functions | Protected Member Functions | List of all members
Akonadi::EntityTreeView Class Reference

#include <entitytreeview.h>

Inherits QTreeView.

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::Collection &collection)
 
void doubleClicked (const Akonadi::Item &item)
 

Public Member Functions

 EntityTreeView (QWidget *parent=0)
 
 EntityTreeView (KXMLGUIClient *xmlGuiClient, QWidget *parent=0)
 
virtual ~EntityTreeView ()
 
bool isDropActionMenuEnabled () const
 
bool isManualSortingActive () const
 
void setDefaultPopupMenu (const QString &name)
 
void setDropActionMenuEnabled (bool enabled)
 
void setManualSortingActive (bool active)
 
virtual void setModel (QAbstractItemModel *model)
 
void setXmlGuiClient (KXMLGUIClient *xmlGuiClient)
 
KXMLGUIClient * xmlGuiClient () const
 

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 vkrau.nosp@m.se@k.nosp@m.de.or.nosp@m.g
Stephen Kelly steve.nosp@m.ire@.nosp@m.gmail.nosp@m..com
Since
4.4

Definition at line 71 of file entitytreeview.h.

Constructor & Destructor Documentation

EntityTreeView::EntityTreeView ( QWidget *  parent = 0)
explicit

Creates a new entity tree view.

Parameters
parentThe parent widget.

Definition at line 184 of file entitytreeview.cpp.

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.

Definition at line 192 of file entitytreeview.cpp.

EntityTreeView::~EntityTreeView ( )
virtual

Destroys the entity tree view.

Definition at line 200 of file entitytreeview.cpp.

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::Collection &  collection)
signal

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

Parameters
collectionThe double clicked collection.
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.
bool EntityTreeView::isDropActionMenuEnabled ( ) const

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

Since
4.5

Definition at line 308 of file entitytreeview.cpp.

bool EntityTreeView::isManualSortingActive ( ) const

Return true if we use an manual sorting Necessary to fix dnd menu We must show just move when we move item between two items When automatic no show dnd menu between two items.

Since
4.8.1

Definition at line 324 of file entitytreeview.cpp.

void EntityTreeView::setDefaultPopupMenu ( const QString &  name)

Set the name of the default popup menu (retrieved from the application's XMLGUI file).

This menu is used as a fallback if the context of the menu request is neither an item nor a collection, e.g. the click is on an empty area inside the view. If the click is over an entry in the view, the menu which is applicable to the clicked entry (either an Item or a Collection) is used.

Parameters
nameThe name of the popup menu
Since
4.9
Note
For backwards compatibility, the default is the standard collection popup menu, "akonadi_collectionview_contextmenu".
See also
KXMLGUIClient, KXMLGUIFactory::container()

Definition at line 333 of file entitytreeview.cpp.

void EntityTreeView::setDropActionMenuEnabled ( bool  enabled)

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

Parameters
enabledenables drop action menu if set as true
Since
4.5

Definition at line 301 of file entitytreeview.cpp.

void EntityTreeView::setManualSortingActive ( bool  active)

Set true if we automatic sorting.

Parameters
activeenables automatic sorting if set as true
Since
4.8.1

Definition at line 317 of file entitytreeview.cpp.

void EntityTreeView::setModel ( QAbstractItemModel *  model)
virtual
Reimplemented from superclass.
Parameters
modelthe model to set

Definition at line 206 of file entitytreeview.cpp.

void 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.

Definition at line 284 of file entitytreeview.cpp.

KXMLGUIClient * EntityTreeView::xmlGuiClient ( ) const

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

Since
4.12

Definition at line 289 of file entitytreeview.cpp.


The documentation for this class was generated from the following files:
  • entitytreeview.h
  • entitytreeview.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:00:28 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

akonadi

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

kdepimlibs API Reference

Skip menu "kdepimlibs API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kldap
  • kmbox
  • kmime
  • kpimidentities
  • kpimtextedit
  • kresources
  • ktnef
  • kxmlrpcclient
  • microblog

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