Na ovoj stranici

Core::BaseTextDocument Class

class Core::BaseTextDocument

Klasa BaseTextDocument je vrlo opća bazna klasa za dokumente koji rade s tekstom. Više...

Header: #include <coreplugin/textdocument.h>
Inherits: Core::IDocument

Javne funkcije

Utils::TextFileFormat format() const
Core::BaseTextDocument::ReadResult read(const Utils::FilePath &filePath)
Utils::Result<> write(const Utils::FilePath &filePath, const QString &data) const
Utils::Result<> write(const Utils::FilePath &filePath, const Utils::TextFileFormat &format, const QString &data) const

Detaljan opis

Ovaj razred sadrži pomoćne metode za spremanje i čitanje tekstualnih datoteka s postavkama kodiranja i završetka retka.

Vidi također Utils::TextFileFormat.

Dokumentacija funkcija člana

Utils::TextFileFormat BaseTextDocument::format() const

Vraća format dobiven posljednjim pozivom funkcije read().

Core::BaseTextDocument::ReadResult BaseTextDocument::read(const Utils::FilePath &filePath)

Automatski detektira format datoteke i čita tekstualnu datoteku navedenu u filePath.

Vraća je li operacija bila uspješna.

Utils::Result<> BaseTextDocument::write(const Utils::FilePath &filePath, const QString &data) const

Ispisuje sadržaj (data) tekstualne datoteke filePath. Koristi format dobiven posljednjim read() datoteke.

Vraća je li operacija bila uspješna.

Utils::Result<> BaseTextDocument::write(const Utils::FilePath &filePath, const Utils::TextFileFormat &format, const QString &data) const

Ispisuje sadržaj (data) tekstualne datoteke filePath. Koristi prilagođeni format format.

Vraća je li operacija bila uspješna.

Copyright © The Qt Company Ltd. and other contributors. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.