KTextEditor

katescripteditor.cpp
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 #include "katescripteditor.h"
22 
23 #include "kateglobal.h"
24 
25 #include <QApplication>
26 #include <QClipboard>
27 #include <QJSEngine>
28 
30 
31 KateScriptEditor::KateScriptEditor(QJSEngine *engine, QObject *parent)
32  : QObject(parent)
33  , m_engine(engine)
34 {
35 }
36 
37 QString KateScriptEditor::clipboardText() const
38 {
39  return QApplication::clipboard()->text();
40 }
41 
42 QStringList KateScriptEditor::clipboardHistory() const
43 {
45 }
46 
47 void KateScriptEditor::setClipboardText(const QString &text)
48 {
50 }
QString text(QClipboard::Mode mode) const const
KTextEditor::EditorPrivate One instance of this class is hold alive during a kate part session...
Definition: kateglobal.h:80
static KTextEditor::EditorPrivate * self()
Kate Part Internal stuff ;)
Definition: kateglobal.cpp:373
void copyToClipboard(const QString &text)
Copy text to clipboard an remember it in the history.
Definition: kateglobal.cpp:466
const QStringList & clipboardHistory() const
Clipboard history, filled with text we ever copied to clipboard via copyToClipboard.
Definition: kateglobal.h:380
QClipboard * clipboard()
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Fri Aug 7 2020 22:55:44 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.