![]() ![]() The most common use case for implementing an IDocument subclass is as a document for an IEditor implementation. If the content of the document can change in Qt Creator, diverging from the content on disk: isModified(), save(), isSaveAsAllowed(), fallbackSaveAsPath(), fallbackSaveAsFileName(). If the user requests the reload or reloadBehavior() returns IDocument::BehaviorSilent, the DocumentManager calls reload() to initiate a reload of the file from disk.Ĭore functions: setFilePath(), reload(), reloadBehavior(). If that returns IDocument::BehaviorAsk, the user is asked if the file should be reloaded from disk. When the file specified with filePath() has changed externally, the DocumentManager asks the corresponding IDocument instance what to do via reloadBehavior(). You can implement IDocument and register instances in DocumentManager to let it handle external modifications of a file. ![]() SetPreferredDisplayName(const QString & name) SetFilePath(const Utils::FilePath & filePath) Save(QString * errorString, const Utils::FilePath & filePath = Utils::FilePath(), bool autoSave = false) ReloadBehavior(Core::IDocument::ChangeTrigger trigger, Core::IDocument::ChangeType type) const ![]() Reload(QString * errorString, Core::IDocument::ReloadFlag flag, Core::IDocument::ChangeType type) Open(QString * errorString, const Utils::FilePath & filePath, const Utils::FilePath & realFilePath) ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |