Skip to content

Commit

Permalink
QgsFeatureListModel inherits QSortFilterProxyModel
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed May 17, 2018
1 parent 2544391 commit 14cefe3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@



class QgsFeatureListModel : QAbstractProxyModel, QgsFeatureModel
class QgsFeatureListModel : QSortFilterProxyModel, QgsFeatureModel
{

%TypeHeaderCode
Expand Down
3 changes: 1 addition & 2 deletions src/gui/attributetable/qgsfeaturelistmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
#include <QSettings>

QgsFeatureListModel::QgsFeatureListModel( QgsAttributeTableFilterModel *sourceModel, QObject *parent )
: QAbstractProxyModel( parent )
, mInjectNull( false )
: QSortFilterProxyModel( parent )
{
setSourceModel( sourceModel );
}
Expand Down
7 changes: 4 additions & 3 deletions src/gui/attributetable/qgsfeaturelistmodel.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include "qgsexpression.h"
#include "qgis.h"

#include <QAbstractProxyModel>
#include <QSortFilterProxyModel>
#include <QVariant>
#include <QItemSelectionModel>

Expand All @@ -36,7 +36,7 @@ class QgsVectorLayerCache;
* \ingroup gui
* \class QgsFeatureListModel
*/
class GUI_EXPORT QgsFeatureListModel : public QAbstractProxyModel, public QgsFeatureModel
class GUI_EXPORT QgsFeatureListModel : public QSortFilterProxyModel, public QgsFeatureModel
{
Q_OBJECT

Expand Down Expand Up @@ -132,9 +132,10 @@ class GUI_EXPORT QgsFeatureListModel : public QAbstractProxyModel, public QgsFea
mutable QgsExpression mDisplayExpression;
QgsAttributeTableFilterModel *mFilterModel = nullptr;
QString mParserErrorString;
bool mInjectNull;
bool mInjectNull = false;
mutable QgsExpressionContext mExpressionContext;
mutable QMap< QgsFeatureId, QList<QgsConditionalStyle> > mRowStylesMap;
bool mSortByDisplayExpression = false;
};

Q_DECLARE_METATYPE( QgsFeatureListModel::FeatureInfo )
Expand Down

0 comments on commit 14cefe3

Please sign in to comment.