CycloBranch
cSequenceDatabaseProxyModel.h
Go to the documentation of this file.
1
7#ifndef _CSEQUENCEDATABASEPROXYMODEL_H
8#define _CSEQUENCEDATABASEPROXYMODEL_H
9
10#include <QString>
11#include <QVariant>
12#include <QComboBox>
13#include <QSortFilterProxyModel>
14#include <QLineEdit>
15#include "core/utilities.h"
16
17
21class cSequenceDatabaseProxyModel : public QSortFilterProxyModel {
22
23 Q_OBJECT
24
25private:
26
27 QComboBox* filteroperator;
28 QComboBox* filtercombobox1;
29 QComboBox* filtercomparatorcombobox1;
30 QLineEdit* filterline1;
31 QComboBox* filtercombobox2;
32 QComboBox* filtercomparatorcombobox2;
33 QLineEdit* filterline2;
34 bool wholeword;
35
36public:
37
38
43 cSequenceDatabaseProxyModel(QObject *parent = 0);
44
45
56 void initialize(QComboBox* rowsfilteroperator, QComboBox* rowsfiltercombobox1, QComboBox* rowsfiltercomparatorcombobox1, QLineEdit* rowsfilterline1, QComboBox* rowsfiltercombobox2, QComboBox* rowsfiltercomparatorcombobox2, QLineEdit* rowsfilterline2);
57
58
63 void setWholeWord(bool wholeword);
64
65
66protected:
67
68
75 bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const Q_DECL_OVERRIDE;
76
77
84 bool lessThan(const QModelIndex &left, const QModelIndex &right) const Q_DECL_OVERRIDE;
85
86
87};
88
89
90#endif
91
A proxy model for editor of database of sequences.
Definition: cSequenceDatabaseProxyModel.h:21
bool lessThan(const QModelIndex &left, const QModelIndex &right) const Q_DECL_OVERRIDE
Reimplementation of lessThan.
Definition: cSequenceDatabaseProxyModel.cpp:94
void setWholeWord(bool wholeword)
Set whole word option.
Definition: cSequenceDatabaseProxyModel.cpp:20
cSequenceDatabaseProxyModel(QObject *parent=0)
The constructor.
Definition: cSequenceDatabaseProxyModel.cpp:4
void initialize(QComboBox *rowsfilteroperator, QComboBox *rowsfiltercombobox1, QComboBox *rowsfiltercomparatorcombobox1, QLineEdit *rowsfilterline1, QComboBox *rowsfiltercombobox2, QComboBox *rowsfiltercomparatorcombobox2, QLineEdit *rowsfilterline2)
Initialize the model.
Definition: cSequenceDatabaseProxyModel.cpp:9
bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const Q_DECL_OVERRIDE
Reimplementation of filterAcceptsRow.
Definition: cSequenceDatabaseProxyModel.cpp:25
Auxiliary funtions and structures.