14 class TextEditorController;
92 virtual bool isDiscardable();
93 virtual void groupClosed();
99 virtual void flatten();
102 virtual Change* at(
int idx ) = 0;
103 virtual Change* take(
int idx ) = 0;
104 virtual int size() = 0;
105 virtual void clear(
bool performDelete=
true) = 0;
115 QList<Change*> changeList_;
This is the base and abstract class of a text document A TextDocument is the model part of the editor...
Definition: textdocument.h:40
A textdocument change.
Definition: change.h:44
virtual TextEditorController * controllerContext()
A text command can belong to a controller/view When it's a view only command. The undo only applies o...
Definition: change.cpp:60
An undoable-command-group.
Definition: change.h:84
virtual QString toString()=0
virtual bool canUndo()
This method should return true if the change can be reverted.
Definition: change.cpp:42
virtual bool giveAndMerge(TextDocument *document, Change *textChange)
Gives the change and merges it if possible. This method should return false if the change couldn't be...
Definition: change.cpp:33
virtual void execute(TextDocument *document)=0
This method should execute the command.
Copyright 2011-2013 - Reliable Bits Software by Blommers IT.
Definition: commentcommand.cpp:22
a document text-change that doesn't do anyhting :-)
Definition: change.h:54
virtual void revert(TextDocument *)
this method reverts the given operation
Definition: change.cpp:22
bool isDocumentChange()
this method can be used to check if the given change is a document change
Definition: change.cpp:67
A basic change.
Definition: change.h:18
The texteditor works via the controller. The controller is the central point/mediater which maps/cont...
Definition: texteditorcontroller.h:37
A textcontroller command. This can ALSO be a document command.
Definition: change.h:68
virtual bool isPersistenceRequired()
This flag is used to mark this stack item as non-persistence requirable The default behaviour is that...
Definition: change.cpp:51
virtual ~Change()
a virtual empty destructor
Definition: change.cpp:16
virtual bool isGroup()
This method returns true if this change is a group change. When an object is group change it should b...
Definition: change.cpp:75