CANdevStudio
Development tool for CAN bus simulation
Loading...
Searching...
No Matches
searchmodel.h
Go to the documentation of this file.
1#ifndef __SEARCHMODEL_H
2#define __SEARCHMODEL_H
3
4#include <QSortFilterProxyModel>
5
6class SearchModel : public QSortFilterProxyModel {
7 Q_OBJECT
8public:
9 bool isFilterActive() const;
10
11 QMimeData* mimeData(const QModelIndexList& indexes) const override;
12 QStringList mimeTypes() const override;
13
14protected:
15 bool filterAcceptsRow(int sourceRow, const QModelIndex& sourceParent) const override;
16
17public slots:
18 void updateFilter(const QString& filter);
19
20private:
21 QString _filter;
22};
23
24#endif /* !__SEARCHMODEL_H */
Definition searchmodel.h:6
void updateFilter(const QString &filter)
Definition searchmodel.cpp:56
bool isFilterActive() const
Definition searchmodel.cpp:8
QMimeData * mimeData(const QModelIndexList &indexes) const override
Definition searchmodel.cpp:13
bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override
Definition searchmodel.cpp:43
QStringList mimeTypes() const override
Definition searchmodel.cpp:38