File indexing completed on 2024-05-19 07:47:00
0001 /* 0002 SPDX-FileCopyrightText: 2017 Dominik Haumann <dhaumann@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #ifndef KATE_SCRIPT_EDITOR_H 0008 #define KATE_SCRIPT_EDITOR_H 0009 0010 #include <QJSValue> 0011 #include <QObject> 0012 0013 #include <ktexteditor_export.h> 0014 0015 namespace KTextEditor 0016 { 0017 class ViewPrivate; 0018 } 0019 class QJSEngine; 0020 0021 /** 0022 * This class wraps the global editor instance KateGlobal, exposing some 0023 * helper methods such as the clipboard history etc. 0024 */ 0025 class KTEXTEDITOR_EXPORT KateScriptEditor : public QObject 0026 { 0027 Q_OBJECT 0028 0029 public: 0030 using QObject::QObject; 0031 0032 Q_INVOKABLE QString clipboardText() const; 0033 Q_INVOKABLE QStringList clipboardHistory() const; 0034 Q_INVOKABLE void setClipboardText(const QString &text); 0035 }; 0036 0037 #endif