edbee - Qt Editor Library
|
Inserts a newline. When smarttab is enabled it also inser leading tabs/spaces. More...
#include <newlinecommand.h>
Public Types | |
enum | NewLineType { NormalNewline = 0, AddLineBefore = 1, AddLineAfter = 2 } |
Public Member Functions | |
NewlineCommand (NewLineType method) | |
Constructs the newline command. More... | |
QString | calculateSmartIndent (TextEditorController *controller, TextRange &range) |
This method calculates the required 'smart' indent value at the given positon. More... | |
virtual void | executeNormalNewline (TextEditorController *controller) |
Executes a 'normal' newline operation. More... | |
virtual void | executeSpecialNewline (TextEditorController *controller, bool nextLine) |
Executes a special newline operation. (Inserts a newline before or the current line) More... | |
virtual void | execute (TextEditorController *controller) |
Executes the insert newline command. More... | |
virtual QString | toString () |
Returns the command name. More... | |
Public Member Functions inherited from edbee::TextEditorCommand | |
TextEditorCommand () | |
The default constructor. More... | |
virtual | ~TextEditorCommand () |
A blank virtual destructor. More... | |
Inserts a newline. When smarttab is enabled it also inser leading tabs/spaces.
edbee::NewlineCommand::NewlineCommand | ( | NewlineCommand::NewLineType | method | ) |
Constructs the newline command.
metod | the method |
QString edbee::NewlineCommand::calculateSmartIndent | ( | TextEditorController * | controller, |
TextRange & | range | ||
) |
This method calculates the required 'smart' indent value at the given positon.
controller | the controller |
range | the range to calculate the smart tab for |
|
virtual |
Executes the insert newline command.
controller | the controller to execute this command for |
Implements edbee::TextEditorCommand.
|
virtual |
Executes a 'normal' newline operation.
|
virtual |
Executes a special newline operation. (Inserts a newline before or the current line)
controller | the controller to execute this operation for |
nextLine | a nextline operation |
|
virtual |
Returns the command name.
Implements edbee::TextEditorCommand.