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 EntityTreeView::Private::slotSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected) const
129 const Collection collection = idx.model()->data(idx, EntityTreeModel::CollectionRole).value<Collection>();
146 const Collection collection = idx.model()->data(idx, EntityTreeModel::CollectionRole).value<Collection>();
163 const Collection collection = idx.model()->data(idx, EntityTreeModel::CollectionRole).value<Collection>();
206 connect(selectionModel(), &QItemSelectionModel::currentChanged, this, [this](const auto &index) {
209 connect(selectionModel(), &QItemSelectionModel::selectionChanged, this, [this](const auto &oldSel, const auto &newSel) {
244 if (d->mDragDropManager->processDropEvent(event, menuCanceled, (dropIndicatorPosition() == QAbstractItemView::OnItem))) {
263 popupName = (item.isValid() ? QStringLiteral("akonadi_itemview_contextmenu") : QStringLiteral("akonadi_collectionview_contextmenu"));
266 auto popup = static_cast<QMenu *>(d->mXmlGuiClient->factory()->container(popupName, d->mXmlGuiClient));
void doubleClicked(const QModelIndex &index)
void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected)
virtual void dragMoveEvent(QDragMoveEvent *event) override
DraggingState
QAbstractItemView::DropIndicatorPosition dropIndicatorPosition() const const
void setSelectionMode(QAbstractItemView::SelectionMode mode)
QItemSelectionModel * selectionModel() const const
void setDefaultPopupMenu(const QString &name)
Set the name of the default popup menu (retrieved from the application's XMLGUI file).
Definition: entitytreeview.cpp:322
const QPersistentModelIndex & bottomRight() const const
T value() const const
QWidget * viewport() const const
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:313
void setManualSortingActive(bool active)
Set true if we automatic sorting.
Definition: entitytreeview.cpp:306
bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *method)
void setExpanded(const QModelIndex &index, bool expanded)
bool isValid() const const
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:250
enabled
KXMLGUIClient * xmlGuiClient() const
Return the XML GUI client which the view is used in.
Definition: entitytreeview.cpp:278
virtual void timerEvent(QTimerEvent *event) override
A view to show an item/collection tree provided by an EntityTreeModel.
Definition: entitytreeview.h:57
void setDropActionMenuEnabled(bool enabled)
Sets whether the drop action menu is enabled and will be shown on drop operation. ...
Definition: entitytreeview.cpp:290
EntityTreeView(QWidget *parent=nullptr)
Creates a new entity tree view.
Definition: entitytreeview.cpp:174
int row() const const
bool isDropActionMenuEnabled() const
Returns whether the drop action menu is enabled and will be shown on drop operation.
Definition: entitytreeview.cpp:297
QPoint pos() const const
virtual QVariant data(const QModelIndex &index, int role) const const =0
QRect rect() const const
void setModel(QAbstractItemModel *model) override
Definition: entitytreeview.cpp:196
SingleSelection
QCA_EXPORT void init()
QAbstractItemView::State state() const const
void currentChanged(const QModelIndex ¤t, const QModelIndex &previous)
EnsureVisible
virtual bool event(QEvent *event) override
int startDragTime()
const QAbstractItemModel * model() const const
QPoint pos()
AscendingOrder
QModelIndex sibling(int row, int column) const const
Helper integration between Akonadi and Qt.
virtual void setModel(QAbstractItemModel *model) override
virtual void dropEvent(QDropEvent *event) override
QPoint mapFromGlobal(const QPoint &pos) const const
int column() const const
int timerId() const const
void clicked(const QModelIndex &index)
QHeaderView * header() const const
QAbstractItemModel * model() const const
void setStretchLastSection(bool stretch)
QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
void setXmlGuiClient(KXMLGUIClient *xmlGuiClient)
Sets the XML GUI client which the view is used in.
Definition: entitytreeview.cpp:273
QObject * parent() const const
IgnoreAction
int row() const const
virtual QModelIndex indexAt(const QPoint &point) const const override
EditKeyPressed
const QPersistentModelIndex & topLeft() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Thu Mar 4 2021 23:18:11 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2021 The KDE developers.
Generated on Thu Mar 4 2021 23:18:11 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.