Core::BaseTextDocument Class
class Core::BaseTextDocumentA BaseTextDocument osztály egy nagyon általános alaposztály a szöveggel dolgozó dokumentumok számára. Tovább...
| Header: | #include <coreplugin/textdocument.h> |
| Inherits: | Core::IDocument |
Nyilvános függvények
| 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 |
Részletes leírás
Ez az osztály segítő módszereket tartalmaz a szöveges fájlok mentéséhez és olvasásához, kódolási és sorzárási beállításokkal.
Lásd még: Utils::TextFileFormat.
Tagfüggvények dokumentációja
Utils::TextFileFormat BaseTextDocument::format() const
Visszaadja az ` read()` függvény legutóbbi hívásából kapott formátumot.
Core::BaseTextDocument::ReadResult BaseTextDocument::read(const Utils::FilePath &filePath)
Automatikusan felismeri a fájlformátumot, és beolvassa a filePath címen megadott szöveges fájlt.
Visszaadja, hogy a művelet sikeres volt-e.
Utils::Result<> BaseTextDocument::write(const Utils::FilePath &filePath, const QString &data) const
Kinyomtatja a „ filePath ” szövegfájl tartalmát (data). A fájl legutóbbi „ read()” hívásából kapott formátumot használja.
Visszaadja, hogy a művelet sikeres volt-e.
Utils::Result<> BaseTextDocument::write(const Utils::FilePath &filePath, const Utils::TextFileFormat &format, const QString &data) const
Kibírja a „ filePath ” szövegfájl tartalmát (data). Az „ format ” egyéni formátumot használja.
Visszaadja, hogy a művelet sikeres volt-e.
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.