summaryrefslogtreecommitdiffstats
path: root/storemodel.h
blob: 7407a2168be4bf014c30fba67b1d9b9de94183fe (plain)
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
#ifndef STOREMODEL_H_
#define STOREMODEL_H_

#include <QFileSystemModel>
#include <QRegExp>
#include <QSortFilterProxyModel>

/*!
    \class StoreModel
    \brief The QSortFilterProxyModel for handling filesystem searches.
 */
class StoreModel : public QSortFilterProxyModel {
  Q_OBJECT
private:
  QFileSystemModel *fs;
  QString store;

public:
  StoreModel();

  bool filterAcceptsRow(int, const QModelIndex &) const;
  bool ShowThis(const QModelIndex) const;
  void setModelAndStore(QFileSystemModel *sourceModel, QString passStore);
  QVariant data(const QModelIndex &index, int role) const;
};

#endif // STOREMODEL_H_