18 #ifndef QGSLAYOUTATTRIBUTESELECTIONDIALOG_H
19 #define QGSLAYOUTATTRIBUTESELECTIONDIALOG_H
27 #include <QItemDelegate>
28 #include <QAbstractTableModel>
29 #include <QSortFilterProxyModel>
32 #include "ui_qgslayoutattributeselectiondialogbase.h"
41 class QgsLayoutTableAvailableSortProxyModel;
88 virtual QVector<QgsLayoutTableColumn> &columns()
const = 0;
91 virtual QList<Column> displayedColumns()
const = 0;
93 int rowCount(
const QModelIndex &parent = QModelIndex() )
const override;
94 int columnCount(
const QModelIndex &parent = QModelIndex() )
const override;
95 QVariant data(
const QModelIndex &index,
int role )
const override;
96 QVariant headerData(
int section, Qt::Orientation orientation,
int role = Qt::DisplayRole )
const override;
97 bool setData(
const QModelIndex &index,
const QVariant &value,
int role = Qt::EditRole )
override;
98 Qt::ItemFlags flags(
const QModelIndex &index )
const override;
99 bool removeRows(
int row,
int count,
const QModelIndex &parent = QModelIndex() )
override;
100 bool insertRows(
int row,
int count,
const QModelIndex &parent = QModelIndex() )
override;
101 QModelIndex index(
int row,
int column,
const QModelIndex &parent )
const override;
102 QModelIndex parent(
const QModelIndex &child )
const override;
111 bool moveRow(
int row, ShiftDirection direction );
140 QVector<QgsLayoutTableColumn> &
columns()
const override;
176 QVector<QgsLayoutTableColumn> &
columns()
const override;
198 QWidget *createEditor( QWidget *parent,
const QStyleOptionViewItem &option,
const QModelIndex &index )
const override;
199 void setEditorData( QWidget *editor,
const QModelIndex &index )
const override;
200 void setModelData( QWidget *editor, QAbstractItemModel *model,
const QModelIndex &index )
const override;
201 void updateEditorGeometry( QWidget *editor,
const QStyleOptionViewItem &option,
const QModelIndex &index )
const override;
225 QWidget *createEditor( QWidget *parent,
const QStyleOptionViewItem &option,
const QModelIndex &index )
const override;
226 void setEditorData( QWidget *editor,
const QModelIndex &index )
const override;
227 void setModelData( QWidget *editor, QAbstractItemModel *model,
const QModelIndex &index )
const override;
228 void updateEditorGeometry( QWidget *editor,
const QStyleOptionViewItem &option,
const QModelIndex &index )
const override;
230 void commitAndCloseEditor();
234 bool mForceExpressions =
false;
252 QWidget *createEditor( QWidget *parent,
const QStyleOptionViewItem &option,
const QModelIndex &index )
const override;
253 void setEditorData( QWidget *editor,
const QModelIndex &index )
const override;
254 void setModelData( QWidget *editor, QAbstractItemModel *model,
const QModelIndex &index )
const override;
255 void updateEditorGeometry( QWidget *editor,
const QStyleOptionViewItem &option,
const QModelIndex &index )
const override;
273 QWidget *createEditor( QWidget *parent,
const QStyleOptionViewItem &option,
const QModelIndex &index )
const override;
274 void setEditorData( QWidget *editor,
const QModelIndex &index )
const override;
275 void setModelData( QWidget *editor, QAbstractItemModel *model,
const QModelIndex &index )
const override;
276 void updateEditorGeometry( QWidget *editor,
const QStyleOptionViewItem &option,
const QModelIndex &index )
const override;
296 void mRemoveColumnPushButton_clicked();
297 void mAddColumnPushButton_clicked();
298 void mColumnUpPushButton_clicked();
299 void mColumnDownPushButton_clicked();
300 void mResetColumnsPushButton_clicked();
301 void mClearColumnsPushButton_clicked();
302 void mAddSortColumnPushButton_clicked();
303 void mRemoveSortColumnPushButton_clicked();
304 void mSortColumnUpPushButton_clicked();
305 void mSortColumnDownPushButton_clicked();
325 #endif // QGSLAYOUTATTRIBUTESELECTIONDIALOG_H