IEditor Class

class Core::IEditor

The IEditor class provides an interface for editing an open document in Qt Creator. More...

Header: #include <coreplugin/editormanager/ieditor.h>
Inherits: Core::IContext

Public Functions

IEditor()
bool duplicateSupported() const
void setDuplicateSupported(bool duplicatesSupported)

Detailed Description

IEditor instances are usually created by a corresponding IEditorFactory.

An IEditor instance provides an editor widget for a single IDocument via the IContext::widget() method. If the the editor type supports it, multiple editors can be opened for the same document. Multiple IEditor instances share ownership of the same IDocument instance in that case.

The IEditor::toolBar() is integrated into the toolbar above the editor widget, next to the document drop down.

See also Core::IEditorFactory and Core::EditorManager.

Member Function Documentation

IEditor::IEditor()

Creates an IEditor.

Implementations must create a corresponding document, or share an existing document with another IEditor.

bool IEditor::duplicateSupported() const

Returns whether duplication is supported, for example when the user splits the editor view.

See also duplicate() and setDuplicateSupported().

void IEditor::setDuplicateSupported(bool duplicatesSupported)

Sets whether duplication is supported to duplicatesSupported.

The default is false.

See also duplicate() and duplicateSupported().