Miam-Player  0.8.0
A nice music player
libraryfilterproxymodel.h
Go to the documentation of this file.
1 #ifndef LIBRARYFILTERPROXYMODEL_H
2 #define LIBRARYFILTERPROXYMODEL_H
3 
4 #include <QStandardItem>
6 
7 #include "miamcore_global.h"
8 #include "separatoritem.h"
9 #include "miamlibrary_global.hpp"
10 
19 {
20  Q_OBJECT
21 public:
22  explicit LibraryFilterProxyModel(QObject *parent = nullptr);
23 
25  virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
26 
27 protected:
29  virtual bool filterAcceptsRow(int sourceRow, const QModelIndex &parent) const override;
30 
32  virtual bool lessThan(const QModelIndex &idxLeft, const QModelIndex &idxRight) const override;
33 
34 private:
35  bool filterAcceptsRowItself(int sourceRow, const QModelIndex &sourceParent) const;
36  bool hasAcceptedChildren(int sourceRow, const QModelIndex &sourceParent) const;
37 };
38 
39 #endif // LIBRARYFILTERPROXYMODEL_H
#define MIAMLIBRARY_LIBRARY
Definition: miamlibrary_global.hpp:8
The MiamSortFilterProxyModel class provides support for the MiamItemModel class.
Definition: miamsortfilterproxymodel.h:18
The LibraryFilterProxyModel class is used to filter Library by looking in all items.
Definition: libraryfilterproxymodel.h:18