EditorType Class

class Core::EditorType

The EditorType class is the base class for Core::IEditorFactory and Core::IExternalEditor. More...

Header: #include <coreplugin/editormanager/ieditorfactory.h>
Inherits: QObject
Inherited By:

Core::IEditorFactory and Core::IExternalEditor

Public Functions

virtual ~EditorType() override
QString displayName() const
Utils::Id id() const
QStringList mimeTypes() const

Static Public Members

const EditorTypeList allEditorTypes()

Protected Functions

EditorType()
void addMimeType(const QString &mimeType)
void setDisplayName(const QString &displayName)
void setId(Utils::Id id)
void setMimeTypes(const QStringList &mimeTypes)

Detailed Description

\inmoduleQtCreator

Member Function Documentation

[protected] EditorType::EditorType()

\internal

[override virtual noexcept] EditorType::~EditorType()

\internal

[protected] void EditorType::addMimeType(const QString &mimeType)

Adds mimeType to the list of MIME types supported by this editor type.

See also mimeTypes() and setMimeTypes().

[static] const EditorTypeList EditorType::allEditorTypes()

Returns all registered internal and external editors.

QString EditorType::displayName() const

Returns a user-visible description of the editor type.

See also setDisplayName().

Utils::Id EditorType::id() const

Returns the ID of the editors' document type.

See also setId().

QStringList EditorType::mimeTypes() const

Returns the list of supported MIME types of this editor type.

See also addMimeType() and setMimeTypes().

[protected] void EditorType::setDisplayName(const QString &displayName)

Sets the displayName of the editor type. This is for example shown in the Open With menu and the MIME type preferences.

See also displayName().

[protected] void EditorType::setId(Utils::Id id)

Sets the id of the editors' document type. This must be the same as the IDocument::id() of the documents returned by created editors.

See also id().

[protected] void EditorType::setMimeTypes(const QStringList &mimeTypes)

Sets the MIME types supported by the editor type to mimeTypes.

See also addMimeType() and mimeTypes().