2 #ifndef __libquark_gui_BasicFilterTableModel_hxx 3 #define __libquark_gui_BasicFilterTableModel_hxx 5 #include <QSortFilterProxyModel> 25 template<
class T,
class IS = QDataStream,
class OS = QDataStream>
53 {
return(_sourceModel); }
59 QObject *parent = NULL);
94 const QVariant &value2)
const;
98 virtual Qt::ItemFlags flags(
const QModelIndex &index)
const;
100 virtual bool filterAcceptsRow(
int sourceRow,
101 const QModelIndex &sourceParent)
const;
102 virtual bool filterAcceptsColumn(
int sourceColumn,
103 const QModelIndex &sourceParent)
const;
104 bool lessThan(
const QModelIndex &left,
const QModelIndex &right)
const;
115 #include <quark/BasicFilterTableModelImpl.h++> 120 #endif // __libquark_gui_BasicFilterTableModel_hxx BasicFilterTableModel(AbstractTableModel< T, IS, OS > *sourceModel, QObject *parent=NULL)
Constructs a new BasicFilterTableModel with the given source model.
bool isEmpty() const
Tests if this model is empty.
bool isEditable() const
Tests whether this model is editable.
int itemCount() const
Returns the number of (filtered) items in this model.
void setEditable(bool editable)
Sets the editability of this model.
T * getItemAt(int row) const
Returns the filtered item at the given row in this model.
Definition: BarChartView.h++:6
virtual bool fieldLessThan(int field, const QVariant &value1, const QVariant &value2) const
Compares the values of a given field of two items in the model, for the purpose of sorting...
An abstract base class for table data models, i.e., models in which every row represents an instance ...
Definition: AbstractTableModel.h++:40
virtual ~BasicFilterTableModel()
Destructor.
AbstractTableModel< T, IS, OS > * sourceModel() const
Returns this filter model's source model.
Definition: BasicFilterTableModel.h++:52
virtual bool filterAcceptsItem(const T &item) const
Called to test whether a given item in the model is accepted by this filter.
virtual bool filterAcceptsField(int field) const
Called to test whether a given field in the model is accepted by this filter.
T * getItemForIndex(const QModelIndex &index) const
Returns the filtered item at the given index in this model.
An abstract subclass of QSortFilterProxyModel for sorting and filtering of AbstractTableModels.
Definition: BasicFilterTableModel.h++:26