akonadi
#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 (KXMLGUIClient *xmlGuiClient, QWidget *parent=0) | |
EntityTreeView (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:
- Since
- 4.4
Definition at line 71 of file entitytreeview.h.
Constructor & Destructor Documentation
◆ EntityTreeView() [1/2]
|
explicit |
Creates a new entity tree view.
- Parameters
-
parent The parent widget.
Definition at line 187 of file entitytreeview.cpp.
◆ EntityTreeView() [2/2]
|
explicit |
Creates a new entity tree view.
- Parameters
-
xmlGuiClient The 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. parent The parent widget.
Definition at line 195 of file entitytreeview.cpp.
◆ ~EntityTreeView()
|
virtual |
Destroys the entity tree view.
Definition at line 203 of file entitytreeview.cpp.
Member Function Documentation
◆ clicked [1/2]
|
signal |
This signal is emitted whenever the user has clicked a collection in the view.
- Parameters
-
collection The clicked collection.
◆ clicked [2/2]
|
signal |
This signal is emitted whenever the user has clicked an item in the view.
- Parameters
-
item The clicked item.
◆ contextMenuEvent()
|
protectedvirtual |
Definition at line 266 of file entitytreeview.cpp.
◆ currentChanged [1/2]
|
signal |
This signal is emitted whenever the current collection in the view has changed.
- Parameters
-
collection The new current collection.
◆ currentChanged [2/2]
|
signal |
This signal is emitted whenever the current item in the view has changed.
- Parameters
-
item The new current item.
◆ doubleClicked [1/2]
|
signal |
This signal is emitted whenever the user has double clicked a collection in the view.
- Parameters
-
collection The double clicked collection.
◆ doubleClicked [2/2]
|
signal |
This signal is emitted whenever the user has double clicked an item in the view.
- Parameters
-
item The double clicked item.
◆ dragMoveEvent()
|
protectedvirtual |
Definition at line 242 of file entitytreeview.cpp.
◆ dropEvent()
|
protectedvirtual |
Definition at line 255 of file entitytreeview.cpp.
◆ isDropActionMenuEnabled()
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 313 of file entitytreeview.cpp.
◆ isManualSortingActive()
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 329 of file entitytreeview.cpp.
◆ setDefaultPopupMenu()
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
-
name The 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 338 of file entitytreeview.cpp.
◆ setDropActionMenuEnabled()
void EntityTreeView::setDropActionMenuEnabled | ( | bool | enabled | ) |
Sets whether the drop action menu is enabled
and will be shown on drop operation.
- Parameters
-
enabled enables drop action menu if set as true
- Since
- 4.5
Definition at line 306 of file entitytreeview.cpp.
◆ setManualSortingActive()
void EntityTreeView::setManualSortingActive | ( | bool | active | ) |
Set true if we automatic sorting.
- Parameters
-
active enables automatic sorting if set as true
- Since
- 4.8.1
Definition at line 322 of file entitytreeview.cpp.
◆ setModel()
|
virtual |
- Reimplemented from superclass.
- Parameters
-
model the model to set
Definition at line 209 of file entitytreeview.cpp.
◆ setXmlGuiClient()
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
-
xmlGuiClient The KXMLGUIClient the view is used in.
Definition at line 289 of file entitytreeview.cpp.
◆ startDrag()
|
protectedvirtual |
Definition at line 300 of file entitytreeview.cpp.
◆ timerEvent()
|
protectedvirtual |
Definition at line 229 of file entitytreeview.cpp.
◆ xmlGuiClient()
KXMLGUIClient * EntityTreeView::xmlGuiClient | ( | ) | const |
Return the XML GUI client which the view is used in.
- Since
- 4.12
Definition at line 294 of file entitytreeview.cpp.
The documentation for this class was generated from the following files:
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.