5 #ifndef pqExpressionsTableModel_h 6 #define pqExpressionsTableModel_h 10 #include <QAbstractTableModel> 17 typedef QAbstractTableModel Superclass;
35 QModelIndex addNewExpression();
40 QList<pqExpressionsManager::pqExpression> getExpressions();
45 QList<pqExpressionsManager::pqExpression> getExpressions(
const QString& group);
50 QString getExpressionAsString(
const QModelIndex& idx);
61 QString getGroup(
const QModelIndex& idx);
66 void setExpressions(
const QList<pqExpressionsManager::pqExpression>& expressions);
72 void addExpressions(
const QList<pqExpressionsManager::pqExpression>& expressions);
77 QSet<QString> getGroups();
82 bool setExpressionName(
int idx,
const QString& group);
87 bool setExpressionGroup(
int idx,
const QString& group);
92 void removeExpressions(
const QModelIndexList& index);
97 void removeAllExpressions();
103 int rowCount(
const QModelIndex& parent)
const override;
104 int columnCount(
const QModelIndex& parent)
const override;
105 QVariant
data(
const QModelIndex& index,
int role)
const override;
106 QVariant headerData(
int section, Qt::Orientation orientation,
int role)
const override;
107 Qt::ItemFlags flags(
const QModelIndex& index)
const override;
108 bool setData(
const QModelIndex& index,
const QVariant& value,
int role)
override;
109 bool insertRows(
int position,
int rows,
const QModelIndex& parent)
override;
110 bool removeRows(
int position,
int rows,
const QModelIndex& parent)
override;
117 bool setExpression(
int idx,
const QString& expression);
121 bool removeExpression(
int idx);
#define PQCOMPONENTS_EXPORT
Data structure to handle an expression and its group name.
QList< pqExpressionsManager::pqExpression > Expressions