From 5e6b3d3a1d10587f4b7ac74e8806aecf06d5ba30 Mon Sep 17 00:00:00 2001 From: Nicolas Arnaud-Cormos Date: Sat, 4 Feb 2012 17:34:48 +0100 Subject: Initialize the Scripting plugin Change-Id: Iffd7e39046608e58c38da825bcaf7e38706e8e91 --- objects/basetexteditor.cpp | 416 +++++++++++++++++++++++++++++++++++++++++++++ objects/basetexteditor.h | 126 ++++++++++++++ objects/console.cpp | 61 +++++++ objects/console.h | 56 ++++++ objects/editor.cpp | 89 ++++++++++ objects/editor.h | 76 +++++++++ objects/editors.cpp | 59 +++++++ objects/editors.h | 56 ++++++ 8 files changed, 939 insertions(+) create mode 100644 objects/basetexteditor.cpp create mode 100644 objects/basetexteditor.h create mode 100644 objects/console.cpp create mode 100644 objects/console.h create mode 100644 objects/editor.cpp create mode 100644 objects/editor.h create mode 100644 objects/editors.cpp create mode 100644 objects/editors.h (limited to 'objects') diff --git a/objects/basetexteditor.cpp b/objects/basetexteditor.cpp new file mode 100644 index 0000000..3df3638 --- /dev/null +++ b/objects/basetexteditor.cpp @@ -0,0 +1,416 @@ +/************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (C) 2011 Kläralvdalens Datakonsult AB, a KDAB Group company. +** +** Contact: Kläralvdalens Datakonsult AB (info@kdab.com) +** +** +** GNU Lesser General Public License Usage +** +** This file may be used under the terms of the GNU Lesser General Public +** License version 2.1 as published by the Free Software Foundation and +** appearing in the file LICENSE.LGPL included in the packaging of this file. +** Please review the following information to ensure the GNU Lesser General +** Public License version 2.1 requirements will be met: +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** Other Usage +** +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** If you have questions regarding the use of this file, please contact +** Nokia at info@qt.nokia.com. +** +**************************************************************************/ + +#include "basetexteditor.h" + +#include + +#include + +#include + +using namespace Scripting; +using namespace Scripting::Internal; + + +BaseTextEditor::BaseTextEditor(QObject *parent) : + Editor(parent) +{ +} + +void BaseTextEditor::copy() +{ + if (textEditorWidget()) + textEditorWidget()->copy(); +} + +void BaseTextEditor::paste() +{ + if (textEditorWidget()) + textEditorWidget()->paste(); +} + +void BaseTextEditor::cut() +{ + if (textEditorWidget()) + textEditorWidget()->cut(); +} + +void BaseTextEditor::cutLine() +{ + if (textEditorWidget()) + textEditorWidget()->cutLine(); +} + +void BaseTextEditor::copyLine() +{ + if (textEditorWidget()) + textEditorWidget()->copyLine(); +} + +void BaseTextEditor::deleteSelection() +{ + if (textEditorWidget() && hasSelection()) + textEditorWidget()->textCursor().deleteChar(); +} + +void BaseTextEditor::deleteLine(int count) +{ + if (textEditorWidget()) + for(int i=0; ideleteLine(); +} + +void BaseTextEditor::deleteEndOfWord(int count) +{ + if (textEditorWidget()) + for(int i=0; ideleteEndOfWord(); +} + +void BaseTextEditor::deleteEndOfWordCamelCase(int count) +{ + if (textEditorWidget()) + for(int i=0; ideleteEndOfWordCamelCase(); +} + +void BaseTextEditor::deleteStartOfWord(int count) +{ + if (textEditorWidget()) + for(int i=0; ideleteStartOfWord(); +} + +void BaseTextEditor::deleteStartOfWordCamelCase(int count) +{ + if (textEditorWidget()) + for(int i=0; ideleteStartOfWordCamelCase(); +} + +void BaseTextEditor::gotoBlockStart(int count) +{ + if (textEditorWidget()) + for(int i=0; igotoBlockStart(); +} + +void BaseTextEditor::gotoBlockEnd(int count) +{ + if (textEditorWidget()) + for(int i=0; igotoBlockEnd(); +} + +void BaseTextEditor::gotoLineStart(int count) +{ + if (textEditorWidget()) + for(int i=0; igotoLineStart(); +} + +void BaseTextEditor::gotoLineEnd(int count) +{ + if (textEditorWidget()) + for(int i=0; igotoLineEnd(); +} + +void BaseTextEditor::gotoNextLine(int count) +{ + if (textEditorWidget()) + for(int i=0; igotoNextLine(); +} + +void BaseTextEditor::gotoPreviousLine(int count) +{ + if (textEditorWidget()) + for(int i=0; igotoPreviousLine(); +} + +void BaseTextEditor::gotoPreviousCharacter(int count) +{ + if (textEditorWidget()) + for(int i=0; igotoPreviousCharacter(); +} + +void BaseTextEditor::gotoNextCharacter(int count) +{ + if (textEditorWidget()) + for(int i=0; igotoNextCharacter(); +} + +void BaseTextEditor::gotoPreviousWord(int count) +{ + if (textEditorWidget()) + for(int i=0; igotoPreviousWord(); +} + +void BaseTextEditor::gotoNextWord(int count) +{ + if (textEditorWidget()) + for(int i=0; igotoNextWord(); +} + +void BaseTextEditor::gotoPreviousWordCamelCase(int count) +{ + if (textEditorWidget()) + for(int i=0; igotoPreviousWordCamelCase(); +} + +void BaseTextEditor::gotoNextWordCamelCase(int count) +{ + if (textEditorWidget()) + for(int i=0; igotoNextWordCamelCase(); +} + +void BaseTextEditor::clearSelection() +{ + if (textEditorWidget()) + textEditorWidget()->textCursor().clearSelection(); +} + +bool BaseTextEditor::hasSelection() +{ + if (textEditorWidget()) + return textEditorWidget()->textCursor().hasSelection(); + return false; +} + +void BaseTextEditor::selectAll() +{ + if (textEditorWidget()) + textEditorWidget()->selectAll(); +} + +void BaseTextEditor::selectBlockStart(int count) +{ + if (textEditorWidget()) + for(int i=0; igotoBlockStartWithSelection(); +} + +void BaseTextEditor::selectBlockEnd(int count) +{ + if (textEditorWidget()) + for(int i=0; igotoBlockEndWithSelection(); +} + +void BaseTextEditor::selectLineStart(int count) +{ + if (textEditorWidget()) + for(int i=0; igotoLineStartWithSelection(); +} + +void BaseTextEditor::selectLineEnd(int count) +{ + if (textEditorWidget()) + for(int i=0; igotoLineEndWithSelection(); +} + +void BaseTextEditor::selectNextLine(int count) +{ + if (textEditorWidget()) + for(int i=0; igotoNextLineWithSelection(); +} + +void BaseTextEditor::selectPreviousLine(int count) +{ + if (textEditorWidget()) + for(int i=0; igotoPreviousLineWithSelection(); +} + +void BaseTextEditor::selectPreviousCharacter(int count) +{ + if (textEditorWidget()) + for(int i=0; igotoPreviousCharacterWithSelection(); +} + +void BaseTextEditor::selectNextCharacter(int count) +{ + if (textEditorWidget()) + for(int i=0; igotoNextCharacterWithSelection(); +} + +void BaseTextEditor::selectPreviousWord(int count) +{ + if (textEditorWidget()) + for(int i=0; igotoPreviousWordWithSelection(); +} + +void BaseTextEditor::selectNextWord(int count) +{ + if (textEditorWidget()) + for(int i=0; igotoNextWordWithSelection(); +} + +void BaseTextEditor::selectPreviousWordCamelCase(int count) +{ + if (textEditorWidget()) + for(int i=0; igotoPreviousWordCamelCaseWithSelection(); +} + +void BaseTextEditor::selectNextWordCamelCase(int count) +{ + if (textEditorWidget()) + for(int i=0; igotoNextWordCamelCaseWithSelection(); +} + +void BaseTextEditor::selectBlockUp(int count) +{ + if (textEditorWidget()) + for(int i=0; iselectBlockUp(); +} + +void BaseTextEditor::selectBlockDown(int count) +{ + if (textEditorWidget()) + for(int i=0; iselectBlockDown(); +} + +void BaseTextEditor::moveLineUp(int count) +{ + if (textEditorWidget()) + for(int i=0; imoveLineUp(); +} + +void BaseTextEditor::moveLineDown(int count) +{ + if (textEditorWidget()) + for(int i=0; imoveLineDown(); +} + +void BaseTextEditor::copyLineUp(int count) +{ + if (textEditorWidget()) + for(int i=0; icopyLineUp(); +} + +void BaseTextEditor::copyLineDown(int count) +{ + if (textEditorWidget()) + for(int i=0; icopyLineDown(); +} + +void BaseTextEditor::joinLines(int count) +{ + if (textEditorWidget()) + for(int i=0; ijoinLines(); +} + +void BaseTextEditor::insertLineAbove(int count) +{ + if (textEditorWidget()) + for(int i=0; iinsertLineAbove(); +} + +void BaseTextEditor::insertLineBelow(int count) +{ + if (textEditorWidget()) + for(int i=0; iinsertLineBelow(); +} + +void BaseTextEditor::uppercaseSelection() +{ + if (textEditorWidget()) + textEditorWidget()->uppercaseSelection(); +} + +void BaseTextEditor::lowercaseSelection() +{ + if (textEditorWidget()) + textEditorWidget()->lowercaseSelection(); +} + +void BaseTextEditor::cleanWhitespace() +{ + if (textEditorWidget()) + textEditorWidget()->cleanWhitespace(); +} + +void BaseTextEditor::insertText(const QString &text) +{ + if (textEditorWidget()) + textEditorWidget()->insertPlainText(text); +} + +QString BaseTextEditor::selectedText() +{ + if (textEditorWidget()) + return textEditorWidget()->textCursor().selectedText(); + return QString(); +} + +QString BaseTextEditor::text() +{ + if (textEditorWidget()) + return textEditorWidget()->toPlainText(); + return QString(); +} + +TextEditor::BaseTextEditorWidget *BaseTextEditor::textEditorWidget() +{ + TextEditor::BaseTextEditor *textEditor = + qobject_cast(editor()); + if (textEditor) + return textEditor->editorWidget(); + return 0; +} diff --git a/objects/basetexteditor.h b/objects/basetexteditor.h new file mode 100644 index 0000000..7ac9b75 --- /dev/null +++ b/objects/basetexteditor.h @@ -0,0 +1,126 @@ +/************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (C) 2011 Kläralvdalens Datakonsult AB, a KDAB Group company. +** +** Contact: Kläralvdalens Datakonsult AB (info@kdab.com) +** +** +** GNU Lesser General Public License Usage +** +** This file may be used under the terms of the GNU Lesser General Public +** License version 2.1 as published by the Free Software Foundation and +** appearing in the file LICENSE.LGPL included in the packaging of this file. +** Please review the following information to ensure the GNU Lesser General +** Public License version 2.1 requirements will be met: +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** Other Usage +** +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** If you have questions regarding the use of this file, please contact +** Nokia at info@qt.nokia.com. +** +**************************************************************************/ + +#ifndef TEXTEDITORWRAPPER_H +#define TEXTEDITORWRAPPER_H + +#include "editor.h" + + +namespace TextEditor { + class BaseTextEditor; + class BaseTextEditorWidget; +} + +namespace Scripting { +namespace Internal { + +class BaseTextEditor : public Editor +{ + Q_OBJECT +public: + explicit BaseTextEditor(QObject *parent=0); + +public slots: + void copy(); + void paste(); + void cut(); + void cutLine(); + void copyLine(); + + void deleteSelection(); + void deleteLine(int count=1); + void deleteEndOfWord(int count=1); + void deleteEndOfWordCamelCase(int count=1); + void deleteStartOfWord(int count=1); + void deleteStartOfWordCamelCase(int count=1); + + void gotoBlockStart(int count=1); + void gotoBlockEnd(int count=1); + void gotoLineStart(int count=1); + void gotoLineEnd(int count=1); + void gotoNextLine(int count=1); + void gotoPreviousLine(int count=1); + void gotoPreviousCharacter(int count=1); + void gotoNextCharacter(int count=1); + void gotoPreviousWord(int count=1); + void gotoNextWord(int count=1); + void gotoPreviousWordCamelCase(int count=1); + void gotoNextWordCamelCase(int count=1); + + void clearSelection(); + bool hasSelection(); + void selectAll(); + + void selectBlockStart(int count=1); + void selectBlockEnd(int count=1); + void selectLineStart(int count=1); + void selectLineEnd(int count=1); + void selectNextLine(int count=1); + void selectPreviousLine(int count=1); + void selectPreviousCharacter(int count=1); + void selectNextCharacter(int count=1); + void selectPreviousWord(int count=1); + void selectNextWord(int count=1); + void selectPreviousWordCamelCase(int count=1); + void selectNextWordCamelCase(int count=1); + void selectBlockUp(int count=1); + void selectBlockDown(int count=1); + + void moveLineUp(int count=1); + void moveLineDown(int count=1); + void copyLineUp(int count=1); + void copyLineDown(int count=1); + void joinLines(int count=1); + + void insertLineAbove(int count=1); + void insertLineBelow(int count=1); + + void uppercaseSelection(); + void lowercaseSelection(); + + void cleanWhitespace(); + + void insertText(const QString &text); + QString selectedText(); + QString text(); + +protected: + TextEditor::BaseTextEditorWidget *textEditorWidget(); +}; + +} // namespace Internal +} // namespace Scripting + +Q_DECLARE_METATYPE(Scripting::Internal::BaseTextEditor*) + +#endif // TEXTEDITORWRAPPER_H diff --git a/objects/console.cpp b/objects/console.cpp new file mode 100644 index 0000000..c9afbac --- /dev/null +++ b/objects/console.cpp @@ -0,0 +1,61 @@ +/************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (C) 2011 Kläralvdalens Datakonsult AB, a KDAB Group company. +** +** Contact: Kläralvdalens Datakonsult AB (info@kdab.com) +** +** +** GNU Lesser General Public License Usage +** +** This file may be used under the terms of the GNU Lesser General Public +** License version 2.1 as published by the Free Software Foundation and +** appearing in the file LICENSE.LGPL included in the packaging of this file. +** Please review the following information to ensure the GNU Lesser General +** Public License version 2.1 requirements will be met: +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** Other Usage +** +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** If you have questions regarding the use of this file, please contact +** Nokia at info@qt.nokia.com. +** +**************************************************************************/ + +#include "console.h" + +#include + +#include + +using namespace Scripting; +using namespace Scripting::Internal; + + +Console::Console(QObject *parent) : + QObject(parent) +{ +} + +void Console::error(const QString &text) +{ + Core::MessageManager::instance()->printToOutputPane(text, Utils::ErrorMessageFormat); +} + +void Console::log(const QString &text) +{ + Core::MessageManager::instance()->printToOutputPane(text, false); +} + +void Console::debug(const QString &text) +{ + Core::MessageManager::instance()->printToOutputPane(text, Utils::DebugFormat); +} diff --git a/objects/console.h b/objects/console.h new file mode 100644 index 0000000..fde3e87 --- /dev/null +++ b/objects/console.h @@ -0,0 +1,56 @@ +/************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (C) 2011 Kläralvdalens Datakonsult AB, a KDAB Group company. +** +** Contact: Kläralvdalens Datakonsult AB (info@kdab.com) +** +** +** GNU Lesser General Public License Usage +** +** This file may be used under the terms of the GNU Lesser General Public +** License version 2.1 as published by the Free Software Foundation and +** appearing in the file LICENSE.LGPL included in the packaging of this file. +** Please review the following information to ensure the GNU Lesser General +** Public License version 2.1 requirements will be met: +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** Other Usage +** +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** If you have questions regarding the use of this file, please contact +** Nokia at info@qt.nokia.com. +** +**************************************************************************/ + +#ifndef CONSOLEINTERFACE_H +#define CONSOLEINTERFACE_H + +#include + +namespace Scripting { +namespace Internal { + +class Console : public QObject +{ + Q_OBJECT +public: + explicit Console(QObject *parent = 0); + +public slots: + void error(const QString &text); + void log(const QString &text); + void debug(const QString &text); +}; + +} // namespace Internal +} // namespace Scripting + +#endif // CONSOLEINTERFACE_H diff --git a/objects/editor.cpp b/objects/editor.cpp new file mode 100644 index 0000000..e3e1714 --- /dev/null +++ b/objects/editor.cpp @@ -0,0 +1,89 @@ +/************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (C) 2011 Kläralvdalens Datakonsult AB, a KDAB Group company. +** +** Contact: Kläralvdalens Datakonsult AB (info@kdab.com) +** +** +** GNU Lesser General Public License Usage +** +** This file may be used under the terms of the GNU Lesser General Public +** License version 2.1 as published by the Free Software Foundation and +** appearing in the file LICENSE.LGPL included in the packaging of this file. +** Please review the following information to ensure the GNU Lesser General +** Public License version 2.1 requirements will be met: +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** Other Usage +** +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** If you have questions regarding the use of this file, please contact +** Nokia at info@qt.nokia.com. +** +**************************************************************************/ + +#include "editor.h" + +#include +#include + +using namespace Scripting; +using namespace Scripting::Internal; + + +Editor::Editor(QObject *parent): + QObject(parent), + m_editor(0) +{ +} + +void Editor::setEditor(Core::IEditor *editor) +{ + m_editor = editor; +} + +bool Editor::exists() +{ + return m_editor->widget()!=0; +} + +bool Editor::save() +{ + QString errorString; + return m_editor->file()->save(&errorString); +} + +int Editor::currentLine() +{ + return m_editor->currentLine(); +} + +int Editor::currentColumn() +{ + return m_editor->currentColumn(); +} + +void Editor::gotoLine(int line, int column) +{ + m_editor->gotoLine(line, column); +} + +QString Editor::fileName() +{ + if (m_editor->file()) + return m_editor->file()->fileName(); + return QString(); +} + +Core::IEditor * Editor::editor() +{ + return m_editor; +} diff --git a/objects/editor.h b/objects/editor.h new file mode 100644 index 0000000..aa3a1e2 --- /dev/null +++ b/objects/editor.h @@ -0,0 +1,76 @@ +/************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (C) 2011 Kläralvdalens Datakonsult AB, a KDAB Group company. +** +** Contact: Kläralvdalens Datakonsult AB (info@kdab.com) +** +** +** GNU Lesser General Public License Usage +** +** This file may be used under the terms of the GNU Lesser General Public +** License version 2.1 as published by the Free Software Foundation and +** appearing in the file LICENSE.LGPL included in the packaging of this file. +** Please review the following information to ensure the GNU Lesser General +** Public License version 2.1 requirements will be met: +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** Other Usage +** +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** If you have questions regarding the use of this file, please contact +** Nokia at info@qt.nokia.com. +** +**************************************************************************/ + +#ifndef EDITORWRAPPER_H +#define EDITORWRAPPER_H + +#include +#include + +namespace Core { +class IEditor; +} + +namespace Scripting { +namespace Internal { + +class Editor : public QObject +{ + Q_OBJECT +public: + explicit Editor(QObject *parent=0); + + void setEditor(Core::IEditor *editor); + +public slots: + bool exists(); + bool save(); + + int currentLine(); + int currentColumn(); + void gotoLine(int line, int column=0); + + QString fileName(); + +protected: + Core::IEditor *editor(); + +private: + Core::IEditor *m_editor; +}; + +} // namespace Internal +} // namespace Scripting + +Q_DECLARE_METATYPE(Scripting::Internal::Editor*) + +#endif // EDITORWRAPPER_H diff --git a/objects/editors.cpp b/objects/editors.cpp new file mode 100644 index 0000000..4613012 --- /dev/null +++ b/objects/editors.cpp @@ -0,0 +1,59 @@ +/************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (C) 2011 Kläralvdalens Datakonsult AB, a KDAB Group company. +** +** Contact: Kläralvdalens Datakonsult AB (info@kdab.com) +** +** +** GNU Lesser General Public License Usage +** +** This file may be used under the terms of the GNU Lesser General Public +** License version 2.1 as published by the Free Software Foundation and +** appearing in the file LICENSE.LGPL included in the packaging of this file. +** Please review the following information to ensure the GNU Lesser General +** Public License version 2.1 requirements will be met: +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** Other Usage +** +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** If you have questions regarding the use of this file, please contact +** Nokia at info@qt.nokia.com. +** +**************************************************************************/ + +#include "editors.h" +#include "editor.h" +#include "basetexteditor.h" + +#include +#include + +using namespace Scripting; +using namespace Scripting::Internal; + +Editors::Editors(QObject *parent) : + QObject(parent) +{ +} + +Editor * Editors::current() +{ + Core::IEditor *editor = Core::EditorManager::instance()->currentEditor(); + Editor *wrapper; + + if (qobject_cast(editor)) + wrapper = new BaseTextEditor; + else + wrapper = new Editor; + wrapper->setEditor(editor); + return wrapper; +} diff --git a/objects/editors.h b/objects/editors.h new file mode 100644 index 0000000..08ce30f --- /dev/null +++ b/objects/editors.h @@ -0,0 +1,56 @@ +/************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (C) 2011 Kläralvdalens Datakonsult AB, a KDAB Group company. +** +** Contact: Kläralvdalens Datakonsult AB (info@kdab.com) +** +** +** GNU Lesser General Public License Usage +** +** This file may be used under the terms of the GNU Lesser General Public +** License version 2.1 as published by the Free Software Foundation and +** appearing in the file LICENSE.LGPL included in the packaging of this file. +** Please review the following information to ensure the GNU Lesser General +** Public License version 2.1 requirements will be met: +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** Other Usage +** +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** If you have questions regarding the use of this file, please contact +** Nokia at info@qt.nokia.com. +** +**************************************************************************/ + +#ifndef SCRIPTING_INTERNAL_EDITORS_H +#define SCRIPTING_INTERNAL_EDITORS_H + +#include + +namespace Scripting { +namespace Internal { + +class Editor; + +class Editors : public QObject +{ + Q_OBJECT +public: + explicit Editors(QObject *parent = 0); + +public slots: + static Editor * current(); +}; + +} // namespace Internal +} // namespace Scripting + +#endif // SCRIPTING_INTERNAL_EDITORS_H -- cgit v1.2.3