Krita Source Code Documentation
Loading...
Searching...
No Matches
LanguagesFilterModel Class Reference

The LanguagesFilterModel class class that tests both the name and the code. More...

#include <LocaleHandler.h>

+ Inheritance diagram for LanguagesFilterModel:

Public Member Functions

bool filterAcceptsRow (int source_row, const QModelIndex &source_parent) const override
 
 LanguagesFilterModel (QObject *parent=nullptr)
 

Detailed Description

The LanguagesFilterModel class class that tests both the name and the code.

Definition at line 138 of file LocaleHandler.h.

Constructor & Destructor Documentation

◆ LanguagesFilterModel()

LanguagesFilterModel::LanguagesFilterModel ( QObject * parent = nullptr)

Definition at line 345 of file LocaleHandler.cpp.

346 : QSortFilterProxyModel(parent)
347{
348
349}

Member Function Documentation

◆ filterAcceptsRow()

bool LanguagesFilterModel::filterAcceptsRow ( int source_row,
const QModelIndex & source_parent ) const
override

Definition at line 351 of file LocaleHandler.cpp.

352{
353 QModelIndex idx = sourceModel()->index(source_row, 0, source_parent);
354 const QString name = sourceModel()->data(idx).toString();
355 const QString code = sourceModel()->data(idx, AllLanguagesModel::Code).toString();
356
357 return (name.contains(filterRegularExpression()) || code.contains(filterRegularExpression()));
358}
const char * name(StandardAction id)

References AllLanguagesModel::Code.


The documentation for this class was generated from the following files: