Extending Qt Creator Manual | EditorManager

Extending Qt Creator Manual 4.7.0

# EditorManager Class

(Debugger::Core::EditorManager)

- List of all members, including inherited members

## Public Types

class | FilePathInfo
typedef | EditorFactoryList
typedef | ExternalEditorList
enum | OpenEditorFlag { NoFlags, DoNotChangeCurrentEditor, IgnoreNavigationHistory, DoNotMakeVisible, ..., DoNotSwitchToEditMode }
flags | OpenEditorFlags
typedef | WindowTitleHandler

## Static Public Members

void | activateEditor(Debugger::Core::IEditor *editor, Debugger::Core::EditorManager::OpenEditorFlags flags)
Debugger::Core::IEditor * | activateEditorForDocument(Debugger::Core::IDocument *document, Debugger::Core::EditorManager::OpenEditorFlags flags)
void | activateEditorForEntry(DocumentModel::Entry *entry, Debugger::Core::EditorManager::OpenEditorFlags flags)
void | addCloseEditorListener(const int &listener)
void | addCurrentPositionToNavigationHistory(const Debugger::QByteArray &saveState = QByteArray())
void | addNativeDirAndOpenWithActions(Debugger::QMenu *contextMenu, DocumentModel::Entry *entry)
void | addSaveAndCloseEditorActions(Debugger::QMenu *contextMenu, DocumentModel::Entry *entry, Debugger::Core::IEditor *editor = nullptr)
void | clearUniqueId(Debugger::Core::IDocument *document)
bool | closeAllEditors(bool askAboutModifiedEditors = true)
bool | closeDocument(Debugger::Core::IDocument *document, bool askAboutModifiedEditors = true)
void | closeDocument(DocumentModel::Entry *entry)
bool | closeDocuments(const QList<Debugger::Core::IDocument *> &documents, bool askAboutModifiedEditors = true)
void | closeEditor(Debugger::Core::IEditor *editor, bool askAboutModifiedEditors = true)
bool | closeEditors(const QList<Debugger::Core::IEditor *> &editorsToClose, bool askAboutModifiedEditors = true)
void | closeOtherDocuments(Debugger::Core::IDocument *document)
void | closeOtherDocuments()
Debugger::Core::IDocument * | currentDocument()
Debugger::Core::IEditor * | currentEditor()
void | cutForwardNavigationHistory()
Debugger::QTextCodec * | defaultTextCodec()
Debugger::Core::EditorManager::EditorFactoryList | editorFactories(const Utils::MimeType &mimeType, bool bestMatchOnly = true)
Debugger::Core::EditorManager::EditorFactoryList | editorFactories(const Debugger::QString &fileName, bool bestMatchOnly = true)
Debugger::Core::EditorManager::ExternalEditorList | externalEditors(const Utils::MimeType &mimeType, bool bestMatchOnly = true)
Debugger::QStringList | getOpenFileNames()
void | goBackInNavigationHistory()
void | goForwardInNavigationHistory()
void | gotoOtherSplit()
bool | hasSplitter()
void | hideEditorStatusBar(const Debugger::QString &id)
Debugger::Core::EditorManager * | instance()
bool | isAutoSaveFile(const Debugger::QString &fileName)
Debugger::qint64 | maxTextFileSize()
Debugger::Core::IEditor * | openEditor(const Debugger::QString &fileName, Debugger::Core::Id editorId, Debugger::Core::EditorManager::OpenEditorFlags flags, bool *newEditor = nullptr)
Debugger::Core::IEditor * | openEditorAt(const Debugger::QString &fileName, int line, int column, Debugger::Core::Id editorId, Debugger::Core::EditorManager::OpenEditorFlags flags, bool *newEditor = nullptr)
void | openEditorAtSearchResult(const Debugger::Core::SearchResultItem &item, Debugger::Core::EditorManager::OpenEditorFlags flags)
Debugger::Core::IEditor * | openEditorWithContents(Debugger::Core::Id editorId, Debugger::QString *titlePattern, const Debugger::QByteArray &contents, const Debugger::QString &uniqueId, Debugger::Core::EditorManager::OpenEditorFlags flags)
bool | openExternalEditor(const Debugger::QString &fileName, Debugger::Core::Id editorId)
void | populateOpenWithMenu(Debugger::QMenu *menu, const Debugger::QString &fileName)
IDocument::ReloadSetting | reloadSetting()
bool | restoreState(const Debugger::QByteArray &state)
void | revertToSaved()
bool | saveDocument(Debugger::Core::IDocument *document)
void | saveDocument()
void | saveDocumentAs()
Debugger::QByteArray | saveState()
void | setReloadSetting(IDocument::ReloadSetting behavior)
void | setSessionTitleHandler(Debugger::Core::EditorManager::WindowTitleHandler handler)
void | setWindowTitleAdditionHandler(Debugger::Core::EditorManager::WindowTitleHandler handler)
void | setWindowTitleVcsTopicHandler(Debugger::Core::EditorManager::WindowTitleHandler handler)
void | showEditorStatusBar(const Debugger::QString &id, const Debugger::QString &infoText, const Debugger::QString &buttonText = QString(), Debugger::QObject *object = nullptr, const int &function)
bool | skipOpeningBigTextFile(const Debugger::QString &filePath)
void | slotCloseCurrentEditorOrDocument()
Debugger::Core::EditorManager::FilePathInfo | splitLineAndColumnNumber(const Debugger::QString &filePath)
void | splitSideBySide()
void | updateWindowTitles()
QList<Debugger::Core::IEditor *> | visibleEditors()

## Protected Functions

void | aboutToSave(Debugger::Core::IDocument *document)
void | autoSaved()
void | currentDocumentStateChanged()
void | currentEditorAboutToChange(Core::IEditor *editor)
void | currentEditorChanged(Core::IEditor *editor)
void | documentStateChanged(Core::IDocument *document)
void | editorAboutToClose(Core::IEditor *editor)
void | editorCreated(Core::IEditor *editor, const Debugger::QString &fileName)
void | editorOpened(Core::IEditor *editor)
void | editorsClosed(QList<Core::IEditor *> editors)
void | findOnFileSystemRequest(const Debugger::QString &path)
void | openFileProperties(const Utils::FileName &path)

## Member Type Documentation

### typedef EditorManager::EditorFactoryList

### typedef EditorManager::ExternalEditorList

### enum EditorManager::OpenEditorFlag
flags EditorManager::OpenEditorFlags

The OpenEditorFlags type is a typedef for QFlags<OpenEditorFlag>. It stores an OR combination of OpenEditorFlag values.

### typedef EditorManager::WindowTitleHandler

## Member Function Documentation

### `[protected]` void EditorManager::aboutToSave(Debugger::Core::IDocument *document)

### `[static]` void EditorManager::activateEditor(Debugger::Core::IEditor *editor, Debugger::Core::EditorManager::OpenEditorFlags flags)

### `[static]` Debugger::Core::IEditor *EditorManager::activateEditorForDocument(Debugger::Core::IDocument *document, Debugger::Core::EditorManager::OpenEditorFlags flags)

### `[static]` void EditorManager::activateEditorForEntry(DocumentModel::Entry *entry, Debugger::Core::EditorManager::OpenEditorFlags flags)

### `[static]` void EditorManager::addCloseEditorListener(const int &listener)

### `[static]` void EditorManager::addCurrentPositionToNavigationHistory(const Debugger::QByteArray &saveState = QByteArray())

### `[static]` void EditorManager::addNativeDirAndOpenWithActions(Debugger::QMenu *contextMenu, DocumentModel::Entry *entry)

### `[static]` void EditorManager::addSaveAndCloseEditorActions(Debugger::QMenu *contextMenu, DocumentModel::Entry *entry, Debugger::Core::IEditor *editor = nullptr)

### `[protected]` void EditorManager::autoSaved()

### `[static]` void EditorManager::clearUniqueId(Debugger::Core::IDocument *document)

### `[static]` bool EditorManager::closeAllEditors(bool askAboutModifiedEditors = true)

### `[static]` bool EditorManager::closeDocument(Debugger::Core::IDocument *document, bool askAboutModifiedEditors = true)

### `[static]` void EditorManager::closeDocument(DocumentModel::Entry *entry)

### `[static]` bool EditorManager::closeDocuments(const QList<Debugger::Core::IDocument *> &documents, bool askAboutModifiedEditors = true)

### `[static]` void EditorManager::closeEditor(Debugger::Core::IEditor *editor, bool askAboutModifiedEditors = true)

### `[static]` bool EditorManager::closeEditors(const QList<Debugger::Core::IEditor *> &editorsToClose, bool askAboutModifiedEditors = true)

### `[static]` void EditorManager::closeOtherDocuments(Debugger::Core::IDocument *document)

### `[static]` void EditorManager::closeOtherDocuments()

### `[static]` Debugger::Core::IDocument *EditorManager::currentDocument()

### `[protected]` void EditorManager::currentDocumentStateChanged()

### `[static]` Debugger::Core::IEditor *EditorManager::currentEditor()

### `[protected]` void EditorManager::currentEditorAboutToChange(Core::IEditor *editor)

### `[protected]` void EditorManager::currentEditorChanged(Core::IEditor *editor)

### `[static]` void EditorManager::cutForwardNavigationHistory()

### `[static]` Debugger::QTextCodec *EditorManager::defaultTextCodec()

### `[protected]` void EditorManager::documentStateChanged(Core::IDocument *document)

### `[protected]` void EditorManager::editorAboutToClose(Core::IEditor *editor)

### `[protected]` void EditorManager::editorCreated(Core::IEditor *editor, const Debugger::QString &fileName)

### `[static]` Debugger::Core::EditorManager::EditorFactoryList EditorManager::editorFactories(const Utils::MimeType &mimeType, bool bestMatchOnly = true)

### `[static]` Debugger::Core::EditorManager::EditorFactoryList EditorManager::editorFactories(const Debugger::QString &fileName, bool bestMatchOnly = true)

### `[protected]` void EditorManager::editorOpened(Core::IEditor *editor)

### `[protected]` void EditorManager::editorsClosed(QList<Core::IEditor *> editors)

### `[static]` Debugger::Core::EditorManager::ExternalEditorList EditorManager::externalEditors(const Utils::MimeType &mimeType, bool bestMatchOnly = true)

### `[protected]` void EditorManager::findOnFileSystemRequest(const Debugger::QString &path)

### `[static]` Debugger::QStringList EditorManager::getOpenFileNames()

### `[static]` void EditorManager::goBackInNavigationHistory()

### `[static]` void EditorManager::goForwardInNavigationHistory()

### `[static]` void EditorManager::gotoOtherSplit()

### `[static]` bool EditorManager::hasSplitter()

### `[static]` void EditorManager::hideEditorStatusBar(const Debugger::QString &id)

### `[static]` Debugger::Core::EditorManager *EditorManager::instance()

### `[static]` bool EditorManager::isAutoSaveFile(const Debugger::QString &fileName)

### `[static]` Debugger::qint64 EditorManager::maxTextFileSize()

### `[static]` Debugger::Core::IEditor *EditorManager::openEditor(const Debugger::QString &fileName, Debugger::Core::Id editorId, Debugger::Core::EditorManager::OpenEditorFlags flags, bool *newEditor = nullptr)

### `[static]` Debugger::Core::IEditor *EditorManager::openEditorAt(const Debugger::QString &fileName, int line, int column, Debugger::Core::Id editorId, Debugger::Core::EditorManager::OpenEditorFlags flags, bool *newEditor = nullptr)

### `[static]` void EditorManager::openEditorAtSearchResult(const Debugger::Core::SearchResultItem &item, Debugger::Core::EditorManager::OpenEditorFlags flags)

### `[static]` Debugger::Core::IEditor *EditorManager::openEditorWithContents(Debugger::Core::Id editorId, Debugger::QString *titlePattern, const Debugger::QByteArray &contents, const Debugger::QString &uniqueId, Debugger::Core::EditorManager::OpenEditorFlags flags)

### `[static]` bool EditorManager::openExternalEditor(const Debugger::QString &fileName, Debugger::Core::Id editorId)

### `[protected]` void EditorManager::openFileProperties(const Utils::FileName &path)

### `[static]` void EditorManager::populateOpenWithMenu(Debugger::QMenu *menu, const Debugger::QString &fileName)

### `[static]` IDocument::ReloadSetting EditorManager::reloadSetting()

See also setReloadSetting().

### `[static]` bool EditorManager::restoreState(const Debugger::QByteArray &state)

### `[static]` void EditorManager::revertToSaved()

### `[static]` bool EditorManager::saveDocument(Debugger::Core::IDocument *document)

### `[static]` void EditorManager::saveDocument()

### `[static]` void EditorManager::saveDocumentAs()

### `[static]` Debugger::QByteArray EditorManager::saveState()

### `[static]` void EditorManager::setReloadSetting(IDocument::ReloadSetting behavior)

See also reloadSetting().

### `[static]` void EditorManager::setSessionTitleHandler(Debugger::Core::EditorManager::WindowTitleHandler handler)

### `[static]` void EditorManager::setWindowTitleAdditionHandler(Debugger::Core::EditorManager::WindowTitleHandler handler)

### `[static]` void EditorManager::setWindowTitleVcsTopicHandler(Debugger::Core::EditorManager::WindowTitleHandler handler)

### `[static]` void EditorManager::showEditorStatusBar(const Debugger::QString &id, const Debugger::QString &infoText, const Debugger::QString &buttonText = QString(), Debugger::QObject *object = nullptr, const int &function)

### `[static]` bool EditorManager::skipOpeningBigTextFile(const Debugger::QString &filePath)

### `[static]` void EditorManager::slotCloseCurrentEditorOrDocument()

### `[static]` Debugger::Core::EditorManager::FilePathInfo EditorManager::splitLineAndColumnNumber(const Debugger::QString &filePath)

### `[static]` void EditorManager::splitSideBySide()

### `[static]` void EditorManager::updateWindowTitles()

### `[static]` QList<Debugger::Core::IEditor *> EditorManager::visibleEditors()