edbee - Qt Editor Library
texteditorcommand.h
Go to the documentation of this file.
1 
6 #pragma once
7 
8 #include <QString>
9 
10 namespace edbee {
11 
12 class TextEditorController;
13 
20 enum CoalesceId {
23 
25 
28 
29  CoalesceId_Remove = 4 << 16,
30 
32  CoalesceId_Indent = 7 << 16,
33  CoalesceId_CutLine = 8 << 16,
34  CoalesceId_Paste = 9 << 16,
36 
38 };
39 
40 
41 
50 {
51 public:
53  virtual ~TextEditorCommand();
54 
56  virtual void execute( TextEditorController* controller ) = 0;
57 
59  virtual QString toString() = 0;
60 };
61 
62 } // edbee
virtual void execute(TextEditorController *controller)=0
This method should execute the given command.
virtual QString toString()=0
should return the description of the command
A textchange.
Definition: texteditorcommand.h:26
Definition: texteditorcommand.h:37
This is the abstract base class for a textcommand.
Definition: texteditorcommand.h:49
Selection coalescing (we use 2 bytes for sub-types)
Definition: texteditorcommand.h:24
Removing of text.
Definition: texteditorcommand.h:29
Definition: texteditorcommand.h:31
Copyright 2011-2013 - Reliable Bits Software by Blommers IT.
Definition: commentcommand.cpp:22
TextEditorCommand()
The default constructor.
Definition: texteditorcommand.cpp:14
CoalesceId
Predefined coalesce/command ids.
Definition: texteditorcommand.h:20
Definition: texteditorcommand.h:34
The texteditor works via the controller. The controller is the central point/mediater which maps/cont...
Definition: texteditorcontroller.h:37
FORCE coalescing.
Definition: texteditorcommand.h:21
Definition: texteditorcommand.h:35
Definition: texteditorcommand.h:32
Definition: texteditorcommand.h:33
NO coalescing.
Definition: texteditorcommand.h:22
Appending of a character.
Definition: texteditorcommand.h:27
virtual ~TextEditorCommand()
A blank virtual destructor.
Definition: texteditorcommand.cpp:20