forked from qt-creator/qt-creator
Editors: Some renamings to enhance consistency
The base pattern is FooEditor for BaseTextEditor derived classes and FooEditorWidget for BaseTextEditorWidget derived classes. So: CPPEditorWidget -> CppEditorWidget CPPEditorWidgetPrivate -> CppEditorWidgetPrivate ...::EditorWidget -> PythonEditorWidget GLSLTextEditorWidget -> GlslEditorWidget GLSLEditorEditable -> GlslEditor Change-Id: I76d34a3694c2fb35491982d86e83f7e4774c0be6 Reviewed-by: Daniel Teske <daniel.teske@digia.com> Reviewed-by: Christian Stenger <christian.stenger@digia.com>
This commit is contained in:
@@ -47,7 +47,7 @@
|
||||
namespace PythonEditor {
|
||||
namespace Internal {
|
||||
|
||||
PythonEditor::PythonEditor(EditorWidget *editorWidget)
|
||||
PythonEditor::PythonEditor(PythonEditorWidget *editorWidget)
|
||||
:BaseTextEditor(editorWidget)
|
||||
{
|
||||
setContext(Core::Context(Constants::C_PYTHONEDITOR_ID,
|
||||
@@ -58,7 +58,7 @@ PythonEditor::PythonEditor(EditorWidget *editorWidget)
|
||||
|
||||
Core::IEditor *PythonEditor::duplicate()
|
||||
{
|
||||
EditorWidget *widget = new EditorWidget(qobject_cast<EditorWidget *>(editorWidget()));
|
||||
PythonEditorWidget *widget = new PythonEditorWidget(qobject_cast<PythonEditorWidget *>(editorWidget()));
|
||||
TextEditor::TextEditorSettings::initializeEditor(widget);
|
||||
return widget->editor();
|
||||
}
|
||||
|
||||
@@ -35,14 +35,14 @@
|
||||
namespace PythonEditor {
|
||||
namespace Internal {
|
||||
|
||||
class EditorWidget;
|
||||
class PythonEditorWidget;
|
||||
|
||||
class PythonEditor : public TextEditor::BaseTextEditor
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit PythonEditor(EditorWidget *editorWidget);
|
||||
explicit PythonEditor(PythonEditorWidget *editorWidget);
|
||||
|
||||
Core::IEditor *duplicate();
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ EditorFactory::EditorFactory(QObject *parent)
|
||||
|
||||
Core::IEditor *EditorFactory::createEditor()
|
||||
{
|
||||
EditorWidget *widget = new EditorWidget();
|
||||
PythonEditorWidget *widget = new PythonEditorWidget();
|
||||
TextEditor::TextEditorSettings::initializeEditor(widget);
|
||||
|
||||
return widget->editor();
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace PythonEditor {
|
||||
namespace Internal {
|
||||
|
||||
class EditorFactory;
|
||||
class EditorWidget;
|
||||
class PythonEditorWidget;
|
||||
|
||||
/**
|
||||
\class PyEditor::Plugin implements ExtensionSystem::IPlugin
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
namespace PythonEditor {
|
||||
namespace Internal {
|
||||
|
||||
EditorWidget::EditorWidget(QWidget *parent)
|
||||
PythonEditorWidget::PythonEditorWidget(QWidget *parent)
|
||||
: TextEditor::BaseTextEditorWidget(parent)
|
||||
{
|
||||
baseTextDocument()->setId(Constants::C_PYTHONEDITOR_ID);
|
||||
@@ -56,13 +56,13 @@ EditorWidget::EditorWidget(QWidget *parent)
|
||||
ctor();
|
||||
}
|
||||
|
||||
EditorWidget::EditorWidget(EditorWidget *other)
|
||||
PythonEditorWidget::PythonEditorWidget(PythonEditorWidget *other)
|
||||
: TextEditor::BaseTextEditorWidget(other)
|
||||
{
|
||||
ctor();
|
||||
}
|
||||
|
||||
void EditorWidget::ctor()
|
||||
void PythonEditorWidget::ctor()
|
||||
{
|
||||
setParenthesesMatchingEnabled(true);
|
||||
setMarksVisible(true);
|
||||
@@ -71,7 +71,7 @@ void EditorWidget::ctor()
|
||||
new PythonHighlighter(baseTextDocument());
|
||||
}
|
||||
|
||||
TextEditor::BaseTextEditor *EditorWidget::createEditor()
|
||||
TextEditor::BaseTextEditor *PythonEditorWidget::createEditor()
|
||||
{
|
||||
return new PythonEditor(this);
|
||||
}
|
||||
|
||||
@@ -36,19 +36,19 @@
|
||||
namespace PythonEditor {
|
||||
namespace Internal {
|
||||
|
||||
class EditorWidget : public TextEditor::BaseTextEditorWidget
|
||||
class PythonEditorWidget : public TextEditor::BaseTextEditorWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
EditorWidget(QWidget *parent = 0);
|
||||
EditorWidget(EditorWidget *other);
|
||||
PythonEditorWidget(QWidget *parent = 0);
|
||||
PythonEditorWidget(PythonEditorWidget *other);
|
||||
|
||||
protected:
|
||||
TextEditor::BaseTextEditor *createEditor();
|
||||
|
||||
private:
|
||||
EditorWidget(TextEditor::BaseTextEditorWidget *); // avoid stupidity
|
||||
PythonEditorWidget(TextEditor::BaseTextEditorWidget *); // avoid stupidity
|
||||
void ctor();
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user