En esta página

Core::BaseTextDocument Class

class Core::BaseTextDocument

La clase `BaseTextDocument` es una clase base muy general para documentos que trabajan con texto. Más información...

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

Funciones 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

Descripción detallada

Esta clase contiene métodos auxiliares para guardar y leer archivos de texto con configuraciones de codificación y de fin de línea.

Véase también Utils::TextFileFormat.

Documentación de las funciones de miembro

Utils::TextFileFormat BaseTextDocument::format() const

Devuelve el formato obtenido en la última llamada a la función ` read()`.

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

Detecta automáticamente el formato del archivo y lee el archivo de texto especificado mediante « filePath ».

Devuelve si la operación se ha realizado correctamente.

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

Escribe el contenido (data) del archivo de texto filePath. Utiliza el formato obtenido de la última llamada a read() del archivo.

Devuelve si la operación se ha realizado correctamente.

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

Escribe el contenido (data) del archivo de texto filePath. Utiliza el formato personalizado format.

Devuelve si la operación se ha realizado correctamente.

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.