KTextAddons

voskspeechtotextproxymodel.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 "libvoskspeechtotext_private_export.h"
9#include <QSortFilterProxyModel>
10
11class LIBVOSKSPEECHTOTEXT_TESTS_EXPORT VoskSpeechToTextProxyModel : public QSortFilterProxyModel
12{
13 Q_OBJECT
14public:
15 explicit VoskSpeechToTextProxyModel(QObject *parent = nullptr);
16 ~VoskSpeechToTextProxyModel() 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
24 [[nodiscard]] bool lessThan(const QModelIndex &left, const QModelIndex &right) const override;
25
26private:
27 QString mSearchString;
28};
virtual bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const const
virtual bool lessThan(const QModelIndex &source_left, const QModelIndex &source_right) const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:19:49 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.