edbee - Qt Editor Library
linedatalistchange.h
Go to the documentation of this file.
1 
6 #pragma once
7 
8 #include <QVector>
9 
11 
12 namespace edbee {
13 
14 class TextLineDataManager;
15 class TextLineDataList;
16 
20 {
21 public:
22  LineDataListChange( TextLineDataManager* manager, int offset , int lenght, int newLength );
23  virtual ~LineDataListChange();
24 
25  virtual void execute(TextDocument* document);
26  virtual void revert(TextDocument* doc);
27 
28  virtual void mergeStoredData(AbstractRangedChange* change);
29  virtual bool giveAndMerge(TextDocument* document, Change* textChange );
30 
31  virtual QString toString();
32 
33  int offset() const;
34  void setOffset( int value );
35 
36  virtual int docLength() const;
37  void setDocLength( int value );
38 
39  virtual int storedLength() const;
40 
42  int oldListListLength();
43 
44 private:
45 
46  TextLineDataManager* managerRef_;
47  int offset_;
48  int docLength_;
49 
50  TextLineDataList** oldListList_;
51  int contentLength_;
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:40
virtual void execute(TextDocument *document)
Executes the line data changes.
Definition: linedatalistchange.cpp:52
virtual void revert(TextDocument *doc)
Reverts the line data change.
Definition: linedatalistchange.cpp:74
int offset() const
Returns the line.
Definition: linedatalistchange.cpp:180
void setOffset(int value)
Sets the new offset.
Definition: linedatalistchange.cpp:187
virtual ~LineDataListChange()
Destructs the linedata textchange.
Definition: linedatalistchange.cpp:34
This manager manages all line definitions.
Definition: textlinedata.h:75
virtual int storedLength() const
The lengt of the content in this object.
Definition: linedatalistchange.cpp:210
TextLineDataList ** oldListList()
returns the old list list
Definition: linedatalistchange.cpp:217
int oldListListLength()
retursn the length of th eold list list
Definition: linedatalistchange.cpp:224
virtual QString toString()
Converts this change to a string.
Definition: linedatalistchange.cpp:173
Copyright 2011-2013 - Reliable Bits Software by Blommers IT.
Definition: commentcommand.cpp:22
LineDataListChange(TextLineDataManager *manager, int offset, int lenght, int newLength)
The line data text change constructor.
Definition: linedatalistchange.cpp:23
A basic change.
Definition: change.h:18
virtual bool giveAndMerge(TextDocument *document, Change *textChange)
Merges mutliple textline changes together.
Definition: linedatalistchange.cpp:160
the line data items
Definition: textlinedata.h:55
void setDocLength(int value)
This method sets the old length.
Definition: linedatalistchange.cpp:202
virtual int docLength() const
Retursn the length in the document/data.
Definition: linedatalistchange.cpp:194
This is an abstract class for ranged changes This are changes (text changes and line changes) that sp...
Definition: abstractrangedchange.h:15
virtual void mergeStoredData(AbstractRangedChange *change)
This method merges the old data with the new data change the data to merge with. ...
Definition: linedatalistchange.cpp:89
A full line data text change. This means the growing or shrinking of the line data buffer It stores t...
Definition: linedatalistchange.h:19