/usr/include/qxrunner/resultsproxymodel.h is in libqxrunner-dev 0.9.2-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 | /*!
* \file resultsproxymodel.h
*
* \brief Declares class ResultsProxyModel.
*/
#ifndef RESULTSPROXYMODEL_H
#define RESULTSPROXYMODEL_H
#include "qxrunner_global.h"
#include "proxymodelcommon.h"
#include <QSortFilterProxyModel>
namespace QxRunner {
class ResultsModel;
/*!
* \brief The ResultsProxyModel class provides support for sorting and
* filtering data passed between ResultsModel and a view.
*
* When the model is set to inactive no data is returned at all. When a
* column of the model is disabled, no data is returned for that column.
*
* Row filtering is based on the result for a particular row. Rows with
* a QxRunner::RunException result are never filtered out.
*
* \sa \ref views
*/
class ResultsProxyModel : public QSortFilterProxyModel,
public ProxyModelCommon
{
Q_OBJECT
public: // Operations
/*!
* Constructs a results proxy model with the given \a parent and
* \a filter.
*/
ResultsProxyModel(QObject* parent, int filter = QxRunner::AllResults);
/*!
* Destroys this results proxy model.
*/
~ResultsProxyModel();
/*!
* Returns the data stored under the given \a role for the item
* referred to by \a index.
*/
QVariant data(const QModelIndex& index, int role) const;
/*!
* Returns the active filter. Is a combination of OR'ed
* QxRunner::RunnerResult values.
*/
int filter() const;
/*!
* Sets the \a filter for the model. Is a combination of OR'ed
* QxRunner::RunnerResult values. Result types defined in the
* filter are included in the model.
*/
void setFilter(int filter);
protected: // Operations
/*!
* Returns true if the value in the item in the row indicated by
* \a source_row should be included in the model. \a source_parent
* is ignored.
*/
bool filterAcceptsRow(int source_row,
const QModelIndex& source_parent) const;
private: // Operations
/*!
* Returns the model that contains the data that is available
* through the proxy model.
*/
ResultsModel* model() const;
// Copy and assignment not supported.
ResultsProxyModel(const ResultsProxyModel&);
ResultsProxyModel& operator=(const ResultsProxyModel&);
private: // Attributes
int m_filter;
};
} // namespace
#endif // RESULTSPROXYMODEL_H
|