Extending Qt Creator Manual | IDocument

Extending Qt Creator Manual 4.7.0

# IDocument Class

(Debugger::Core::IDocument)

- List of all members, including inherited members

## Public Types

enum | ChangeTrigger { TriggerInternal, TriggerExternal }
enum | ChangeType { TypeContents, TypePermissions, TypeRemoved }
enum | OpenResult { Success, ReadError, CannotHandle }
enum | ReloadBehavior { BehaviorAsk, BehaviorSilent }
enum | ReloadFlag { FlagReload, FlagIgnore }
enum | ReloadSetting { AlwaysAsk, ReloadUnmodified, IgnoreAll }

## Public Functions

| IDocument(Debugger::QObject *parent = nullptr)
virtual | ~IDocument() override
bool | autoSave(Debugger::QString *errorString, const Debugger::QString &filePath)
virtual void | checkPermissions()
virtual Debugger::QByteArray | contents() const
Debugger::QString | displayName() const
virtual Debugger::QString | fallbackSaveAsFileName() const
virtual Debugger::QString | fallbackSaveAsPath() const
const Utils::FileName & | filePath() const
bool | hasWriteWarning() const
Debugger::Core::Id | id() const
Debugger::Core::InfoBar * | infoBar()
virtual bool | isFileReadOnly() const
virtual bool | isModified() const
virtual bool | isSaveAsAllowed() const
bool | isSuspendAllowed() const
bool | isTemporary() const
Debugger::QString | mimeType() const
virtual Debugger::Core::IDocument::OpenResult | open(Debugger::QString *errorString, const Debugger::QString &fileName, const Debugger::QString &realFileName)
Debugger::QString | plainDisplayName() const
Debugger::QString | preferredDisplayName() const
virtual bool | reload(Debugger::QString *errorString, Debugger::Core::IDocument::ReloadFlag flag, Debugger::Core::IDocument::ChangeType type)
virtual Debugger::Core::IDocument::ReloadBehavior | reloadBehavior(Debugger::Core::IDocument::ChangeTrigger state, Debugger::Core::IDocument::ChangeType type) const
void | removeAutoSaveFile()
virtual bool | save(Debugger::QString *errorString, const Debugger::QString &fileName = QString(), bool autoSave = false)
virtual bool | setContents(const Debugger::QByteArray &contents)
virtual void | setFilePath(const Utils::FileName &filePath)
void | setId(Debugger::Core::Id id)
void | setMimeType(const Debugger::QString &mimeType)
void | setPreferredDisplayName(const Debugger::QString &name)
void | setRestoredFrom(const Debugger::QString &name)
void | setSuspendAllowed(bool value)
void | setTemporary(bool temporary)
void | setUniqueDisplayName(const Debugger::QString &name)
void | setWriteWarning(bool has)
virtual bool | shouldAutoSave() const
Debugger::QString | uniqueDisplayName() const

## Protected Functions

void | aboutToReload()
void | changed()
void | contentsChanged()
void | filePathChanged(const Utils::FileName &oldName, const Utils::FileName &newName)
void | mimeTypeChanged()
void | reloadFinished(bool success)

## Member Type Documentation

### enum IDocument::ChangeTrigger

### enum IDocument::ChangeType

### enum IDocument::OpenResult

### enum IDocument::ReloadBehavior

### enum IDocument::ReloadFlag

### enum IDocument::ReloadSetting

## Member Function Documentation

### IDocument::IDocument(Debugger::QObject *parent = nullptr)

Default constructs an instance of IDocument.

### `[override virtual]` IDocument::~IDocument()

Destroys the instance of IDocument. The destructor is virtual.

### `[protected]` void IDocument::aboutToReload()

### bool IDocument::autoSave(Debugger::QString *errorString, const Debugger::QString &filePath)

### `[protected]` void IDocument::changed()

### `[virtual]` void IDocument::checkPermissions()

### `[virtual]` Debugger::QByteArray IDocument::contents() const

See also setContents().

### `[protected]` void IDocument::contentsChanged()

### Debugger::QString IDocument::displayName() const

### `[virtual]` Debugger::QString IDocument::fallbackSaveAsFileName() const

### `[virtual]` Debugger::QString IDocument::fallbackSaveAsPath() const

### const Utils::FileName &IDocument::filePath() const

See also setFilePath().

### `[protected]` void IDocument::filePathChanged(const Utils::FileName &oldName, const Utils::FileName &newName)

### bool IDocument::hasWriteWarning() const

### Debugger::Core::Id IDocument::id() const

See also setId().

### Debugger::Core::InfoBar *IDocument::infoBar()

### `[virtual]` bool IDocument::isFileReadOnly() const

### `[virtual]` bool IDocument::isModified() const

### `[virtual]` bool IDocument::isSaveAsAllowed() const

### bool IDocument::isSuspendAllowed() const

### bool IDocument::isTemporary() const

### Debugger::QString IDocument::mimeType() const

See also setMimeType().

### `[protected]` void IDocument::mimeTypeChanged()

### `[virtual]` Debugger::Core::IDocument::OpenResult IDocument::open(Debugger::QString *errorString, const Debugger::QString &fileName, const Debugger::QString &realFileName)

### Debugger::QString IDocument::plainDisplayName() const

### Debugger::QString IDocument::preferredDisplayName() const

See also setPreferredDisplayName().

### `[virtual]` bool IDocument::reload(Debugger::QString *errorString, Debugger::Core::IDocument::ReloadFlag flag, Debugger::Core::IDocument::ChangeType type)

### `[virtual]` Debugger::Core::IDocument::ReloadBehavior IDocument::reloadBehavior(Debugger::Core::IDocument::ChangeTrigger state, Debugger::Core::IDocument::ChangeType type) const

### `[protected]` void IDocument::reloadFinished(bool success)

### void IDocument::removeAutoSaveFile()

### `[virtual]` bool IDocument::save(Debugger::QString *errorString, const Debugger::QString &fileName = QString(), bool autoSave = false)

### `[virtual]` bool IDocument::setContents(const Debugger::QByteArray &contents)

See also contents().

### `[virtual]` void IDocument::setFilePath(const Utils::FileName &filePath)

See also filePath().

### void IDocument::setId(Debugger::Core::Id id)

See also id().

### void IDocument::setMimeType(const Debugger::QString &mimeType)

See also mimeType().

### void IDocument::setPreferredDisplayName(const Debugger::QString &name)

See also preferredDisplayName().

### void IDocument::setRestoredFrom(const Debugger::QString &name)

### void IDocument::setSuspendAllowed(bool value)

See also isSuspendAllowed().

### void IDocument::setTemporary(bool temporary)

See also isTemporary().

### void IDocument::setUniqueDisplayName(const Debugger::QString &name)

See also uniqueDisplayName().

### void IDocument::setWriteWarning(bool has)

See also hasWriteWarning().

### `[virtual]` bool IDocument::shouldAutoSave() const

### Debugger::QString IDocument::uniqueDisplayName() const

See also setUniqueDisplayName().