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

For inserting/executing forward and backwards tabs. More...

#include <tabcommand.h>

+ Inheritance diagram for edbee::TabCommand:
+ Collaboration diagram for edbee::TabCommand:

Public Types

enum  Direction { Forward , Backward }
 The possible directions of the tab command. More...
 
enum  { SubCoalesceId_Indent_Forward = Forward , SubCoalesceId_Indent_Backward = Backward , SubCoalesceId_Indent_InsertTab , SubCoalesceId_Indent_InsertSpaces }
 Extra possible coalesce (sub-ids) More...
 

Public Member Functions

 TabCommand (Direction direction, bool insertTab)
 Constructs the tabcommand.
 
virtual void indent (TextEditorController *controller)
 indents or outdents in the given controller @parma controller the controller
 
virtual void execute (TextEditorController *controller) override
 
virtual QString toString () override
 Returs the name of this command.
 
- 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

For inserting/executing forward and backwards tabs.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Extra possible coalesce (sub-ids)

Enumerator
SubCoalesceId_Indent_Forward 
SubCoalesceId_Indent_Backward 
SubCoalesceId_Indent_InsertTab 
SubCoalesceId_Indent_InsertSpaces 

◆ Direction

The possible directions of the tab command.

Enumerator
Forward 
Backward 

Constructor & Destructor Documentation

◆ TabCommand()

edbee::TabCommand::TabCommand ( TabCommand::Direction direction,
bool insertTab )

Constructs the tabcommand.

Parameters
directionthe direction of the tab (Forward or Backward)
insertTabshould we use a tab character?

Member Function Documentation

◆ execute()

void edbee::TabCommand::execute ( TextEditorController * controller)
overridevirtual
Todo
: Refactor :)

Implements edbee::TextEditorCommand.

◆ indent()

void edbee::TabCommand::indent ( TextEditorController * controller)
virtual

indents or outdents in the given controller @parma controller the controller

◆ toString()

QString edbee::TabCommand::toString ( )
overridevirtual

Returs the name of this command.

Implements edbee::TextEditorCommand.


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