Akonadi
entitytreeview.cpp
51 void slotSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected) const;
89 mParent->connect(mParent, &QAbstractItemView::doubleClicked, mParent, [this](const auto &index) {
96void 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
A view to show an item/collection tree provided by an EntityTreeModel.
Definition entitytreeview.h:60
void doubleClicked(const Akonadi::Collection &collection)
This signal is emitted whenever the user has double clicked a collection in the view.
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
KXMLGUIClient * xmlGuiClient() const
Return the XML GUI client which the view is used in.
Definition entitytreeview.cpp:277
EntityTreeView(QWidget *parent=nullptr)
Creates a new entity tree view.
Definition entitytreeview.cpp:174
void setModel(QAbstractItemModel *model) override
Definition entitytreeview.cpp:195
void setDropActionMenuEnabled(bool enabled)
Sets whether the drop action menu is enabled and will be shown on drop operation.
Definition entitytreeview.cpp:289
void clicked(const Akonadi::Collection &collection)
This signal is emitted whenever the user has clicked a collection in the view.
void setDefaultPopupMenu(const QString &name)
Set the name of the default popup menu (retrieved from the application's XMLGUI file).
Definition entitytreeview.cpp:321
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 entitytreeview.cpp:272
bool isDropActionMenuEnabled() const
Returns whether the drop action menu is enabled and will be shown on drop operation.
Definition entitytreeview.cpp:296
void setManualSortingActive(bool active)
Set true if we automatic sorting.
Definition entitytreeview.cpp:305
Helper integration between Akonadi and Qt.
virtual QVariant data(const QModelIndex &index, int role) const const=0
virtual void fetchMore(const QModelIndex &parent)
DragDrop
EditKeyPressed
EnsureVisible
SingleSelection
DraggingState
void clicked(const QModelIndex &index)
void doubleClicked(const QModelIndex &index)
void setDragDropMode(DragDropMode behavior)
void setDragEnabled(bool enable)
virtual void dropEvent(QDropEvent *event) override
DropIndicatorPosition dropIndicatorPosition() const const
void setEditTriggers(EditTriggers triggers)
virtual bool event(QEvent *event) override
QAbstractItemModel * model() const const
void setSelectionMode(QAbstractItemView::SelectionMode mode)
QItemSelectionModel * selectionModel() const const
void setItemDelegate(QAbstractItemDelegate *delegate)
void setDropIndicatorShown(bool enable)
State state() const const
QWidget * viewport() const const
startDragTime
QPoint pos()
void setSectionsClickable(bool clickable)
void setStretchLastSection(bool stretch)
void currentChanged(const QModelIndex ¤t, const QModelIndex &previous)
void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected)
int column() const const
bool isValid() const const
const QAbstractItemModel * model() const const
int row() const const
QModelIndex sibling(int row, int column) const const
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
bool disconnect(const QMetaObject::Connection &connection)
IgnoreAction
AscendingOrder
virtual void dragMoveEvent(QDragMoveEvent *event) override
QHeaderView * header() const const
virtual QModelIndex indexAt(const QPoint &point) const const override
virtual void scrollTo(const QModelIndex &index, ScrollHint hint) override
void setExpanded(const QModelIndex &index, bool expanded)
virtual void setModel(QAbstractItemModel *model) override
void sortByColumn(int column, Qt::SortOrder order)
void setSortingEnabled(bool enable)
virtual void timerEvent(QTimerEvent *event) override
T value() const const
void setAcceptDrops(bool on)
enabled
QPoint mapFromGlobal(const QPoint &pos) const const
pos
rect
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:31:59 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:31:59 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.