Core::BaseTextDocument Class
class Core::BaseTextDocumentA classe `BaseTextDocument` é uma classe base muito geral para documentos que trabalham com texto. Mais...
| Header: | #include <coreplugin/textdocument.h> |
| Inherits: | Core::IDocument |
Funções públicas
| 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 |
Descrição detalhada
Esta classe contém métodos auxiliares para salvar e ler arquivos de texto com configurações de codificação e fim de linha.
Veja também Utils::TextFileFormat.
Documentação das funções de membro
Utils::TextFileFormat BaseTextDocument::format() const
Retorna o formato obtido na última chamada à função ` read()`.
Core::BaseTextDocument::ReadResult BaseTextDocument::read(const Utils::FilePath &filePath)
Detecta automaticamente o formato do arquivo e lê o arquivo de texto especificado por ` filePath`.
Retorna se a operação foi bem-sucedida.
Utils::Result<> BaseTextDocument::write(const Utils::FilePath &filePath, const QString &data) const
Exibe o conteúdo (data) do arquivo de texto filePath. Utiliza o formato obtido na última chamada à função read() do arquivo.
Retorna se a operação foi bem-sucedida.
Utils::Result<> BaseTextDocument::write(const Utils::FilePath &filePath, const Utils::TextFileFormat &format, const QString &data) const
Exibe o conteúdo (data) do arquivo de texto filePath. Utiliza o formato personalizado format.
Retorna se a operação foi bem-sucedida.
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.