KTextAddons

translatorproxymodel.h
1/*
2 SPDX-FileCopyrightText: 2023-2024 Laurent Montel <montel.org>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#pragma once
8#include "libbergamot_private_export.h"
9#include <QSortFilterProxyModel>
10
11class LIBBERGAMOT_TESTS_EXPORT TranslatorProxyModel : public QSortFilterProxyModel
12{
13 Q_OBJECT
14public:
15 explicit TranslatorProxyModel(QObject *parent = nullptr);
16 ~TranslatorProxyModel() override;
17
18 [[nodiscard]] QString searchString() const;
19 void setSearchString(const QString &newSearchString);
20
21protected:
22 [[nodiscard]] bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const override;
23
24private:
25 QString mSearchString;
26};
virtual bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 27 2024 11:48:29 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.