edbee - Qt Editor Library v0.11.1
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
linedatachange.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
9
10namespace edbee {
11
12class TextDocument;
13class TextLineData;
14
17{
18public:
19 LineDataChange(int line, int field);
20 virtual ~LineDataChange();
21
22 void giveLineData( TextLineData* lineData );
23
24 virtual void execute(TextDocument* document);
25 virtual void revert(TextDocument* doc);
26
27 virtual bool giveAndMerge(TextDocument* document, Change* textChange );
28
29 virtual void applyLineDelta( int line, int length, int newLength );
30
31 virtual QString toString();
32
33 int line() const;
34 void setLine( int line );
35
36 int field() const;
37 void setField( int field );
38
39private:
40 void changeLineData( TextDocument* doc );
41
42private:
43
44 int line_;
45 int field_;
46 TextLineData* lineData_;
47
48};
49
50} // edbee
A basic change.
Definition change.h:18
void setField(int field)
sets the field position
Definition linedatachange.cpp:102
virtual void execute(TextDocument *document)
This method should execute the command.
Definition linedatachange.cpp:30
LineDataChange(int line, int field)
Definition linedatachange.cpp:13
int field() const
retursn the field index of this line-data item
Definition linedatachange.cpp:95
virtual bool giveAndMerge(TextDocument *document, Change *textChange)
merge is never a problem, simply
Definition linedatachange.cpp:41
virtual QString toString()
Returns the debug text.
Definition linedatachange.cpp:65
int line() const
Returns the line index.
Definition linedatachange.cpp:81
virtual void revert(TextDocument *doc)
this method reverts the given operation
Definition linedatachange.cpp:35
void giveLineData(TextLineData *lineData)
Definition linedatachange.cpp:25
virtual void applyLineDelta(int line, int length, int newLength)
line is moved with the given delta
Definition linedatachange.cpp:56
void setLine(int line)
Sets the line of this change.
Definition linedatachange.cpp:88
This is the base and abstract class of a text document A TextDocument is the model part of the editor...
Definition textdocument.h:42
A text line item reference.
Definition textlinedata.h:30
#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