KTextEditor

katescripteditor.h
1 /* SPDX-License-Identifier: LGPL-2.0-or-later
2 
3  Copyright (C) 2017 Dominik Haumann <[email protected]>
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Library General Public
7  License as published by the Free Software Foundation; either
8  version 2 of the License, or (at your option) any later version.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Library General Public License for more details.
14 
15  You should have received a copy of the GNU Library General Public License
16  along with this library; see the file COPYING.LIB. If not, write to
17  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  Boston, MA 02110-1301, USA.
19 */
20 
21 #ifndef KATE_SCRIPT_EDITOR_H
22 #define KATE_SCRIPT_EDITOR_H
23 
24 #include <QJSValue>
25 #include <QObject>
26 
27 #include <ktexteditor_export.h>
28 
29 namespace KTextEditor
30 {
31 class ViewPrivate;
32 }
33 class QJSEngine;
34 
39 class KTEXTEDITOR_EXPORT KateScriptEditor : public QObject
40 {
41  Q_OBJECT
42 
43 public:
44  explicit KateScriptEditor(QJSEngine *engine, QObject *parent = nullptr);
45 
46  Q_INVOKABLE QString clipboardText() const;
47  Q_INVOKABLE QStringList clipboardHistory() const;
48  Q_INVOKABLE void setClipboardText(const QString &text);
49 
50 private:
51  QJSEngine *m_engine = nullptr;
52 };
53 
54 #endif
This class wraps the global editor instance KateGlobal, exposing some helper methods such as the clip...
The KTextEditor namespace contains all the public API that is required to use the KTextEditor compone...
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sun May 24 2020 23:10:48 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.