1 | /* |
2 | SPDX-FileCopyrightText: 2017 Dominik Haumann <dhaumann@kde.org> |
3 | |
4 | SPDX-License-Identifier: LGPL-2.0-or-later |
5 | */ |
6 | |
7 | #ifndef KATE_SCRIPT_EDITOR_H |
8 | #define KATE_SCRIPT_EDITOR_H |
9 | |
10 | #include <QJSValue> |
11 | #include <QObject> |
12 | |
13 | #include <ktexteditor_export.h> |
14 | |
15 | namespace KTextEditor |
16 | { |
17 | class ViewPrivate; |
18 | } |
19 | class QJSEngine; |
20 | |
21 | /** |
22 | * This class wraps the global editor instance KateGlobal, exposing some |
23 | * helper methods such as the clipboard history etc. |
24 | */ |
25 | class KTEXTEDITOR_EXPORT KateScriptEditor : public QObject |
26 | { |
27 | Q_OBJECT |
28 | |
29 | public: |
30 | using QObject::QObject; |
31 | |
32 | Q_INVOKABLE QString clipboardText() const; |
33 | Q_INVOKABLE QStringList clipboardHistory() const; |
34 | Q_INVOKABLE void setClipboardText(const QString &text); |
35 | }; |
36 | |
37 | #endif |
38 | |