16#ifndef QGSLAYOUTITEMSLISTVIEW_H
17#define QGSLAYOUTITEMSLISTVIEW_H
25#include <QSortFilterProxyModel>
53 QVariant
data(
const QModelIndex &index,
int role = Qt::DisplayRole )
const override;
60 bool filterAcceptsRow(
int sourceRow,
const QModelIndex &sourceParent )
const override;
92 void showContextMenu( QPoint point );
95 void updateSelection();
104 bool mUpdatingSelection =
false;
105 bool mUpdatingFromView =
false;
A common interface for layout designer dialogs and widgets.
Base class for graphical items within a QgsLayout.
Model for the layout items list view.
QgsLayoutItem * itemFromIndex(const QModelIndex &index) const
Returns the layout item listed at the specified index.
bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override
QgsLayoutItemsListViewModel(QgsLayoutModel *model, QObject *parent)
constructor
void setSelected(const QModelIndex &index)
Sets the selected index.
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const override
QModelIndex indexForItem(QgsLayoutItem *item, const int column=0) const
Returns the model index matching the specified layout item.
void setCurrentLayout(QgsLayout *layout)
Sets the current layout.
QgsLayoutItemsListView(QWidget *parent, QgsLayoutDesignerInterface *designer)
Constructor for QgsLayoutItemsListView.
void keyPressEvent(QKeyEvent *event) override
A model for items attached to a layout.
Base class for layouts, which can contain items such as maps, labels, scalebars, etc.