Na tej strani

Core::BaseTextDocument Class

class Core::BaseTextDocument

Razred `BaseTextDocument` je zelo splošen osnovni razred za dokumente, ki delujejo z besedilom. Več...

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

Podroben opis

Ta razred vsebuje pomožne metode za shranjevanje in branje besedilnih datotek z nastavitvami kodiranja in zaključkov vrstic.

Glej tudi Utils::TextFileFormat.

Dokumentacija funkcij članov

Utils::TextFileFormat BaseTextDocument::format() const

Vrne format, pridobljen pri zadnjem klicu funkcije ` read()`.

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

Samodejno prepozna format datoteke in prebere besedilno datoteko, določeno v parametru » filePath «.

Vrne, ali je bila operacija uspešna.

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

Izpiše vsebino (data) besedilne datoteke filePath. Uporabi format, pridobljen iz zadnjega klica read() za to datoteko.

Vrne, ali je bila operacija uspešna.

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

Izpiše vsebino (data) besedilne datoteke filePath. Uporabi prilagojeni format format.

Vrne, ali je bila operacija uspeš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.