18 class DynamicVariables;
19 class TextBufferChange;
23 class TextEditorCommand;
24 class TextEditorKeyMap;
25 class TextEditorCommandMap;
26 class TextEditorComponent;
27 class TextEditorWidget;
32 class UndoableTextCommand;
62 QAction*
createUnconnectedAction(
const QString& command,
const QString& text,
const QIcon& icon=QIcon(), QObject* owner=0 );
63 QAction*
createAction(
const QString& command,
const QString& text ,
const QIcon& icon=QIcon(), QObject* owner=0 );
118 virtual void replace(
int offset,
int length,
const QString& text,
int coalesceId );
120 virtual void replaceSelection(
const QStringList& texts,
int coalesceId=0 );
125 virtual void moveCaretTo(
int line,
int col,
bool keepAnchors );
132 virtual void undo(
bool soft=
false);
133 virtual void redo(
bool soft=
false);
137 virtual void endUndoGroup(
int coalesceId,
bool flatten);
virtual AutoScrollToCaret autoScrollToCaret() const
Returns the autoScrollToCaret setting.
Definition: texteditorcontroller.cpp:176
This is the base and abstract class of a text document A TextDocument is the model part of the editor...
Definition: textdocument.h:40
virtual void addCaretAtOffset(int offset)
Adds a carert at the given offset.
Definition: texteditorcontroller.cpp:653
TextCaretCache * textCaretCache() const
Returns the textCaretCache.
Definition: texteditorcontroller.cpp:314
void notifyStateChange()
This method is called to reset the caret timer and update the ui.
Definition: texteditorcontroller.cpp:92
void giveTextSearcher(TextSearcher *searcher)
Gives the text-searcher to this document.
Definition: texteditorcontroller.cpp:322
This clas represents a text buffer change and is used to pass around between events This is a sharedd...
Definition: textbuffer.h:45
A class for rendering the text.
Definition: textrenderer.h:34
An undoable-command-group.
Definition: change.h:84
void commandExecuted(edbee::TextEditorCommand *command)
Definition: moc_texteditorcontroller.cpp:377
TextDocument * textDocument() const
Returns a reference to the textdocument.
Definition: texteditorcontroller.cpp:230
virtual void scrollCaretVisible()
This method makes sure caret 1 is vible.
Definition: texteditorcontroller.cpp:488
virtual void moveCaretTo(int line, int col, bool keepAnchors)
This method creates a command that moves the caret to the given line/column position A negative numbe...
Definition: texteditorcontroller.cpp:610
virtual void changeAndGiveTextSelection(TextRangeSet *rangeSet, int coalesceId=0)
This method changes the text selection.
Definition: texteditorcontroller.cpp:661
void setAutoScrollToCaret(AutoScrollToCaret autoScroll)
Changes the autoScrollToCaret setting.
Definition: texteditorcontroller.cpp:169
void textDocumentChanged(edbee::TextDocument *oldDocument, edbee::TextDocument *newDocument)
This signal is fired if the textdocument changes.
Definition: moc_texteditorcontroller.cpp:363
Definition: texteditorcontroller.h:45
void onLineDataChanged(int line, int length, int newLength)
The line-data is changed, we need to repaint the selected lines.
Definition: texteditorcontroller.cpp:384
This class is used for remembering/managing dynamic variables This are a kind of environment variable...
Definition: dynamicvariables.h:65
virtual void executeCommand(TextEditorCommand *textCommand)
This method executes the command.
Definition: texteditorcontroller.cpp:505
TextEditorWidget * widget() const
Returns the active widget.
Definition: texteditorcontroller.cpp:307
virtual void moveCaretToOffset(int offset, bool keepAnchors)
Moves the caret to the given offset.
Definition: texteditorcontroller.cpp:634
void setCommandMap(TextEditorCommandMap *commandMap)
set a commandmap the ownership is NOT transfered to this object. The old owned command-map is deleted...
Definition: texteditorcontroller.cpp:280
This is the abstract base class for a textcommand.
Definition: texteditorcommand.h:49
void giveTextDocument(TextDocument *doc)
sets the document and tranfers the ownership of the textdocument to this class
Definition: texteditorcontroller.cpp:109
The class textselection is a RangeSet that is used by the view of the document.
Definition: textselection.h:24
virtual ~TextEditorController()
Destroys the controller and associated objects.
Definition: texteditorcontroller.cpp:79
void setKeyMap(TextEditorKeyMap *keyMap)
sets the keymap. It will replace (and if owned, delete) the previous keymap
Definition: texteditorcontroller.cpp:252
AutoScrollToCaret
Definition: texteditorcontroller.h:42
virtual void endUndoGroup(int coalesceId, bool flatten)
Ends the undo-group.
Definition: texteditorcontroller.cpp:700
QAction * createUnconnectedAction(const QString &command, const QString &text, const QIcon &icon=QIcon(), QObject *owner=0)
This method creates an editor action that is.
Definition: texteditorcontroller.cpp:195
QAction * createAction(const QString &command, const QString &text, const QIcon &icon=QIcon(), QObject *owner=0)
Creates a QAction object that performs the given editor action The shortcut of the given editor-comma...
Definition: texteditorcontroller.cpp:219
TextEditorKeyMap * keyMap() const
Returns the current keymap.
Definition: texteditorcontroller.cpp:271
virtual void addCaretAt(int line, int col)
Adds a new caret to the selection.
Definition: texteditorcontroller.cpp:645
Copyright 2011-2013 - Reliable Bits Software by Blommers IT.
Definition: commentcommand.cpp:22
Definition: texteditorcontroller.h:43
Definition: texteditorcontroller.h:44
This is a texteditor map. This is used to map Command-Names to commands This class is the owner of th...
Definition: texteditorcommandmap.h:19
void onSelectionChanged(edbee::TextRangeSet *oldRangeSet)
the old selection has been changed
Definition: texteditorcontroller.cpp:369
virtual void redo(bool soft=false)
This method performs an redo operation. By supplying soft only controller based operations are redone...
Definition: texteditorcontroller.cpp:680
void commandToBeExecuted(edbee::TextEditorCommand *command)
this method is executed when a command is going to be executed
Definition: moc_texteditorcontroller.cpp:370
void giveCommandMap(TextEditorCommandMap *commandMap)
gives a commandmap to the editor The old associated command map is deleted
Definition: texteditorcontroller.cpp:291
A text editor key map This key map, maps key-sequences to action-names.
Definition: texteditorkeymap.h:39
A special cache. For remembering the x-coordinates of the carets.
Definition: textcaretcache.h:19
TextSearcher * textSearcher()
Returnst the associated text searcher object.
Definition: texteditorcontroller.cpp:331
virtual void undo(bool soft=false)
This method performs an undo operation. By supplying soft only controller based operations are undone...
Definition: texteditorcontroller.cpp:671
The texteditor works via the controller. The controller is the central point/mediater which maps/cont...
Definition: texteditorcontroller.h:37
virtual void storeSelection(int coalesceId=0)
This method adds a textchange on the stack that simply stores the current text-selection.
Definition: texteditorcontroller.cpp:496
TextSelection * textSelection() const
Returns the textselection.
Definition: texteditorcontroller.cpp:237
void setTextDocument(TextDocument *doc)
Set the text document.
Definition: texteditorcontroller.cpp:120
void onTextChanged(edbee::TextBufferChange change)
This slot is placed if a piece of text is replaced.
Definition: texteditorcontroller.cpp:352
The basic textrange class. A simple class of textrange with a simple vector implementation.
Definition: textrange.h:198
virtual void beginUndoGroup(ChangeGroup *group)
Starts an undo group.
Definition: texteditorcontroller.cpp:689
virtual void scrollPositionVisible(int xPos, int yPos)
Asserts the view shows the given position.
Definition: texteditorcontroller.cpp:471
void updateAfterConfigChange()
This method is used to update the component when the configuration has been changed. This is a temporary solution, perhaps we should make TextConfig signal changes A lot of changes don't require an updates, but some do.
Definition: texteditorcontroller.cpp:395
virtual void replaceRangeSet(TextRangeSet &rangeSet, const QString &text, int coalesceId=0)
Replaces the given rangeset with the given text.
Definition: texteditorcontroller.cpp:581
DynamicVariables * dynamicVariables() const
this method returns the dynamic variables object for this controller The current implementation simpl...
Definition: texteditorcontroller.cpp:340
TextEditorCommandMap * commandMap() const
Returns the current commandmap.
Definition: texteditorcontroller.cpp:300
TextEditorController(TextEditorWidget *widget=0, QObject *parent=0)
The constructor.
Definition: texteditorcontroller.cpp:46
This is the general edbee widget This core functionality of this widget is divided in several seperat...
Definition: texteditorwidget.h:32
TextRenderer * textRenderer() const
Returns the current text renderer.
Definition: texteditorcontroller.cpp:244
The text searcher is a class to remember the current search operation It remembers the current search...
Definition: textsearcher.h:23
virtual void scrollOffsetVisible(int offset)
Assets the view shows the given offset.
Definition: texteditorcontroller.cpp:478
virtual void replace(int offset, int length, const QString &text, int coalesceId)
replaces the given text (single ranges)
Definition: texteditorcontroller.cpp:550
virtual void replaceSelection(const QString &text, int coalesceId=0)
This method replaces the selection with the given text.
Definition: texteditorcontroller.cpp:562
bool hasFocus()
This method return true if the text-editor has focus.
Definition: texteditorcontroller.cpp:183
void updateStatusTextSignal(const QString &text)
This signal is fired if the statusbar needs updating.
Definition: moc_texteditorcontroller.cpp:356
virtual void updateStatusText(const QString &extraText="")
This method updates the status text. This is the text as displayed in the lower status bar...
Definition: texteditorcontroller.cpp:410
void giveKeyMap(TextEditorKeyMap *keyMap)
gives a keymap to the editor. The ownership is transfered to this controller
Definition: texteditorcontroller.cpp:262
virtual void update()
updates the main widget
Definition: texteditorcontroller.cpp:462