edbee - Qt Editor Library v0.11.1
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
textdocumentserializer.h
Go to the documentation of this file.
1// edbee - Copyright (c) 2012-2025 by Rick Blommers and contributors
2// SPDX-License-Identifier: MIT
3
4#pragma once
5
6#include "edbee/exports.h"
7
8#include <QString>
9
10class QIODevice;
11
12namespace edbee {
13
14class TextDocument;
16
18public:
24 virtual bool saveLineSelector( TextDocumentSerializer* serializer, int lineIdx, QString& line ) = 0;
25};
26
27
30public:
31 TextDocumentSerializer( TextDocument* textDocument );
32
33 bool loadWithoutOpening( QIODevice* ioDevice );
34 bool load( QIODevice* ioDevice );
35
36 bool saveWithoutOpening( QIODevice* ioDevice );
37 bool save( QIODevice* ioDevice );
38
39
40 QString errorString() { return errorString_; }
42 TextDocumentSerializerFilter* filter() { return filterRef_; }
43
44private:
45 QString appendBufferToDocument(const QString& strIn);
46
47private:
48 TextDocument* textDocumentRef_;
49 int blockSize_;
50 QString errorString_;
52};
53
54} // edbee
This is the base and abstract class of a text document A TextDocument is the model part of the editor...
Definition textdocument.h:42
Definition textdocumentserializer.h:17
virtual bool saveLineSelector(TextDocumentSerializer *serializer, int lineIdx, QString &line)=0
A special filter class to filter lines while saving.
A class used to load/save a text-file from and to an IODevice.
Definition textdocumentserializer.h:29
TextDocumentSerializer(TextDocument *textDocument)
Definition textdocumentserializer.cpp:19
bool loadWithoutOpening(QIODevice *ioDevice)
loads the file data for the given (opened) ioDevice
Definition textdocumentserializer.cpp:29
void setFilter(TextDocumentSerializerFilter *filter)
Definition textdocumentserializer.h:41
TextDocumentSerializerFilter * filter()
Definition textdocumentserializer.h:42
bool saveWithoutOpening(QIODevice *ioDevice)
loads the file data for the given (opened) ioDevice
Definition textdocumentserializer.cpp:129
bool save(QIODevice *ioDevice)
Saves the given document to the iodevice This method opens and closes the ioDevice....
Definition textdocumentserializer.cpp:178
bool load(QIODevice *ioDevice)
executes the file loading for the given (unopened) ioDevice
Definition textdocumentserializer.cpp:110
QString errorString()
Definition textdocumentserializer.h:40
#define EDBEE_EXPORT
Definition exports.h:15
QT Acessibility has an issue with reporting blank lines between elements lines. defining 'WINDOWS_EMP...
Definition commentcommand.cpp:20