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

akonadi

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

#include <entitylistview.h>

Inherits QListView.

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

 EntityListView (KXMLGUIClient *xmlGuiClient, QWidget *parent=0)
 
 EntityListView (QWidget *parent=0)
 
virtual ~EntityListView ()
 
bool isDropActionMenuEnabled () const
 
void setDropActionMenuEnabled (bool enabled)
 
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)
 

Detailed Description

A view to show an item/collection list 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()
{
EntityListView *view = new EntityListView( this, this );
setCentralWidget( view );
EntityTreeModel *model = new EntityTreeModel( ... );
KDescendantsProxyModel *flatModel = new KDescendantsProxyModel( this );
flatModel->setSourceModel( model );
view->setModel( flatModel );
}
}
Akonadi::EntityListView
A view to show an item/collection list provided by an EntityTreeModel.
Definition: entitylistview.h:76
Akonadi::EntityListView::setModel
virtual void setModel(QAbstractItemModel *model)
Definition: entitylistview.cpp:164
Akonadi::EntityTreeModel
A model for collections and items together.
Definition: entitytreemodel.h:319
Akonadi
FreeBusyManager::Singleton.
Definition: actionstatemanager_p.h:28
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 75 of file entitylistview.h.

Constructor & Destructor Documentation

◆ EntityListView() [1/2]

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

Creates a new favorite collections view.

Parameters
parentThe parent widget.

Definition at line 142 of file entitylistview.cpp.

◆ EntityListView() [2/2]

EntityListView::EntityListView ( KXMLGUIClient *  xmlGuiClient,
QWidget *  parent = 0 
)
explicit

Creates a new favorite collections 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 150 of file entitylistview.cpp.

◆ ~EntityListView()

EntityListView::~EntityListView ( )
virtual

Destroys the favorite collections view.

Definition at line 158 of file entitylistview.cpp.

Member Function Documentation

◆ clicked [1/2]

void Akonadi::EntityListView::clicked ( const Akonadi::Collection &  collection)
signal

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

Parameters
collectionThe clicked collection.

◆ clicked [2/2]

void Akonadi::EntityListView::clicked ( const Akonadi::Item &  item)
signal

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

Parameters
itemThe clicked item.

◆ contextMenuEvent()

void EntityListView::contextMenuEvent ( QContextMenuEvent *  event)
protectedvirtual

Definition at line 207 of file entitylistview.cpp.

◆ currentChanged [1/2]

void Akonadi::EntityListView::currentChanged ( const Akonadi::Collection &  collection)
signal

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

Parameters
collectionThe new current collection.

◆ currentChanged [2/2]

void Akonadi::EntityListView::currentChanged ( const Akonadi::Item &  item)
signal

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

Parameters
itemThe new current item.

◆ doubleClicked [1/2]

void Akonadi::EntityListView::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.

◆ doubleClicked [2/2]

void Akonadi::EntityListView::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.

◆ dragMoveEvent()

void EntityListView::dragMoveEvent ( QDragMoveEvent *  event)
protectedvirtual

Definition at line 178 of file entitylistview.cpp.

◆ dropEvent()

void EntityListView::dropEvent ( QDropEvent *  event)
protectedvirtual

Definition at line 190 of file entitylistview.cpp.

◆ isDropActionMenuEnabled()

bool EntityListView::isDropActionMenuEnabled ( ) const

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

Since
4.7

Definition at line 257 of file entitylistview.cpp.

◆ setDropActionMenuEnabled()

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

Definition at line 250 of file entitylistview.cpp.

◆ setModel()

void EntityListView::setModel ( QAbstractItemModel *  model)
virtual
<b>Reimplemented from superclass.</b>
Parameters
modelthe model to set

Definition at line 164 of file entitylistview.cpp.

◆ setXmlGuiClient()

void EntityListView::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 233 of file entitylistview.cpp.

◆ startDrag()

void EntityListView::startDrag ( Qt::DropActions  supportedActions)
protectedvirtual

Definition at line 244 of file entitylistview.cpp.

◆ xmlGuiClient()

KXMLGUIClient * EntityListView::xmlGuiClient ( ) const

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

Since
4.12

Definition at line 238 of file entitylistview.cpp.


The documentation for this class was generated from the following files:
  • entitylistview.h
  • entitylistview.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Jul 21 2022 00:00:00 by doxygen 1.9.5 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-4.14.10 API Reference

Skip menu "kdepimlibs-4.14.10 API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
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