mirror of
https://github.com/MultiMC/MultiMC5.git
synced 2024-11-20 17:11:57 +00:00
16 lines
392 B
C++
16 lines
392 B
C++
#pragma once
|
|
#include <QSortFilterProxyModel>
|
|
|
|
class EnabledItemFilter : public QSortFilterProxyModel
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
EnabledItemFilter(QObject *parent = 0);
|
|
void setActive(bool active);
|
|
|
|
protected:
|
|
bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const;
|
|
bool lessThan(const QModelIndex &left, const QModelIndex &right) const;
|
|
private:
|
|
bool m_active = false;
|
|
}; |