edbee - Qt Editor Library
replaceselectioncommand.h
Go to the documentation of this file.
1 
6 #pragma once
7 
9 
10 namespace edbee {
11 
14 {
15 public:
16  ReplaceSelectionCommand( const QString& text, int caolesceId );
17 
18  virtual int commandId() { return coalesceId_; }
19 
20  virtual void execute( TextEditorController* controller );
21  virtual QString toString();
22 
23 private:
24  QString text_;
25  int coalesceId_;
26 
27 };
28 
29 } // edbee
This is the abstract base class for a textcommand.
Definition: texteditorcommand.h:49
Copyright 2011-2013 - Reliable Bits Software by Blommers IT.
Definition: commentcommand.cpp:22
virtual void execute(TextEditorController *controller)
Executes the replace selection command.
Definition: replaceselectioncommand.cpp:27
ReplaceSelectionCommand(const QString &text, int caolesceId)
The constructor of the replaceSelection command.
Definition: replaceselectioncommand.cpp:18
The texteditor works via the controller. The controller is the central point/mediater which maps/cont...
Definition: texteditorcontroller.h:37
virtual QString toString()
Converts the current command to a string.
Definition: replaceselectioncommand.cpp:34
This command can be used to replace the current selection with a given text.
Definition: replaceselectioncommand.h:13
virtual int commandId()
Definition: replaceselectioncommand.h:18