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

akonadi

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

#include <itemview.h>

Inherits QTreeView.

Signals

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

Public Member Functions

 ItemView (KXMLGUIClient *xmlGuiClient, QWidget *parent=0)
 
AKONADI_DEPRECATED ItemView (KXmlGuiWindow *xmlGuiWindow, QWidget *parent=0)
 
 ItemView (QWidget *parent=0)
 
virtual ~ItemView ()
 
virtual void setModel (QAbstractItemModel *model)
 
void setXmlGuiClient (KXMLGUIClient *xmlGuiClient)
 
AKONADI_DEPRECATED void setXmlGuiWindow (KXmlGuiWindow *xmlGuiWindow)
 

Protected Member Functions

void contextMenuEvent (QContextMenuEvent *event)
 

Detailed Description

A view to show an item list provided by an ItemModel.

When a KXmlGuiWindow is set, the XMLGUI defined context menu akonadi_itemview_contextmenu is used if available.

Example:

class MyWindow : public KXmlGuiWindow
{
public:
MyWindow()
: KXmlGuiWindow()
{
Akonadi::ItemView *view = new Akonadi::ItemView( this, this );
setCentralWidget( view );
Akonadi::ItemModel *model = new Akonadi::ItemModel( this );
view->setModel( model );
}
}
Akonadi::ItemModel
A table model for items.
Definition itemmodel.h:57
Akonadi::ItemView
A view to show an item list provided by an ItemModel.
Definition itemview.h:61
Author
Tobias Koenig tokoe.nosp@m.@kde.nosp@m..org

Definition at line 60 of file itemview.h.

Constructor & Destructor Documentation

◆ ItemView() [1/3]

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

Creates a new item view.

Parameters
parentThe parent widget.

Definition at line 142 of file itemview.cpp.

◆ ItemView() [2/3]

ItemView::ItemView ( KXmlGuiWindow * xmlGuiWindow,
QWidget * parent = 0 )
explicit

Creates a new item view.

Parameters
xmlGuiWindowThe KXmlGuiWindow this 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 149 of file itemview.cpp.

◆ ItemView() [3/3]

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

Creates a new item view.

Parameters
xmlGuiClientThe KXMLGUIClient this 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.
Since
4.3

Definition at line 157 of file itemview.cpp.

◆ ~ItemView()

ItemView::~ItemView ( )
virtual

Destroys the item view.

Definition at line 165 of file itemview.cpp.

Member Function Documentation

◆ activated

void Akonadi::ItemView::activated ( const Akonadi::Item & item)
signal

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

Parameters
itemThe activated item.

◆ clicked

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

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

Parameters
itemThe item the user clicked on.
Since
4.3

◆ contextMenuEvent()

void ItemView::contextMenuEvent ( QContextMenuEvent * event)
protected

Definition at line 178 of file itemview.cpp.

◆ currentChanged

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

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

Parameters
itemThe current item.

◆ doubleClicked

void Akonadi::ItemView::doubleClicked ( const Akonadi::Item & item)
signal

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

Parameters
itemThe item the user double clicked on.
Since
4.3

◆ setModel()

void ItemView::setModel ( QAbstractItemModel * model)
virtual

Definition at line 170 of file itemview.cpp.

◆ setXmlGuiClient()

void ItemView::setXmlGuiClient ( KXMLGUIClient * xmlGuiClient)

Sets the KXMLGUIFactory which this view is used in.

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

Parameters
xmlGuiClientThe KXMLGUIClient this view is used in.

Definition at line 195 of file itemview.cpp.

◆ setXmlGuiWindow()

void ItemView::setXmlGuiWindow ( KXmlGuiWindow * xmlGuiWindow)

Sets the KXmlGuiWindow which this view is used in.

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

Parameters
xmlGuiWindowThe KXmlGuiWindow this view is used in.

Definition at line 190 of file itemview.cpp.


The documentation for this class was generated from the following files:
  • itemview.h
  • itemview.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Wed Jan 24 2024 00:00:00 by doxygen 1.10.0 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
  • 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