Akonadi
entitytreeview.cpp
51 void slotSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected) const;
89 mParent->connect(mParent, &QAbstractItemView::doubleClicked, mParent, [this](const auto &index) {
96 void EntityTreeViewPrivate::slotSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected) const
129 const auto collection = idx.model()->data(idx, EntityTreeModel::CollectionRole).value<Collection>();
146 const auto collection = idx.model()->data(idx, EntityTreeModel::CollectionRole).value<Collection>();
163 const auto collection = idx.model()->data(idx, EntityTreeModel::CollectionRole).value<Collection>();
205 connect(selectionModel(), &QItemSelectionModel::currentChanged, this, [this](const auto &index) {
208 connect(selectionModel(), &QItemSelectionModel::selectionChanged, this, [this](const auto &oldSel, const auto &newSel) {
243 if (d->mDragDropManager->processDropEvent(event, menuCanceled, (dropIndicatorPosition() == QAbstractItemView::OnItem))) {
262 popupName = (item.isValid() ? QStringLiteral("akonadi_itemview_contextmenu") : QStringLiteral("akonadi_collectionview_contextmenu"));
265 auto popup = static_cast<QMenu *>(d->mXmlGuiClient->factory()->container(popupName, 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
void setDefaultPopupMenu(const QString &name)
Set the name of the default popup menu (retrieved from the application's XMLGUI file).
Definition: entitytreeview.cpp:321
QAbstractItemView::DropIndicatorPosition dropIndicatorPosition() const const
void doubleClicked(const QModelIndex &index)
A view to show an item/collection tree provided by an EntityTreeModel.
Definition: entitytreeview.h:59
DraggingState
void setXmlGuiClient(KXMLGUIClient *xmlGuiClient)
Sets the XML GUI client which the view is used in.
Definition: entitytreeview.cpp:272
void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected)
bool isManualSortingActive() const
Return true if we use an manual sorting Necessary to fix dnd menu We must show just move when we move...
Definition: entitytreeview.cpp:312
bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *method)
pos
void setModel(QAbstractItemModel *model) override
Definition: entitytreeview.cpp:195
QModelIndex sibling(int row, int column) const const
virtual void setModel(QAbstractItemModel *model) override
virtual QVariant data(const QModelIndex &index, int role) const const=0
void setStretchLastSection(bool stretch)
rect
KXMLGUIClient * xmlGuiClient() const
Return the XML GUI client which the view is used in.
Definition: entitytreeview.cpp:277
QAbstractItemModel * model() const const
QCA_EXPORT void init()
int column() const const
T value() const const
virtual void dropEvent(QDropEvent *event) override
QPoint mapFromGlobal(const QPoint &pos) const const
EditKeyPressed
AscendingOrder
QItemSelectionModel * selectionModel() const const
void setSelectionMode(QAbstractItemView::SelectionMode mode)
void setDropActionMenuEnabled(bool enabled)
Sets whether the drop action menu is enabled and will be shown on drop operation.
Definition: entitytreeview.cpp:289
virtual void timerEvent(QTimerEvent *event) override
virtual bool event(QEvent *event) override
DragDrop
QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QHeaderView * header() const const
bool isDropActionMenuEnabled() const
Returns whether the drop action menu is enabled and will be shown on drop operation.
Definition: entitytreeview.cpp:296
QAbstractItemView::State state() const const
EntityTreeView(QWidget *parent=nullptr)
Creates a new entity tree view.
Definition: entitytreeview.cpp:174
void setExpanded(const QModelIndex &index, bool expanded)
void currentChanged(const QModelIndex ¤t, const QModelIndex &previous)
SingleSelection
QPoint pos()
virtual QModelIndex indexAt(const QPoint &point) const const override
bool isValid() const const
startDragTime
enabled
int row() const const
IgnoreAction
EnsureVisible
virtual void dragMoveEvent(QDragMoveEvent *event) override
void setManualSortingActive(bool active)
Set true if we automatic sorting.
Definition: entitytreeview.cpp:305
void clicked(const QModelIndex &index)
QWidget * viewport() const const
const QAbstractItemModel * model() const const
Helper integration between Akonadi and Qt.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Fri Sep 29 2023 03:51:14 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Fri Sep 29 2023 03:51:14 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.