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 349 of file LocaleHandler.cpp.

350 : QSortFilterProxyModel(parent)
351{
352
353}

Member Function Documentation

◆ filterAcceptsRow()

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

Definition at line 355 of file LocaleHandler.cpp.

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

References AllLanguagesModel::Code.


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