- Extending Qt Creator Manual
- QtCreator
- EditorType
- Extending Qt Creator Manual 8.0.2

# 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>
Inherited By: | Core::IEditorFactory and Core::IExternalEditor

- List of all members, including inherited members

## Public Functions

QString | displayName() const
Utils::Id | id() const
QStringList | mimeTypes() const

## Static Public Members

const Core::EditorTypeList | allEditorTypes()
const Core::EditorTypeList | defaultEditorTypes(const Utils::MimeType &mimeType)

## Protected Functions

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

## Detailed Description

## Member Function Documentation

### `[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 Core::EditorTypeList EditorType::allEditorTypes()

Returns all registered internal and external editors.

### `[static]` const Core::EditorTypeList EditorType::defaultEditorTypes(const Utils::MimeType &mimeType)

Returns all available internal and external editors for the mimeType in the default order: Editor types ordered by MIME type hierarchy, internal editors first.

### 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().