CycloBranch
cSpectrumDetailProxyModel.h
Go to the documentation of this file.
1
7#ifndef _CSPECTRUMDETAILPROXYMODEL_H
8#define _CSPECTRUMDETAILPROXYMODEL_H
9
10#include <QString>
11#include <QVariant>
12#include <QSortFilterProxyModel>
13#include <QStandardItemModel>
14
15
19class cSpectrumDetailProxyModel : public QSortFilterProxyModel {
20
21 Q_OBJECT
22
23private:
24
25 bool hidematched, hideunmatched, hidescrambled, hideionseries, hideneutralloss, hiderotations, hidetrotations;
26
27public:
28
29
34 cSpectrumDetailProxyModel(QObject *parent = 0);
35
36
47 void setFlags(bool hidematched, bool hideunmatched, bool hidescrambled, bool hideionseries, bool hideneutralloss, bool hiderotations, bool hidetrotations);
48
49
50protected:
51
52
59 bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const Q_DECL_OVERRIDE;
60
61
68 bool lessThan(const QModelIndex &left, const QModelIndex &right) const Q_DECL_OVERRIDE;
69
70
71};
72
73
74#endif
75
A table proxy model.
Definition: cSpectrumDetailProxyModel.h:19
bool lessThan(const QModelIndex &left, const QModelIndex &right) const Q_DECL_OVERRIDE
Reimplementation of lessThan.
Definition: cSpectrumDetailProxyModel.cpp:62
cSpectrumDetailProxyModel(QObject *parent=0)
The constructor.
Definition: cSpectrumDetailProxyModel.cpp:4
void setFlags(bool hidematched, bool hideunmatched, bool hidescrambled, bool hideionseries, bool hideneutralloss, bool hiderotations, bool hidetrotations)
Set the flags for filtering.
Definition: cSpectrumDetailProxyModel.cpp:15
bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const Q_DECL_OVERRIDE
Reimplementation of filterAcceptsRow.
Definition: cSpectrumDetailProxyModel.cpp:26