2012-10-02 09:12:39 +02:00
|
|
|
/****************************************************************************
|
2008-12-02 12:01:29 +01:00
|
|
|
**
|
2014-01-07 13:27:11 +01:00
|
|
|
** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
|
2012-10-02 09:12:39 +02:00
|
|
|
** Contact: http://www.qt-project.org/legal
|
2008-12-02 12:01:29 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** This file is part of Qt Creator.
|
2008-12-02 12:01:29 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** Commercial License Usage
|
|
|
|
|
** Licensees holding valid commercial Qt licenses may use this file in
|
|
|
|
|
** accordance with the commercial license agreement provided with the
|
|
|
|
|
** Software or, alternatively, in accordance with the terms contained in
|
|
|
|
|
** a written agreement between you and Digia. For licensing terms and
|
2014-10-01 13:21:18 +02:00
|
|
|
** conditions see http://www.qt.io/licensing. For further information
|
|
|
|
|
** use the contact form at http://www.qt.io/contact-us.
|
2008-12-02 14:17:16 +01:00
|
|
|
**
|
2009-02-25 09:15:00 +01:00
|
|
|
** GNU Lesser General Public License Usage
|
2012-10-02 09:12:39 +02:00
|
|
|
** Alternatively, this file may be used under the terms of the GNU Lesser
|
2014-10-01 13:21:18 +02:00
|
|
|
** General Public License version 2.1 or version 3 as published by the Free
|
|
|
|
|
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
|
|
|
|
|
** LICENSE.LGPLv3 included in the packaging of this file. Please review the
|
|
|
|
|
** following information to ensure the GNU Lesser General Public License
|
|
|
|
|
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
|
|
|
|
|
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
2008-12-02 14:17:16 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** In addition, as a special exception, Digia gives you certain additional
|
|
|
|
|
** rights. These rights are described in the Digia Qt LGPL Exception
|
2010-12-17 16:01:08 +01:00
|
|
|
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
|
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
****************************************************************************/
|
2008-12-02 16:19:05 +01:00
|
|
|
|
2014-09-29 00:39:38 +03:00
|
|
|
#ifndef TEXTEDITOR_H
|
|
|
|
|
#define TEXTEDITOR_H
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2014-09-26 09:14:03 +02:00
|
|
|
#include "textdocument.h"
|
2011-04-15 16:19:23 +02:00
|
|
|
#include "codeassist/assistenums.h"
|
2014-07-25 14:10:41 +02:00
|
|
|
#include "texteditor_global.h"
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2014-08-22 12:14:06 +02:00
|
|
|
#include <texteditor/texteditoractionhandler.h>
|
|
|
|
|
|
2014-07-25 14:10:41 +02:00
|
|
|
#include <coreplugin/textdocument.h>
|
2010-09-07 09:51:20 +02:00
|
|
|
#include <coreplugin/editormanager/editormanager.h>
|
2014-07-25 14:10:41 +02:00
|
|
|
#include <coreplugin/editormanager/ieditor.h>
|
2014-08-22 12:14:06 +02:00
|
|
|
#include <coreplugin/editormanager/ieditorfactory.h>
|
2014-01-13 16:17:34 +01:00
|
|
|
#include <coreplugin/find/ifindsupport.h>
|
2010-09-07 09:51:20 +02:00
|
|
|
|
2014-07-30 16:01:34 +02:00
|
|
|
#include <utils/uncommentselection.h>
|
|
|
|
|
|
2014-10-15 13:27:22 +02:00
|
|
|
#include <QLabel>
|
2012-02-15 10:42:41 +01:00
|
|
|
#include <QPlainTextEdit>
|
2014-07-30 17:02:39 +02:00
|
|
|
#include <functional>
|
2008-12-02 12:01:29 +01:00
|
|
|
|
|
|
|
|
QT_BEGIN_NAMESPACE
|
|
|
|
|
class QToolBar;
|
2011-11-23 16:05:55 +01:00
|
|
|
class QPrinter;
|
2014-07-25 14:10:41 +02:00
|
|
|
class QMenu;
|
|
|
|
|
class QPainter;
|
|
|
|
|
class QPoint;
|
|
|
|
|
class QRect;
|
|
|
|
|
class QTextBlock;
|
2008-12-02 12:01:29 +01:00
|
|
|
QT_END_NAMESPACE
|
|
|
|
|
|
2014-07-30 10:04:01 +02:00
|
|
|
namespace Core { class MimeType; }
|
|
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
namespace TextEditor {
|
2014-07-23 19:10:38 +02:00
|
|
|
|
2014-09-30 13:08:05 +02:00
|
|
|
class BaseHoverHandler;
|
2010-08-13 12:53:36 +02:00
|
|
|
class TabSettings;
|
2010-11-01 16:29:45 +01:00
|
|
|
class RefactorOverlay;
|
|
|
|
|
struct RefactorMarker;
|
2011-04-15 16:19:23 +02:00
|
|
|
class IAssistMonitorInterface;
|
2014-09-04 00:04:18 +02:00
|
|
|
class AssistInterface;
|
2011-04-15 16:19:23 +02:00
|
|
|
class IAssistProvider;
|
2011-08-16 10:45:23 +02:00
|
|
|
class ICodeStylePreferences;
|
2013-08-30 12:55:06 +02:00
|
|
|
class CompletionAssistProvider;
|
2013-01-11 16:42:42 +01:00
|
|
|
typedef QList<RefactorMarker> RefactorMarkers;
|
2008-12-02 12:01:29 +01:00
|
|
|
|
|
|
|
|
namespace Internal {
|
2014-10-15 00:36:39 +02:00
|
|
|
class BaseTextEditorPrivate;
|
|
|
|
|
class TextEditorFactoryPrivate;
|
|
|
|
|
class TextEditorWidgetPrivate;
|
|
|
|
|
class TextEditorOverlay;
|
2008-12-02 12:01:29 +01:00
|
|
|
}
|
|
|
|
|
|
2014-08-27 11:19:04 +02:00
|
|
|
class AutoCompleter;
|
|
|
|
|
class BaseTextEditor;
|
2014-09-26 11:37:54 +02:00
|
|
|
class TextEditorFactory;
|
|
|
|
|
class TextEditorWidget;
|
2014-08-27 11:19:04 +02:00
|
|
|
class PlainTextEditorFactory;
|
|
|
|
|
|
2010-08-13 12:53:36 +02:00
|
|
|
class BehaviorSettings;
|
|
|
|
|
class CompletionSettings;
|
|
|
|
|
class DisplaySettings;
|
2014-08-27 11:19:04 +02:00
|
|
|
class ExtraEncodingSettings;
|
|
|
|
|
class FontSettings;
|
|
|
|
|
class Indenter;
|
2014-01-09 14:44:25 +01:00
|
|
|
class MarginSettings;
|
2010-08-13 12:53:36 +02:00
|
|
|
class StorageSettings;
|
2014-08-27 11:19:04 +02:00
|
|
|
class TypingSettings;
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2014-07-25 14:10:41 +02:00
|
|
|
class TEXTEDITOR_EXPORT BlockRange
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
BlockRange() : _first(0), _last(-1) {}
|
|
|
|
|
BlockRange(int firstPosition, int lastPosition)
|
|
|
|
|
: _first(firstPosition), _last(lastPosition)
|
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
inline bool isNull() const { return _last < _first; }
|
|
|
|
|
|
|
|
|
|
int first() const { return _first; }
|
|
|
|
|
int last() const { return _last; }
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
int _first;
|
|
|
|
|
int _last;
|
|
|
|
|
};
|
|
|
|
|
|
2014-09-30 17:45:48 +02:00
|
|
|
enum TextPositionOperation
|
|
|
|
|
{
|
|
|
|
|
CurrentPosition = 1,
|
|
|
|
|
EndOfLinePosition = 2,
|
|
|
|
|
StartOfLinePosition = 3,
|
|
|
|
|
AnchorPosition = 4,
|
|
|
|
|
EndOfDocPosition = 5
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
enum TextMarkRequestKind
|
|
|
|
|
{
|
|
|
|
|
BreakpointRequest,
|
|
|
|
|
BookmarkRequest,
|
|
|
|
|
TaskMarkRequest
|
|
|
|
|
};
|
|
|
|
|
|
2014-07-23 19:10:38 +02:00
|
|
|
class TEXTEDITOR_EXPORT BaseTextEditor : public Core::IEditor
|
2009-04-28 18:34:58 +02:00
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
2014-08-19 00:54:45 +02:00
|
|
|
BaseTextEditor();
|
2014-07-23 19:10:38 +02:00
|
|
|
~BaseTextEditor();
|
2009-04-28 18:34:58 +02:00
|
|
|
|
2014-08-22 16:38:38 +02:00
|
|
|
virtual void finalizeInitialization() {}
|
|
|
|
|
|
2014-07-23 19:10:38 +02:00
|
|
|
static BaseTextEditor *currentTextEditor();
|
2009-04-28 18:34:58 +02:00
|
|
|
|
2014-09-26 11:37:54 +02:00
|
|
|
TextEditorWidget *editorWidget() const;
|
2014-09-22 18:43:31 +02:00
|
|
|
TextDocument *textDocument() const;
|
2014-08-27 11:57:32 +02:00
|
|
|
|
|
|
|
|
// Some convenience text access
|
|
|
|
|
QTextDocument *qdocument() const;
|
|
|
|
|
void setTextCursor(const QTextCursor &cursor);
|
|
|
|
|
QTextCursor textCursor() const;
|
|
|
|
|
QChar characterAt(int pos) const;
|
|
|
|
|
QString textAt(int from, int to) const;
|
2009-04-28 18:34:58 +02:00
|
|
|
|
2014-08-20 13:56:57 +02:00
|
|
|
void addContext(Core::Id id);
|
|
|
|
|
|
2014-07-23 19:10:38 +02:00
|
|
|
// IEditor
|
|
|
|
|
Core::IDocument *document();
|
|
|
|
|
bool open(QString *errorString, const QString &fileName, const QString &realFileName);
|
2009-04-28 19:02:58 +02:00
|
|
|
|
2014-07-30 13:13:24 +02:00
|
|
|
IEditor *duplicate();
|
|
|
|
|
|
2014-07-23 19:10:38 +02:00
|
|
|
QByteArray saveState() const;
|
|
|
|
|
bool restoreState(const QByteArray &state);
|
|
|
|
|
QWidget *toolBar();
|
|
|
|
|
|
|
|
|
|
QString contextHelpId() const; // from IContext
|
2014-09-30 13:08:05 +02:00
|
|
|
void setContextHelpId(const QString &id);
|
2014-07-23 19:10:38 +02:00
|
|
|
|
|
|
|
|
int currentLine() const;
|
|
|
|
|
int currentColumn() const;
|
|
|
|
|
void gotoLine(int line, int column = 0, bool centerLine = true);
|
|
|
|
|
|
|
|
|
|
/*! Returns the amount of visible columns (in characters) in the editor */
|
|
|
|
|
int columnCount() const;
|
|
|
|
|
|
|
|
|
|
/*! Returns the amount of visible lines (in characters) in the editor */
|
|
|
|
|
int rowCount() const;
|
|
|
|
|
|
|
|
|
|
/*! Returns the position at \a posOp in characters from the beginning of the document */
|
2014-09-30 17:45:48 +02:00
|
|
|
virtual int position(TextPositionOperation posOp = CurrentPosition, int at = -1) const;
|
2014-07-23 19:10:38 +02:00
|
|
|
|
|
|
|
|
/*! Converts the \a pos in characters from beginning of document to \a line and \a column */
|
|
|
|
|
virtual void convertPosition(int pos, int *line, int *column) const;
|
|
|
|
|
|
|
|
|
|
/*! Returns the cursor rectangle in pixels at \a pos, or current position if \a pos = -1 */
|
|
|
|
|
virtual QRect cursorRect(int pos = -1) const;
|
2009-04-28 18:34:58 +02:00
|
|
|
|
2014-07-23 19:10:38 +02:00
|
|
|
virtual QString selectedText() const;
|
|
|
|
|
|
|
|
|
|
/*! Removes \a length characters to the right of the cursor. */
|
|
|
|
|
virtual void remove(int length);
|
|
|
|
|
/*! Inserts the given string to the right of the cursor. */
|
|
|
|
|
virtual void insert(const QString &string);
|
|
|
|
|
/*! Replaces \a length characters to the right of the cursor with the given string. */
|
|
|
|
|
virtual void replace(int length, const QString &string);
|
|
|
|
|
/*! Sets current cursor position to \a pos. */
|
|
|
|
|
virtual void setCursorPosition(int pos);
|
|
|
|
|
/*! Selects text between current cursor position and \a toPos. */
|
|
|
|
|
virtual void select(int toPos);
|
|
|
|
|
|
2009-04-28 18:34:58 +02:00
|
|
|
private:
|
2014-09-26 11:37:54 +02:00
|
|
|
friend class TextEditorFactory;
|
2014-10-15 00:36:39 +02:00
|
|
|
friend class Internal::TextEditorFactoryPrivate;
|
2014-07-26 12:45:48 +02:00
|
|
|
Internal::BaseTextEditorPrivate *d;
|
2009-04-28 18:34:58 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
2014-09-26 11:37:54 +02:00
|
|
|
class TEXTEDITOR_EXPORT TextEditorWidget : public QPlainTextEdit
|
2008-12-02 12:01:29 +01:00
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
2010-08-05 15:01:20 +02:00
|
|
|
Q_PROPERTY(int verticalBlockSelectionFirstColumn READ verticalBlockSelectionFirstColumn)
|
|
|
|
|
Q_PROPERTY(int verticalBlockSelectionLastColumn READ verticalBlockSelectionLastColumn)
|
2013-05-24 14:23:07 +02:00
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
public:
|
2014-09-26 11:37:54 +02:00
|
|
|
TextEditorWidget(QWidget *parent = 0);
|
|
|
|
|
~TextEditorWidget();
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2014-09-26 11:37:54 +02:00
|
|
|
void setTextDocument(const TextDocumentPtr &doc);
|
2014-09-22 18:43:31 +02:00
|
|
|
TextDocument *textDocument() const;
|
2014-09-26 11:37:54 +02:00
|
|
|
TextDocumentPtr textDocumentPtr() const;
|
2013-12-12 15:07:54 +01:00
|
|
|
|
|
|
|
|
// IEditor
|
2011-05-10 20:43:03 +02:00
|
|
|
virtual bool open(QString *errorString, const QString &fileName, const QString &realFileName);
|
2008-12-02 12:01:29 +01:00
|
|
|
QByteArray saveState() const;
|
|
|
|
|
bool restoreState(const QByteArray &state);
|
2014-05-02 12:08:44 +02:00
|
|
|
void gotoLine(int line, int column = 0, bool centerLine = true);
|
2014-09-30 17:45:48 +02:00
|
|
|
int position(TextPositionOperation posOp = CurrentPosition,
|
2013-05-24 14:23:07 +02:00
|
|
|
int at = -1) const;
|
2008-12-02 12:01:29 +01:00
|
|
|
void convertPosition(int pos, int *line, int *column) const;
|
2014-09-03 08:35:58 +02:00
|
|
|
using QPlainTextEdit::cursorRect;
|
|
|
|
|
QRect cursorRect(int pos) const;
|
|
|
|
|
void setCursorPosition(int pos);
|
2008-12-02 12:01:29 +01:00
|
|
|
|
|
|
|
|
void print(QPrinter *);
|
|
|
|
|
|
2009-11-02 14:02:18 +01:00
|
|
|
void appendStandardContextMenuActions(QMenu *menu);
|
|
|
|
|
|
2014-08-19 12:12:45 +02:00
|
|
|
void setAutoCompleter(AutoCompleter *autoCompleter);
|
|
|
|
|
AutoCompleter *autoCompleter() const;
|
|
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
// Works only in conjunction with a syntax highlighter that puts
|
|
|
|
|
// parentheses into text block user data
|
|
|
|
|
void setParenthesesMatchingEnabled(bool b);
|
|
|
|
|
bool isParenthesesMatchingEnabled() const;
|
|
|
|
|
|
|
|
|
|
void setHighlightCurrentLine(bool b);
|
|
|
|
|
bool highlightCurrentLine() const;
|
|
|
|
|
|
|
|
|
|
void setLineNumbersVisible(bool b);
|
|
|
|
|
bool lineNumbersVisible() const;
|
|
|
|
|
|
2013-02-05 14:14:33 +01:00
|
|
|
void setAlwaysOpenLinksInNextSplit(bool b);
|
|
|
|
|
bool alwaysOpenLinksInNextSplit() const;
|
2012-11-01 03:43:28 +01:00
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
void setMarksVisible(bool b);
|
|
|
|
|
bool marksVisible() const;
|
|
|
|
|
|
|
|
|
|
void setRequestMarkEnabled(bool b);
|
|
|
|
|
bool requestMarkEnabled() const;
|
|
|
|
|
|
|
|
|
|
void setLineSeparatorsAllowed(bool b);
|
|
|
|
|
bool lineSeparatorsAllowed() const;
|
|
|
|
|
|
|
|
|
|
bool codeFoldingVisible() const;
|
|
|
|
|
|
2009-03-16 17:23:50 +01:00
|
|
|
void setCodeFoldingSupported(bool b);
|
|
|
|
|
bool codeFoldingSupported() const;
|
|
|
|
|
|
2009-09-08 13:03:24 +02:00
|
|
|
void setMouseNavigationEnabled(bool b);
|
|
|
|
|
bool mouseNavigationEnabled() const;
|
|
|
|
|
|
2014-02-10 13:23:59 +01:00
|
|
|
void setMouseHidingEnabled(bool b);
|
|
|
|
|
bool mouseHidingEnabled() const;
|
|
|
|
|
|
2009-12-09 16:27:34 +01:00
|
|
|
void setScrollWheelZoomingEnabled(bool b);
|
|
|
|
|
bool scrollWheelZoomingEnabled() const;
|
|
|
|
|
|
2011-07-20 13:40:24 +02:00
|
|
|
void setConstrainTooltips(bool b);
|
|
|
|
|
bool constrainTooltips() const;
|
|
|
|
|
|
2011-09-19 19:00:53 +02:00
|
|
|
void setCamelCaseNavigationEnabled(bool b);
|
|
|
|
|
bool camelCaseNavigationEnabled() const;
|
|
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
void setRevisionsVisible(bool b);
|
|
|
|
|
bool revisionsVisible() const;
|
|
|
|
|
|
|
|
|
|
void setVisibleWrapColumn(int column);
|
|
|
|
|
int visibleWrapColumn() const;
|
|
|
|
|
|
2010-12-13 15:17:33 +01:00
|
|
|
int columnCount() const;
|
|
|
|
|
int rowCount() const;
|
|
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
void setReadOnly(bool b);
|
|
|
|
|
|
2014-06-16 14:20:36 +02:00
|
|
|
void setTextCursor(const QTextCursor &cursor, bool keepBlockSelection);
|
2008-12-04 18:37:02 +01:00
|
|
|
void setTextCursor(const QTextCursor &cursor);
|
|
|
|
|
|
2010-03-29 16:44:27 +02:00
|
|
|
void insertCodeSnippet(const QTextCursor &cursor, const QString &snippet);
|
2010-01-19 16:36:48 +01:00
|
|
|
|
2010-09-13 13:52:50 +02:00
|
|
|
void setBlockSelection(bool on);
|
2014-06-16 14:20:36 +02:00
|
|
|
void setBlockSelection(int positionBlock, int positionColumn, int anchhorBlock,
|
|
|
|
|
int anchorColumn);
|
|
|
|
|
void setBlockSelection(const QTextCursor &cursor);
|
|
|
|
|
QTextCursor blockSelection() const;
|
2010-09-13 13:52:50 +02:00
|
|
|
bool hasBlockSelection() const;
|
2010-04-12 20:49:40 +02:00
|
|
|
|
2010-08-05 15:01:20 +02:00
|
|
|
int verticalBlockSelectionFirstColumn() const;
|
|
|
|
|
int verticalBlockSelectionLastColumn() const;
|
2010-04-12 20:49:40 +02:00
|
|
|
|
2010-07-09 16:09:08 +02:00
|
|
|
QRegion translatedLineRegion(int lineStart, int lineEnd) const;
|
|
|
|
|
|
2011-02-21 16:45:07 +01:00
|
|
|
QPoint toolTipPosition(const QTextCursor &c) const;
|
|
|
|
|
|
2011-04-15 16:19:23 +02:00
|
|
|
void invokeAssist(AssistKind assistKind, IAssistProvider *provider = 0);
|
|
|
|
|
|
2014-09-04 00:04:18 +02:00
|
|
|
virtual TextEditor::AssistInterface *createAssistInterface(AssistKind assistKind,
|
2011-04-15 16:19:23 +02:00
|
|
|
AssistReason assistReason) const;
|
2014-01-14 09:50:12 +01:00
|
|
|
static QMimeData *duplicateMimeData(const QMimeData *source);
|
2011-04-15 16:19:23 +02:00
|
|
|
|
2013-07-15 15:14:10 +02:00
|
|
|
static QString msgTextTooLarge(quint64 size);
|
|
|
|
|
|
2014-06-16 14:20:36 +02:00
|
|
|
void insertPlainText(const QString &text);
|
2014-07-23 19:10:38 +02:00
|
|
|
|
2014-07-25 16:23:50 +02:00
|
|
|
QWidget *extraArea() const;
|
|
|
|
|
virtual int extraAreaWidth(int *markWidthPtr = 0) const;
|
|
|
|
|
virtual void extraAreaPaintEvent(QPaintEvent *);
|
|
|
|
|
virtual void extraAreaLeaveEvent(QEvent *);
|
|
|
|
|
virtual void extraAreaContextMenuEvent(QContextMenuEvent *);
|
|
|
|
|
virtual void extraAreaMouseEvent(QMouseEvent *);
|
|
|
|
|
void updateFoldingHighlight(const QPoint &pos);
|
|
|
|
|
|
|
|
|
|
void setLanguageSettingsId(Core::Id settingsId);
|
|
|
|
|
Core::Id languageSettingsId() const;
|
|
|
|
|
|
|
|
|
|
void setCodeStyle(ICodeStylePreferences *settings);
|
|
|
|
|
|
|
|
|
|
const DisplaySettings &displaySettings() const;
|
|
|
|
|
const MarginSettings &marginSettings() const;
|
|
|
|
|
|
|
|
|
|
void ensureCursorVisible();
|
|
|
|
|
|
|
|
|
|
enum ExtraSelectionKind {
|
|
|
|
|
CurrentLineSelection,
|
|
|
|
|
ParenthesesMatchingSelection,
|
|
|
|
|
CodeWarningsSelection,
|
|
|
|
|
CodeSemanticsSelection,
|
|
|
|
|
UndefinedSymbolSelection,
|
|
|
|
|
UnusedSymbolSelection,
|
|
|
|
|
FakeVimSelection,
|
|
|
|
|
OtherSelection,
|
|
|
|
|
SnippetPlaceholderSelection,
|
|
|
|
|
ObjCSelection,
|
|
|
|
|
DebuggerExceptionSelection,
|
|
|
|
|
NExtraSelectionKinds
|
|
|
|
|
};
|
|
|
|
|
void setExtraSelections(ExtraSelectionKind kind, const QList<QTextEdit::ExtraSelection> &selections);
|
|
|
|
|
QList<QTextEdit::ExtraSelection> extraSelections(ExtraSelectionKind kind) const;
|
2014-10-21 17:50:10 +02:00
|
|
|
void setExtraSelections(Core::Id kind, const QList<QTextEdit::ExtraSelection> &selections);
|
|
|
|
|
QList<QTextEdit::ExtraSelection> extraSelections(Core::Id kind) const;
|
2014-07-25 16:23:50 +02:00
|
|
|
QString extraSelectionTooltip(int pos) const;
|
|
|
|
|
|
|
|
|
|
RefactorMarkers refactorMarkers() const;
|
|
|
|
|
void setRefactorMarkers(const RefactorMarkers &markers);
|
|
|
|
|
|
|
|
|
|
// the blocks list must be sorted
|
|
|
|
|
void setIfdefedOutBlocks(const QList<BlockRange> &blocks);
|
2014-07-30 10:04:01 +02:00
|
|
|
bool isMissingSyntaxDefinition() const;
|
2014-06-16 14:20:36 +02:00
|
|
|
|
2014-08-01 16:41:18 +02:00
|
|
|
enum Side { Left, Right };
|
|
|
|
|
void insertExtraToolBarWidget(Side side, QWidget *widget);
|
|
|
|
|
|
2011-12-13 12:15:30 +01:00
|
|
|
virtual void copy();
|
2009-12-03 18:35:36 +01:00
|
|
|
virtual void paste();
|
|
|
|
|
virtual void cut();
|
2012-01-18 12:09:41 +01:00
|
|
|
virtual void selectAll();
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2014-07-25 16:23:50 +02:00
|
|
|
virtual void format();
|
|
|
|
|
virtual void rewrapParagraph();
|
|
|
|
|
virtual void unCommentSelection();
|
2014-08-28 17:00:12 +02:00
|
|
|
|
2014-10-26 13:55:12 +02:00
|
|
|
public slots: // Qt4-style connect used in EditorConfiguration
|
2014-07-25 16:23:50 +02:00
|
|
|
virtual void setDisplaySettings(const TextEditor::DisplaySettings &);
|
2014-09-24 12:40:28 +02:00
|
|
|
virtual void setMarginSettings(const TextEditor::MarginSettings &);
|
2014-08-28 17:00:12 +02:00
|
|
|
void setBehaviorSettings(const TextEditor::BehaviorSettings &);
|
|
|
|
|
void setTypingSettings(const TextEditor::TypingSettings &);
|
|
|
|
|
void setStorageSettings(const TextEditor::StorageSettings &);
|
|
|
|
|
void setCompletionSettings(const TextEditor::CompletionSettings &);
|
|
|
|
|
void setExtraEncodingSettings(const TextEditor::ExtraEncodingSettings &);
|
2014-07-25 16:23:50 +02:00
|
|
|
|
2014-10-26 13:55:12 +02:00
|
|
|
public:
|
2011-12-13 12:15:30 +01:00
|
|
|
void circularPaste();
|
2012-03-02 08:16:23 +08:00
|
|
|
void switchUtf8bom();
|
2011-12-13 12:15:30 +01:00
|
|
|
|
2014-08-19 16:00:58 +02:00
|
|
|
void zoomIn();
|
|
|
|
|
void zoomOut();
|
2009-11-30 19:00:36 +01:00
|
|
|
void zoomReset();
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2009-05-14 17:24:35 +02:00
|
|
|
void cutLine();
|
2010-11-27 14:02:20 +09:00
|
|
|
void copyLine();
|
2008-12-02 12:01:29 +01:00
|
|
|
void deleteLine();
|
2011-09-26 14:21:19 +02:00
|
|
|
void deleteEndOfWord();
|
|
|
|
|
void deleteEndOfWordCamelCase();
|
|
|
|
|
void deleteStartOfWord();
|
|
|
|
|
void deleteStartOfWordCamelCase();
|
2010-05-20 15:10:26 +02:00
|
|
|
void unfoldAll();
|
|
|
|
|
void fold();
|
|
|
|
|
void unfold();
|
2008-12-02 12:01:29 +01:00
|
|
|
void selectEncoding();
|
2013-04-18 10:06:13 +02:00
|
|
|
void updateTextCodecLabel();
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2008-12-04 18:37:02 +01:00
|
|
|
void gotoBlockStart();
|
|
|
|
|
void gotoBlockEnd();
|
|
|
|
|
void gotoBlockStartWithSelection();
|
|
|
|
|
void gotoBlockEndWithSelection();
|
|
|
|
|
|
2010-05-07 15:24:30 +02:00
|
|
|
void gotoLineStart();
|
|
|
|
|
void gotoLineStartWithSelection();
|
|
|
|
|
void gotoLineEnd();
|
|
|
|
|
void gotoLineEndWithSelection();
|
|
|
|
|
void gotoNextLine();
|
|
|
|
|
void gotoNextLineWithSelection();
|
|
|
|
|
void gotoPreviousLine();
|
|
|
|
|
void gotoPreviousLineWithSelection();
|
|
|
|
|
void gotoPreviousCharacter();
|
|
|
|
|
void gotoPreviousCharacterWithSelection();
|
|
|
|
|
void gotoNextCharacter();
|
|
|
|
|
void gotoNextCharacterWithSelection();
|
|
|
|
|
void gotoPreviousWord();
|
|
|
|
|
void gotoPreviousWordWithSelection();
|
|
|
|
|
void gotoNextWord();
|
|
|
|
|
void gotoNextWordWithSelection();
|
2010-11-10 12:53:45 +01:00
|
|
|
void gotoPreviousWordCamelCase();
|
|
|
|
|
void gotoPreviousWordCamelCaseWithSelection();
|
|
|
|
|
void gotoNextWordCamelCase();
|
|
|
|
|
void gotoNextWordCamelCaseWithSelection();
|
2008-12-04 18:37:02 +01:00
|
|
|
|
2011-10-29 13:09:33 +08:00
|
|
|
bool selectBlockUp();
|
|
|
|
|
bool selectBlockDown();
|
2008-12-04 19:25:20 +01:00
|
|
|
|
2008-12-10 18:01:33 +01:00
|
|
|
void moveLineUp();
|
|
|
|
|
void moveLineDown();
|
|
|
|
|
|
2014-06-02 14:21:46 +02:00
|
|
|
void viewPageUp();
|
|
|
|
|
void viewPageDown();
|
|
|
|
|
void viewLineUp();
|
|
|
|
|
void viewLineDown();
|
|
|
|
|
|
2009-05-15 23:17:11 +02:00
|
|
|
void copyLineUp();
|
|
|
|
|
void copyLineDown();
|
|
|
|
|
|
2010-01-20 17:51:05 +01:00
|
|
|
void joinLines();
|
2010-01-20 16:54:06 +01:00
|
|
|
|
2010-05-03 17:03:11 +02:00
|
|
|
void insertLineAbove();
|
|
|
|
|
void insertLineBelow();
|
|
|
|
|
|
2011-02-25 11:10:42 +01:00
|
|
|
void uppercaseSelection();
|
|
|
|
|
void lowercaseSelection();
|
|
|
|
|
|
2008-12-09 17:43:31 +01:00
|
|
|
void cleanWhitespace();
|
|
|
|
|
|
2012-01-22 17:05:02 -05:00
|
|
|
void indent();
|
|
|
|
|
void unindent();
|
|
|
|
|
|
2014-06-16 14:20:36 +02:00
|
|
|
void undo();
|
|
|
|
|
void redo();
|
|
|
|
|
|
2012-03-27 23:18:46 +04:00
|
|
|
void openLinkUnderCursor();
|
2013-02-05 14:14:33 +01:00
|
|
|
void openLinkUnderCursorInNextSplit();
|
2012-03-27 23:18:46 +04:00
|
|
|
|
2013-03-19 11:41:40 +01:00
|
|
|
/// Abort code assistant if it is running.
|
|
|
|
|
void abortAssist();
|
2014-07-30 10:53:51 +02:00
|
|
|
|
|
|
|
|
void configureMimeType(const QString &mimeType);
|
2014-07-30 10:04:01 +02:00
|
|
|
void configureMimeType(const Core::MimeType &mimeType);
|
2014-08-27 16:59:03 +02:00
|
|
|
|
|
|
|
|
Q_INVOKABLE void inSnippetMode(bool *active); // Used by FakeVim.
|
2013-03-19 11:41:40 +01:00
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
signals:
|
2014-10-01 22:39:47 +02:00
|
|
|
void assistFinished(); // Used in tests.
|
2013-10-30 09:27:32 +01:00
|
|
|
void readOnlyChanged();
|
2014-07-25 16:23:50 +02:00
|
|
|
|
|
|
|
|
void requestFontZoom(int zoom);
|
|
|
|
|
void requestZoomReset();
|
|
|
|
|
void requestBlockUpdate(const QTextBlock &);
|
2008-12-02 12:01:29 +01:00
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
bool event(QEvent *e);
|
2014-06-16 14:20:36 +02:00
|
|
|
void inputMethodEvent(QInputMethodEvent *e);
|
2008-12-02 12:01:29 +01:00
|
|
|
void keyPressEvent(QKeyEvent *e);
|
|
|
|
|
void wheelEvent(QWheelEvent *e);
|
|
|
|
|
void changeEvent(QEvent *e);
|
2009-12-01 19:44:31 +01:00
|
|
|
void focusInEvent(QFocusEvent *e);
|
2009-11-30 19:13:20 +01:00
|
|
|
void focusOutEvent(QFocusEvent *e);
|
2009-06-17 19:12:19 +02:00
|
|
|
void showEvent(QShowEvent *);
|
2014-07-25 16:23:50 +02:00
|
|
|
bool viewportEvent(QEvent *event);
|
|
|
|
|
void resizeEvent(QResizeEvent *);
|
|
|
|
|
void paintEvent(QPaintEvent *);
|
2014-09-25 15:48:21 +02:00
|
|
|
virtual void paintBlock(QPainter *painter,
|
|
|
|
|
const QTextBlock &block,
|
|
|
|
|
const QPointF &offset,
|
|
|
|
|
const QVector<QTextLayout::FormatRange> &selections,
|
|
|
|
|
const QRect &clipRect) const;
|
2014-07-25 16:23:50 +02:00
|
|
|
void timerEvent(QTimerEvent *);
|
|
|
|
|
void mouseMoveEvent(QMouseEvent *);
|
|
|
|
|
void mousePressEvent(QMouseEvent *);
|
|
|
|
|
void mouseReleaseEvent(QMouseEvent *);
|
|
|
|
|
void mouseDoubleClickEvent(QMouseEvent *);
|
|
|
|
|
void leaveEvent(QEvent *);
|
|
|
|
|
void keyReleaseEvent(QKeyEvent *);
|
|
|
|
|
void dragEnterEvent(QDragEnterEvent *e);
|
2009-06-17 19:12:19 +02:00
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
QMimeData *createMimeDataFromSelection() const;
|
|
|
|
|
bool canInsertFromMimeData(const QMimeData *source) const;
|
|
|
|
|
void insertFromMimeData(const QMimeData *source);
|
|
|
|
|
|
2013-04-23 09:09:20 +02:00
|
|
|
virtual QString plainTextFromSelection(const QTextCursor &cursor) const;
|
2013-01-20 23:09:09 +01:00
|
|
|
static QString convertToPlainText(const QString &txt);
|
|
|
|
|
|
|
|
|
|
virtual QString lineNumber(int blockNumber) const;
|
|
|
|
|
virtual int lineNumberDigits() const;
|
2013-04-09 10:26:31 +02:00
|
|
|
virtual bool selectionVisible(int blockNumber) const;
|
2013-04-10 13:51:04 +02:00
|
|
|
virtual bool replacementVisible(int blockNumber) const;
|
2013-06-05 15:25:42 +02:00
|
|
|
virtual QColor replacementPenColor(int blockNumber) const;
|
2010-07-12 14:15:38 +02:00
|
|
|
|
2014-02-06 12:41:29 +01:00
|
|
|
virtual void triggerPendingUpdates();
|
2014-01-21 11:26:39 +01:00
|
|
|
virtual void applyFontSettings();
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2014-08-20 21:40:21 +02:00
|
|
|
virtual void onRefactorMarkerClicked(const RefactorMarker &) {}
|
|
|
|
|
|
2014-07-01 11:08:26 +02:00
|
|
|
void showDefaultContextMenu(QContextMenuEvent *e, Core::Id menuContextId);
|
2014-08-22 16:38:38 +02:00
|
|
|
virtual void finalizeInitialization() {}
|
2014-09-26 11:37:54 +02:00
|
|
|
virtual void finalizeInitializationAfterDuplication(TextEditorWidget *) {}
|
2012-07-24 23:30:32 +04:00
|
|
|
|
2010-01-06 14:57:45 +01:00
|
|
|
public:
|
2009-09-08 13:03:24 +02:00
|
|
|
struct Link
|
|
|
|
|
{
|
2013-02-06 14:23:18 +01:00
|
|
|
Link(const QString &fileName = QString(), int line = 0, int column = 0)
|
|
|
|
|
: linkTextStart(-1)
|
|
|
|
|
, linkTextEnd(-1)
|
|
|
|
|
, targetFileName(fileName)
|
|
|
|
|
, targetLine(line)
|
|
|
|
|
, targetColumn(column)
|
2009-09-08 13:03:24 +02:00
|
|
|
{}
|
|
|
|
|
|
2013-02-06 14:23:18 +01:00
|
|
|
bool hasValidTarget() const
|
|
|
|
|
{ return !targetFileName.isEmpty(); }
|
|
|
|
|
|
|
|
|
|
bool hasValidLinkText() const
|
|
|
|
|
{ return linkTextStart != linkTextEnd; }
|
2009-09-08 13:03:24 +02:00
|
|
|
|
2009-11-03 14:29:49 +01:00
|
|
|
bool operator==(const Link &other) const
|
2013-02-06 14:23:18 +01:00
|
|
|
{ return linkTextStart == other.linkTextStart && linkTextEnd == other.linkTextEnd; }
|
2009-11-03 14:29:49 +01:00
|
|
|
|
2013-02-06 14:23:18 +01:00
|
|
|
int linkTextStart;
|
|
|
|
|
int linkTextEnd;
|
2009-09-08 13:03:24 +02:00
|
|
|
|
2013-02-06 14:23:18 +01:00
|
|
|
QString targetFileName;
|
|
|
|
|
int targetLine;
|
|
|
|
|
int targetColumn;
|
2009-09-08 13:03:24 +02:00
|
|
|
};
|
|
|
|
|
|
2014-07-23 19:10:38 +02:00
|
|
|
QString selectedText() const;
|
|
|
|
|
|
2014-07-30 11:41:06 +02:00
|
|
|
void setupAsPlainEditor();
|
2014-08-28 18:46:39 +02:00
|
|
|
void setupFallBackEditor(Core::Id id);
|
2014-07-30 11:41:06 +02:00
|
|
|
|
2014-09-03 08:35:58 +02:00
|
|
|
void remove(int length);
|
|
|
|
|
void replace(int length, const QString &string);
|
|
|
|
|
QChar characterAt(int pos) const;
|
|
|
|
|
QString textAt(int from, int to) const;
|
|
|
|
|
|
2014-09-30 13:08:05 +02:00
|
|
|
QString contextHelpId();
|
|
|
|
|
void setContextHelpId(const QString &id);
|
|
|
|
|
|
2010-08-13 16:38:45 +02:00
|
|
|
protected:
|
2009-09-08 13:03:24 +02:00
|
|
|
/*!
|
|
|
|
|
Reimplement this function to enable code navigation.
|
|
|
|
|
|
|
|
|
|
\a resolveTarget is set to true when the target of the link is relevant
|
|
|
|
|
(it isn't until the link is used).
|
|
|
|
|
*/
|
2013-07-04 20:11:10 +02:00
|
|
|
virtual Link findLinkAt(const QTextCursor &, bool resolveTarget = true,
|
|
|
|
|
bool inNextSplit = false);
|
2009-09-08 13:03:24 +02:00
|
|
|
|
|
|
|
|
/*!
|
2014-09-26 12:03:20 +02:00
|
|
|
Returns whether the link was opened successfully.
|
2009-09-08 13:03:24 +02:00
|
|
|
*/
|
2014-09-26 12:03:20 +02:00
|
|
|
bool openLink(const Link &link, bool inNextSplit = false);
|
2009-09-08 13:03:24 +02:00
|
|
|
|
2011-09-14 22:16:28 +02:00
|
|
|
/*!
|
|
|
|
|
Reimplement this function to change the default replacement text.
|
|
|
|
|
*/
|
|
|
|
|
virtual QString foldReplacementText(const QTextBlock &block) const;
|
2013-04-25 17:37:20 +02:00
|
|
|
virtual void drawCollapsedBlockPopup(QPainter &painter,
|
|
|
|
|
const QTextBlock &block,
|
|
|
|
|
QPointF offset,
|
|
|
|
|
const QRect &clip);
|
|
|
|
|
int visibleFoldedBlockNumber() const;
|
|
|
|
|
|
2011-09-14 22:16:28 +02:00
|
|
|
|
2014-09-01 14:11:39 +02:00
|
|
|
signals:
|
2014-09-30 16:54:26 +02:00
|
|
|
void markRequested(TextEditor::TextEditorWidget *widget,
|
2014-09-30 17:45:48 +02:00
|
|
|
int line, TextEditor::TextMarkRequestKind kind);
|
2014-09-30 16:54:26 +02:00
|
|
|
void markContextMenuRequested(TextEditor::TextEditorWidget *widget,
|
|
|
|
|
int line, QMenu *menu);
|
|
|
|
|
void tooltipOverrideRequested(TextEditor::TextEditorWidget *widget,
|
2014-09-19 16:17:05 +02:00
|
|
|
const QPoint &globalPos, int position, bool *handled);
|
2014-09-01 14:11:39 +02:00
|
|
|
void tooltipRequested(const QPoint &globalPos, int position);
|
2014-09-30 16:54:26 +02:00
|
|
|
void markTooltipRequested(TextEditor::TextEditorWidget *widget,
|
|
|
|
|
const QPoint &globalPos, int line);
|
2014-09-02 09:32:25 +02:00
|
|
|
void activateEditor();
|
2014-09-01 14:11:39 +02:00
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
protected slots:
|
2014-08-01 12:52:22 +02:00
|
|
|
virtual void slotCursorPositionChanged(); // Used in VcsBase
|
|
|
|
|
virtual void slotCodeStyleSettingsChanged(const QVariant &); // Used in CppEditor
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2010-07-02 13:47:14 +02:00
|
|
|
void doFoo();
|
2014-07-25 16:23:50 +02:00
|
|
|
|
|
|
|
|
private:
|
2014-09-26 11:37:54 +02:00
|
|
|
Internal::TextEditorWidgetPrivate *d;
|
2014-08-01 15:06:28 +02:00
|
|
|
friend class BaseTextEditor;
|
2014-09-26 11:37:54 +02:00
|
|
|
friend class TextEditorFactory;
|
2014-10-15 00:36:39 +02:00
|
|
|
friend class Internal::TextEditorFactoryPrivate;
|
2014-09-26 11:37:54 +02:00
|
|
|
friend class Internal::TextEditorWidgetPrivate;
|
2014-07-25 16:23:50 +02:00
|
|
|
friend class Internal::TextEditorOverlay;
|
|
|
|
|
friend class RefactorOverlay;
|
2008-12-02 12:01:29 +01:00
|
|
|
};
|
|
|
|
|
|
2014-10-15 13:27:22 +02:00
|
|
|
class TEXTEDITOR_EXPORT TextEditorLinkLabel : public QLabel
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
TextEditorLinkLabel(QWidget *parent = 0);
|
|
|
|
|
|
|
|
|
|
void setLink(TextEditorWidget::Link link);
|
|
|
|
|
TextEditorWidget::Link link() const;
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
void mousePressEvent(QMouseEvent *event);
|
|
|
|
|
void mouseMoveEvent(QMouseEvent *event);
|
|
|
|
|
void mouseReleaseEvent(QMouseEvent *event);
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
QPoint m_dragStartPosition;
|
|
|
|
|
TextEditorWidget::Link m_link;
|
|
|
|
|
};
|
|
|
|
|
|
2014-09-26 11:37:54 +02:00
|
|
|
class TEXTEDITOR_EXPORT TextEditorFactory : public Core::IEditorFactory
|
2014-08-22 12:14:06 +02:00
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
2014-09-26 11:37:54 +02:00
|
|
|
TextEditorFactory(QObject *parent = 0);
|
2014-09-30 13:08:05 +02:00
|
|
|
~TextEditorFactory();
|
2014-08-22 12:14:06 +02:00
|
|
|
|
2014-08-25 21:10:24 +02:00
|
|
|
typedef std::function<BaseTextEditor *()> EditorCreator;
|
2014-09-22 18:43:31 +02:00
|
|
|
typedef std::function<TextDocument *()> DocumentCreator;
|
2014-09-26 11:37:54 +02:00
|
|
|
typedef std::function<TextEditorWidget *()> EditorWidgetCreator;
|
2014-08-22 16:38:38 +02:00
|
|
|
typedef std::function<SyntaxHighlighter *()> SyntaxHighLighterCreator;
|
|
|
|
|
typedef std::function<Indenter *()> IndenterCreator;
|
|
|
|
|
typedef std::function<AutoCompleter *()> AutoCompleterCreator;
|
|
|
|
|
|
2014-08-25 21:10:24 +02:00
|
|
|
void setDocumentCreator(const DocumentCreator &creator);
|
|
|
|
|
void setEditorWidgetCreator(const EditorWidgetCreator &creator);
|
|
|
|
|
void setEditorCreator(const EditorCreator &creator);
|
2014-08-22 12:14:06 +02:00
|
|
|
void setIndenterCreator(const IndenterCreator &creator);
|
|
|
|
|
void setSyntaxHighlighterCreator(const SyntaxHighLighterCreator &creator);
|
2014-08-22 12:49:02 +02:00
|
|
|
void setGenericSyntaxHighlighter(const QString &mimeType);
|
2014-12-05 15:47:49 +01:00
|
|
|
void setGenericSyntaxHighlighterByName(const QString &name);
|
2014-08-22 12:49:02 +02:00
|
|
|
void setAutoCompleterCreator(const AutoCompleterCreator &creator);
|
2014-08-22 12:14:06 +02:00
|
|
|
|
|
|
|
|
void setEditorActionHandlers(Core::Id contextId, uint optionalActions);
|
|
|
|
|
void setEditorActionHandlers(uint optionalActions);
|
|
|
|
|
|
2014-09-30 13:08:05 +02:00
|
|
|
void addHoverHandler(BaseHoverHandler *handler);
|
2014-10-01 22:39:47 +02:00
|
|
|
void setCompletionAssistProvider(CompletionAssistProvider *provider);
|
2014-09-30 13:08:05 +02:00
|
|
|
|
2014-09-01 16:16:44 +02:00
|
|
|
void setCommentStyle(Utils::CommentDefinition::Style style);
|
2014-09-03 11:24:38 +02:00
|
|
|
void setDuplicatedSupported(bool on);
|
2014-10-15 00:36:39 +02:00
|
|
|
void setMarksVisible(bool on);
|
|
|
|
|
void setParenthesesMatchingEnabled(bool on);
|
|
|
|
|
void setCodeFoldingSupported(bool on);
|
2014-09-01 16:16:44 +02:00
|
|
|
|
2014-08-28 13:45:42 +02:00
|
|
|
Core::IEditor *createEditor();
|
|
|
|
|
|
2014-08-22 12:14:06 +02:00
|
|
|
private:
|
2014-08-22 16:38:38 +02:00
|
|
|
friend class BaseTextEditor;
|
2014-08-27 11:19:04 +02:00
|
|
|
friend class PlainTextEditorFactory;
|
2014-10-15 00:36:39 +02:00
|
|
|
Internal::TextEditorFactoryPrivate *d;
|
2014-08-22 12:14:06 +02:00
|
|
|
};
|
|
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
} // namespace TextEditor
|
|
|
|
|
|
2014-09-26 11:37:54 +02:00
|
|
|
Q_DECLARE_METATYPE(TextEditor::TextEditorWidget::Link)
|
2010-10-06 15:23:05 +02:00
|
|
|
|
2014-09-29 00:39:38 +03:00
|
|
|
#endif // TEXTEDITOR_H
|