Akonadi
entitylistview.cpp
64 mParent->connect(mParent, &QAbstractItemView::doubleClicked, mParent, [this](const auto &index) {
81 const auto collection = index.model()->data(index, EntityTreeModel::CollectionRole).value<Collection>();
98 const auto collection = index.model()->data(index, EntityTreeModel::CollectionRole).value<Collection>();
115 const auto collection = index.model()->data(index, EntityTreeModel::CollectionRole).value<Collection>();
155 connect(selectionModel(), &QItemSelectionModel::currentChanged, this, [this](const QModelIndex &index) {
193 const auto collection = model()->data(index, EntityTreeModel::CollectionRole).value<Collection>();
195 popup = static_cast<QMenu *>(d->mXmlGuiClient->factory()->container(QStringLiteral("akonadi_favoriteview_contextmenu"), d->mXmlGuiClient));
198 static_cast<QMenu *>(d->mXmlGuiClient->factory()->container(QStringLiteral("akonadi_favoriteview_emptyselection_contextmenu"), d->mXmlGuiClient));
static void widgetNeedsAkonadi(QWidget *widget)
Disable the given widget when Akonadi is not operational and show an error overlay (given enough spac...
Definition controlgui.cpp:243
A view to show an item/collection list provided by an EntityTreeModel.
Definition entitylistview.h:64
void setDropActionMenuEnabled(bool enabled)
Sets whether the drop action menu is enabled and will be shown on drop operation.
Definition entitylistview.cpp:224
void currentChanged(const Akonadi::Collection &collection)
This signal is emitted whenever the current collection in the view has changed.
void setXmlGuiClient(KXMLGUIClient *xmlGuiClient)
Sets the XML GUI client which the view is used in.
Definition entitylistview.cpp:207
void clicked(const Akonadi::Collection &collection)
This signal is emitted whenever the user has clicked a collection in the view.
bool isDropActionMenuEnabled() const
Returns whether the drop action menu is enabled and will be shown on drop operation.
Definition entitylistview.cpp:231
void setModel(QAbstractItemModel *model) override
Definition entitylistview.cpp:147
void doubleClicked(const Akonadi::Collection &collection)
This signal is emitted whenever the user has double clicked a collection in the view.
KXMLGUIClient * xmlGuiClient() const
Return the XML GUI client which the view is used in.
Definition entitylistview.cpp:212
EntityListView(QWidget *parent=nullptr)
Creates a new favorite collections view.
Definition entitylistview.cpp:126
Helper integration between Akonadi and Qt.
virtual QVariant data(const QModelIndex &index, int role) const const=0
DragDrop
EditKeyPressed
SingleSelection
void clicked(const QModelIndex &index)
void doubleClicked(const QModelIndex &index)
void setDragDropMode(DragDropMode behavior)
void setDragEnabled(bool enable)
void setEditTriggers(EditTriggers triggers)
QAbstractItemModel * model() const const
void setSelectionMode(QAbstractItemView::SelectionMode mode)
QItemSelectionModel * selectionModel() const const
void setItemDelegate(QAbstractItemDelegate *delegate)
virtual void setModel(QAbstractItemModel *model)
void setDropIndicatorShown(bool enable)
void currentChanged(const QModelIndex ¤t, const QModelIndex &previous)
virtual void dragMoveEvent(QDragMoveEvent *e) override
virtual void dropEvent(QDropEvent *event) override
virtual bool event(QEvent *e) override
virtual QModelIndex indexAt(const QPoint &p) const const override
bool isValid() const const
const QAbstractItemModel * model() const const
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
bool disconnect(const QMetaObject::Connection &connection)
IgnoreAction
T value() const const
void setAcceptDrops(bool on)
enabled
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:03:34 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:03:34 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.