|
| bool | filterAcceptsRow (int sourceRow, const QModelIndex &sourceParent) const override |
| |
| bool | lessThan (const QModelIndex &sourceLeft, const QModelIndex &sourceRight) const override |
| |
Definition at line 26 of file katecommandbar.cpp.
◆ CommandBarFilterModel()
| CommandBarFilterModel::CommandBarFilterModel |
( |
QObject * | parent = nullptr | ) |
|
|
inline |
◆ filterAcceptsRow()
| bool CommandBarFilterModel::filterAcceptsRow |
( |
int | sourceRow, |
|
|
const QModelIndex & | sourceParent ) const |
|
inlineoverrideprotected |
Definition at line 49 of file katecommandbar.cpp.
50 {
52 return true;
53 }
54
55 int score = 0;
56 const auto idx = sourceModel()->index(sourceRow, 0, sourceParent);
57 if (idx.isValid()){
58 const QString row = idx.data(Qt::DisplayRole).toString();
59 int pos = row.indexOf(QLatin1Char(':'));
60 if (pos < 0) {
61 return false;
62 }
63 const QString actionName = row.mid(pos + 2);
66 return res;
67 }
68 return false;
69 }
static Q_DECL_UNUSED bool fuzzy_match_sequential(const QString pattern, const QString str, int &outScore)
This is a special case function which doesn't score separator matches higher than sequential matches....
References kfts::fuzzy_match_sequential(), m_pattern, and CommandModel::Score.
◆ lessThan()
| bool CommandBarFilterModel::lessThan |
( |
const QModelIndex & | sourceLeft, |
|
|
const QModelIndex & | sourceRight ) const |
|
inlineoverrideprotected |
◆ setFilterString()
| Q_SLOT void CommandBarFilterModel::setFilterString |
( |
const QString & | string | ) |
|
|
inline |
◆ m_pattern
| QString CommandBarFilterModel::m_pattern |
|
private |
The documentation for this class was generated from the following file: