edbee - Qt Editor Library v0.11.1
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
edbee::ReplaceSelectionCommand Class Reference

This command can be used to replace the current selection with a given text. More...

#include <replaceselectioncommand.h>

+ Inheritance diagram for edbee::ReplaceSelectionCommand:
+ Collaboration diagram for edbee::ReplaceSelectionCommand:

Public Member Functions

 ReplaceSelectionCommand (const QString &text, int caolesceId)
 The constructor of the replaceSelection command.
 
virtual int commandId ()
 
virtual void execute (TextEditorController *controller) override
 Executes the replace selection command.
 
virtual QString toString () override
 Converts the current command to a string.
 
- Public Member Functions inherited from edbee::TextEditorCommand
 TextEditorCommand ()
 The default constructor.
 
virtual ~TextEditorCommand ()
 A blank virtual destructor.
 
virtual bool readonly ()
 Tis method should return true if it's executable in readonly mode.
 

Detailed Description

This command can be used to replace the current selection with a given text.

Constructor & Destructor Documentation

◆ ReplaceSelectionCommand()

edbee::ReplaceSelectionCommand::ReplaceSelectionCommand ( const QString & text,
int coalesceId )

The constructor of the replaceSelection command.

Parameters
textthe text to replace
coalesceIdthe coalesceId top merge undo operations

Member Function Documentation

◆ commandId()

virtual int edbee::ReplaceSelectionCommand::commandId ( )
inlinevirtual

◆ execute()

void edbee::ReplaceSelectionCommand::execute ( TextEditorController * controller)
overridevirtual

Executes the replace selection command.

Parameters
controllerthe controller context this command runs ons

Implements edbee::TextEditorCommand.

◆ toString()

QString edbee::ReplaceSelectionCommand::toString ( )
overridevirtual

Converts the current command to a string.

Implements edbee::TextEditorCommand.


The documentation for this class was generated from the following files: