edbee - Qt Editor Library v0.11.1
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
texteditorcommand.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
10namespace edbee {
11
13
40
41
42
51public:
53 virtual ~TextEditorCommand();
54
56 virtual void execute( TextEditorController* controller ) = 0;
57
59 virtual QString toString() = 0;
60
62 virtual bool readonly();
63};
64
65} // edbee
virtual QString toString()=0
should return the description of the command
virtual void execute(TextEditorController *controller)=0
This method should execute the given command.
TextEditorCommand()
The default constructor.
Definition texteditorcommand.cpp:12
virtual bool readonly()
Tis method should return true if it's executable in readonly mode.
Definition texteditorcommand.cpp:23
The texteditor works via the controller. The controller is the central point/mediator which maps/cont...
Definition texteditorcontroller.h:39
#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
CoalesceId
Predefined coalesce/command ids.
Definition texteditorcommand.h:20
@ CoalesceId_InsertNewLine
Definition texteditorcommand.h:31
@ CoalesceId_Indent
Definition texteditorcommand.h:32
@ CoalesceId_MoveLine
Definition texteditorcommand.h:36
@ CoalesceId_Duplicate
Definition texteditorcommand.h:35
@ CoalesceId_None
NO coalescing.
Definition texteditorcommand.h:22
@ CoalesceId_Remove
Removing of text.
Definition texteditorcommand.h:29
@ CoalesceId_ForceMerge
FORCE coalescing.
Definition texteditorcommand.h:21
@ CoalesceId_CutLine
Definition texteditorcommand.h:33
@ CoalesceId_Selection
Selection coalescing (we use 2 bytes for sub-types)
Definition texteditorcommand.h:24
@ CoalesceId_AppendChar
Appending of a character.
Definition texteditorcommand.h:27
@ CoalesceId_Paste
Definition texteditorcommand.h:34
@ CoalesceId_TextChanges
A textchange.
Definition texteditorcommand.h:26
@ CoalesceId_UserDefined
Definition texteditorcommand.h:38