15 #include <QAbstractItemModel>
17 #include "../../util/btassert.h"
18 #include "../drivers/cswordmoduleinfo.h"
26 , m_nameFilterColumn(0)
27 , m_nameFilterCase(Qt::CaseInsensitive)
29 , m_hiddenFilterColumn(0)
32 { setDynamicSortFilter(
true); }
104 QModelIndex
const & parent)
const
118 QModelIndex
const & parent)
const
123 auto const *
const m = sourceModel();
127 auto const numChildren = m->rowCount(itemIndex);
128 if (numChildren == 0) {
133 for (
int i = 0; i < numChildren; ++i)
141 QModelIndex
const & parent)
const
146 auto const *
const m = sourceModel();
150 auto const numChildren = m->rowCount(itemIndex);
151 if (numChildren == 0) {
152 if (
static_cast<Qt::CheckState
>(m->data(itemIndex,
158 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)
bool filter(WizardTaskType const taskType, QStringList const &languages, CSwordModuleInfo const *const mInfo)