CycloBranch
cSummaryPeaksTableProxyModel.h
Go to the documentation of this file.
1
7#ifndef _CSUMMARYPEAKSTABLEPROXYMODEL_H
8#define _CSUMMARYPEAKSTABLEPROXYMODEL_H
9
10#include <QString>
11#include <QVariant>
12#include <QSortFilterProxyModel>
13#include <QComboBox>
14#include <QLineEdit>
15#include "core/cParameters.h"
16
17
21class cSummaryPeaksTableProxyModel : public QSortFilterProxyModel {
22
23 Q_OBJECT
24
25private:
26
27 eModeType mode;
28 ePeakListFileFormat peaklistfileformat;
29 bool generateisotopepattern;
30 QComboBox* filteroperator;
31 QComboBox* filtercombobox1;
32 QComboBox* filtercomparatorcombobox1;
33 QLineEdit* filterline1;
34 QComboBox* filtercombobox2;
35 QComboBox* filtercomparatorcombobox2;
36 QLineEdit* filterline2;
37 bool wholeword;
38
39
40public:
41
45 int xmin;
46
47
51 int xmax;
52
53
57 int ymin;
58
59
63 int ymax;
64
65
70 cSummaryPeaksTableProxyModel(QObject *parent = 0);
71
72
86 void initialize(eModeType mode, ePeakListFileFormat peaklistfileformat, bool generateisotopepattern, QComboBox* rowsfilteroperator, QComboBox* rowsfiltercombobox1, QComboBox* rowsfiltercomparatorcombobox1, QLineEdit* rowsfilterline1, QComboBox* rowsfiltercombobox2, QComboBox* rowsfiltercomparatorcombobox2, QLineEdit* rowsfilterline2);
87
88
96 void setRegion(int xmin, int xmax, int ymin, int ymax);
97
98
103 void setWholeWord(bool wholeword);
104
105
106protected:
107
108
115 bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const Q_DECL_OVERRIDE;
116
117
124 bool lessThan(const QModelIndex &left, const QModelIndex &right) const Q_DECL_OVERRIDE;
125
126
127};
128
129
130#endif
131
Definitions of program parameters.
ePeakListFileFormat
Peak list file formats supported by the application.
Definition: cParameters.h:30
A table proxy model.
Definition: cSummaryPeaksTableProxyModel.h:21
int ymax
The maximum Y coordinate.
Definition: cSummaryPeaksTableProxyModel.h:63
bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const Q_DECL_OVERRIDE
Reimplementation of filterAcceptsRow.
Definition: cSummaryPeaksTableProxyModel.cpp:40
void setWholeWord(bool wholeword)
Set whole word option.
Definition: cSummaryPeaksTableProxyModel.cpp:35
int xmax
The maximum X coordinate.
Definition: cSummaryPeaksTableProxyModel.h:51
bool lessThan(const QModelIndex &left, const QModelIndex &right) const Q_DECL_OVERRIDE
Reimplementation of lessThan.
Definition: cSummaryPeaksTableProxyModel.cpp:116
void setRegion(int xmin, int xmax, int ymin, int ymax)
Set the region for filtering.
Definition: cSummaryPeaksTableProxyModel.cpp:27
int xmin
The minimum X coordinate.
Definition: cSummaryPeaksTableProxyModel.h:45
cSummaryPeaksTableProxyModel(QObject *parent=0)
The constructor.
Definition: cSummaryPeaksTableProxyModel.cpp:4
void initialize(eModeType mode, ePeakListFileFormat peaklistfileformat, bool generateisotopepattern, QComboBox *rowsfilteroperator, QComboBox *rowsfiltercombobox1, QComboBox *rowsfiltercomparatorcombobox1, QLineEdit *rowsfilterline1, QComboBox *rowsfiltercombobox2, QComboBox *rowsfiltercomparatorcombobox2, QLineEdit *rowsfilterline2)
Initialize the model.
Definition: cSummaryPeaksTableProxyModel.cpp:13
int ymin
The minimum Y coordinate.
Definition: cSummaryPeaksTableProxyModel.h:57
eModeType
Running modes of the application.
Definition: utilities.h:92