KTextAddons

textautogeneratetextplugin.h
1/*
2 SPDX-FileCopyrightText: 2025 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#pragma once
8#include "textautogeneratetext_export.h"
9#include <QObject>
10#include <memory>
11namespace TextAutogenerateText
12{
13class TextAutoGenerateMessage;
14/**
15 * @brief The TextAutogenerateTextPlugin class
16 * @author Laurent Montel <montel@kde.org>
17 */
18class TextAutogenerateTextPluginPrivate;
19class TEXTAUTOGENERATETEXT_EXPORT TextAutogenerateTextPlugin : public QObject
20{
21 Q_OBJECT
22public:
23 explicit TextAutogenerateTextPlugin(QObject *parent = nullptr);
24 ~TextAutogenerateTextPlugin() override;
25
26 [[nodiscard]] virtual bool loadSettings() = 0;
27
28 virtual void clear() = 0;
29 [[nodiscard]] virtual QString result() = 0;
30
31 virtual void setPrompt(const QString &text) = 0;
32
33 void setHasError(bool error);
34
35 [[nodiscard]] bool ready() const;
36 void setReady(bool newReady);
37
38 void sendMessage(const QString &str);
39 virtual void stop() = 0;
40
41Q_SIGNALS:
42 void errorOccurred(const QString &message);
43 void finished(const TextAutoGenerateMessage &msg);
44
45protected:
46 virtual void sendToLLM(const QString &message) = 0;
47
48private:
49 std::unique_ptr<TextAutogenerateTextPluginPrivate> const d;
50};
51}
void stop(Ekos::AlignState mode)
QAction * clear(const QObject *recvr, const char *slot, QObject *parent)
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Apr 18 2025 12:00:52 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.