15#include <QAbstractItemModel>
17#include "../../util/btassert.h"
25 , m_nameFilterColumn(0)
26 , m_nameFilterCase(Qt::CaseInsensitive)
28 , m_hiddenFilterColumn(0)
31{ setDynamicSortFilter(
true); }
103 QModelIndex
const & parent)
const
117 QModelIndex
const & parent)
const
122 auto const *
const m = sourceModel();
126 auto const numChildren = m->rowCount(itemIndex);
127 if (numChildren == 0) {
132 for (
int i = 0; i < numChildren; ++i)
140 QModelIndex
const & parent)
const
145 auto const *
const m = sourceModel();
149 auto const numChildren = m->rowCount(itemIndex);
150 if (numChildren == 0) {
151 if (
static_cast<Qt::CheckState
>(m->data(itemIndex,
157 for (
int i = 0; i < numChildren; ++i)
void setNameFilterRole(int role)
void setNameFilterKeyColumn(int column)
void setHiddenFilterRole(int role)
bool nameFilterAcceptsRow(int row, QModelIndex const &parent) const
void setHiddenFilterKeyColumn(int column)
void setShowHidden(bool show)
BtBookshelfFilterModel(QObject *parent=nullptr)
bool filterAcceptsRow(int row, QModelIndex const &parent) const override
bool hiddenFilterAcceptsRow(int row, QModelIndex const &parent) const
void setShowShown(bool show)
void setNameFilterCase(Qt::CaseSensitivity value)
void setEnabled(bool enable)
Qt::CaseSensitivity m_nameFilterCase
void setNameFilterFixedString(QString const &nameFilter)