19 #ifndef _FIELDCONCATMODEL_HPP_
20 #define _FIELDCONCATMODEL_HPP_
23 #include <QAbstractTableModel>
24 #include <QModelIndexList>
25 #include <QStringList>
48 FieldConcatModel(QSqlTableModel *backingModel, QStringList fieldNames, QString seperationString =
" | ", QObject *parent = 0);
50 virtual int columnCount(
const QModelIndex& parent = QModelIndex() )
const;
51 QString displayStringForRecord(QSqlRecord& record)
const;
52 virtual QVariant data(
const QModelIndex& index,
int role = Qt::DisplayRole )
const;
53 int idForDisplayString(QString displayString);
54 virtual int rowCount(
const QModelIndex& parent = QModelIndex() )
const;
55 void setFilter(
const QString& filter);
74 QSqlTableModel *dataModel;
77 #endif // _FIELDCONCATMODEL_HPP_
FieldConcatModel(QSqlTableModel *backingModel, QStringList fieldNames, QString seperationString=" | ", QObject *parent=0)
the default constructor
Allows for concatinating fields from a model for disply.