KTextAddons

voskspeechtotextinfo.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_export.h"
9#include <QJsonObject>
10#include <QString>
11
12class LIBVOSKSPEECHTOTEXT_EXPORT VoskSpeechToTextInfo
13{
14public:
15 VoskSpeechToTextInfo();
16 ~VoskSpeechToTextInfo();
17
18 [[nodiscard]] bool isValid() const;
19
20 [[nodiscard]] QString identifier() const;
21 void setIdentifier(const QString &newLang);
22
23 [[nodiscard]] QString langText() const;
24 void setLangText(const QString &newLangText);
25
26 [[nodiscard]] QString md5() const;
27 void setMd5(const QString &newMd5);
28
29 [[nodiscard]] QString version() const;
30 void setVersion(const QString &newVersion);
31
32 [[nodiscard]] QString url() const;
33 void setUrl(const QString &newUrl);
34
35 [[nodiscard]] quint64 size() const;
36 void setSize(quint64 newSize);
37
38 [[nodiscard]] bool obsolete() const;
39 void setObsolete(bool newObsolete);
40
41 [[nodiscard]] bool operator==(const VoskSpeechToTextInfo &other) const;
42
43 void parse(const QJsonObject &obj);
44
45 [[nodiscard]] QString type() const;
46 void setType(const QString &newType);
47
48 QString name() const;
49 void setName(const QString &newName);
50
51private:
52 QString mName;
53 QString mType;
54 QString mIdentifier;
55 QString mLangText;
56 QString mMd5;
57 QString mVersion;
58 QString mUrl;
59 quint64 mSize = 0;
60 bool mObsolete = false;
61};
62LIBVOSKSPEECHTOTEXT_EXPORT QDebug operator<<(QDebug d, const VoskSpeechToTextInfo &t);
63Q_DECLARE_METATYPE(VoskSpeechToTextInfo)
64Q_DECLARE_TYPEINFO(VoskSpeechToTextInfo, Q_MOVABLE_TYPE);
Type type(const QSqlDatabase &db)
KCOREADDONS_EXPORT unsigned int version()
QDebug operator<<(QDebug dbg, const DcrawInfoContainer &c)
bool isValid(QStringView ifopt)
QString name(StandardAction id)
bool operator==(const StyleDelim &l, const StyleDelim &r)
FeedPtr parse(const DocumentSource &src, const QString &formatHint=QString())
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:56:02 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.