umbrello/umbrello
#include <codeeditor.h>
Public Slots | |
void | changeHighlighting (int signal) |
void | changeShowHidden (int signal) |
void | insertParagraph (const QString &text, int para) |
void | removeParagraph (int para) |
void | slotRedrawText () |
Public Member Functions | |
CodeEditor (const QString &text, CodeViewerDialog *parent=0, CodeDocument *doc=0) | |
CodeEditor (CodeViewerDialog *parent=0, CodeDocument *doc=0) | |
~CodeEditor () | |
Settings::CodeViewerState | state () |
Protected Slots | |
void | slotChangeSelectedBlockCommentView () |
void | slotChangeSelectedBlockView () |
void | slotCopyTextBlock () |
void | slotCursorPositionChanged () |
void | slotCutTextBlock () |
void | slotInsertCodeBlockAfterSelected () |
void | slotInsertCodeBlockBeforeSelected () |
void | slotPasteTextBlock () |
Protected Member Functions | |
void | appendText (TextBlock *tblock) |
void | appendText (HierarchicalCodeBlock *hblock) |
void | appendText (CodeClassFieldDeclarationBlock *db) |
void | appendText (TextBlockList *items) |
void | appendText (CodeMethodBlock *mb) |
void | appendText (CodeComment *comment, TextBlock *parent, UMLObject *umlObj=0, const QString &compName="") |
void | appendText (CodeBlockWithComments *cb) |
bool | close () |
void | contentsMouseMoveEvent (QMouseEvent *e) |
void | contextMenuEvent (QContextMenuEvent *event) |
KMenu * | createPopup () |
void | keyPressEvent (QKeyEvent *e) |
void | loadFromDocument () |
void | mouseDoubleClickEvent (QMouseEvent *e) |
void | rebuildView (int startCursorPos) |
Detailed Description
Definition at line 66 of file codeeditor.h.
Constructor & Destructor Documentation
|
explicit |
Constructor.
Definition at line 60 of file codeeditor.cpp.
|
explicit |
Constructor.
Definition at line 69 of file codeeditor.cpp.
CodeEditor::~CodeEditor | ( | ) |
Destructor.
Definition at line 78 of file codeeditor.cpp.
Member Function Documentation
|
protected |
Appends a TextBlock to the widget.
- Parameters
-
tb the text block to add
Definition at line 585 of file codeeditor.cpp.
|
protected |
Appends a HierarchicalCodeBlock to the widget.
- Parameters
-
hblock the hierarchical code block to add
Definition at line 603 of file codeeditor.cpp.
|
protected |
Appends a CodeClassFieldDeclarationBlock to the widget.
- Parameters
-
db the code class field declaration block to add
Definition at line 482 of file codeeditor.cpp.
|
protected |
Appends a TextBlockList to the widget.
- Parameters
-
items list of TextBlock items
Definition at line 397 of file codeeditor.cpp.
|
protected |
Appends a CodeMethodBlock to the widget.
- Parameters
-
mb the code method block to add
Definition at line 520 of file codeeditor.cpp.
|
protected |
Appends a CodeComment to the widget.
- Parameters
-
comment the code comment to add parent the parent text block umlObj the UML object componentName the name of the component
Definition at line 437 of file codeeditor.cpp.
|
protected |
Appends a CodeBlockWithComments to the widget.
- Parameters
-
cb the code block to add
Definition at line 457 of file codeeditor.cpp.
|
slot |
Colorizes/uncolorizes type for ALL paragraphs.
Definition at line 1346 of file codeeditor.cpp.
|
slot |
:TODO:
Definition at line 1333 of file codeeditor.cpp.
|
protected |
Slot which closes this widget.
Returns true if the widget was closed; otherwise returns false. Reimplemented from QWidget.
- Returns
- state of close action
Definition at line 145 of file codeeditor.cpp.
|
protected |
Override the QT event so we can do appropriate things.
Definition at line 1460 of file codeeditor.cpp.
|
protected |
Shows the context menu.
Reimplemented from QWidget::contextMenuEvent().
Definition at line 765 of file codeeditor.cpp.
|
protected |
|
slot |
Insert a paragraph at a given position.
- Parameters
-
text the paragraph text para the position where to add the text
Definition at line 653 of file codeeditor.cpp.
|
protected |
Implemented so we may capture certain key presses, namely backspace and 'return' events.
Definition at line 227 of file codeeditor.cpp.
|
protected |
(Re) Load the parent code document into the editor.
Definition at line 244 of file codeeditor.cpp.
|
protected |
Override the QT event so we can do appropriate things.
Definition at line 1436 of file codeeditor.cpp.
|
protected |
Rebuild our view of the document.
Happens whenever we change some field/aspect of an underlying UML object used to create the view. If connections are right, then the UMLObject will send out the modified() signal which will trigger a call to re-generate the appropriate code within the code document. Our burden is to appropriately prepare the tool: we clear out ALL the textblocks in the KTextEdit widget and then re-show them after the dialog disappears.
Definition at line 1505 of file codeeditor.cpp.
|
slot |
Remove a paragraph from a given position.
- Parameters
-
para the position from where to remove the text
Definition at line 663 of file codeeditor.cpp.
|
protectedslot |
Change the status of the comment writeOutText value to opposite of current value.
Definition at line 705 of file codeeditor.cpp.
|
protectedslot |
Slot to change the view of the selected block.
This is called from a popup menu item.
Definition at line 692 of file codeeditor.cpp.
|
protectedslot |
Slot to copy a text block.
Definition at line 867 of file codeeditor.cpp.
|
protectedslot |
Slot for cursor position changed signal.
Definition at line 1047 of file codeeditor.cpp.
|
protectedslot |
Slot to cut a text block.
Definition at line 889 of file codeeditor.cpp.
|
protectedslot |
Slot to insert a code block after the selection.
Definition at line 741 of file codeeditor.cpp.
|
protectedslot |
Slot to insert a code block before the selection.
Definition at line 721 of file codeeditor.cpp.
|
protectedslot |
Slot to paste a text block.
Definition at line 914 of file codeeditor.cpp.
|
slot |
Slot to redraw the text.
Definition at line 926 of file codeeditor.cpp.
Settings::CodeViewerState CodeEditor::state | ( | ) |
Return code viewer state.
- Returns
- state of the code viewer
Definition at line 103 of file codeeditor.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:06:01 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.