Gui::PythonEditor Class Reference

Python text editor with syntax highlighting. More...

#include <PythonEditor.h>

Inheritance diagram for Gui::PythonEditor:
Gui::TextEditor Gui::TextEdit Gui::WindowParameter

List of all members.

Public Slots

void onComment ()
 Inserts a '#' at the beginning of each selected line or the current line if nothing is selected.
void onUncomment ()
 Removes the leading '#' from each selected line or the current line if nothing is selected.

Public Member Functions

 PythonEditor (QWidget *parent=0)
 Constructs a PythonEditor which is a child of 'parent' and does the syntax highlighting for the Python language.
 ~PythonEditor ()
 Destroys the object and frees any allocated resources.

Protected Member Functions

void contextMenuEvent (QContextMenuEvent *e)
 Pops up the context menu with some extensions.
void drawMarker (int line, int x, int y, QPainter *)

Detailed Description

Python text editor with syntax highlighting.

Author:
Werner Mayer

Definition at line 40 of file PythonEditor.h.


Constructor & Destructor Documentation

PythonEditor::PythonEditor ( QWidget *  parent = 0  ) 

Constructs a PythonEditor which is a child of 'parent' and does the syntax highlighting for the Python language.

Definition at line 75 of file PythonEditor.cpp.

References draftlibs::fcgeo::connect(), onComment(), onUncomment(), and Gui::TextEditor::setSyntaxHighlighter().

PythonEditor::~PythonEditor (  ) 

Destroys the object and frees any allocated resources.

Definition at line 95 of file PythonEditor.cpp.

References Gui::WindowParameter::getWindowParameter().


Member Function Documentation

void PythonEditor::contextMenuEvent ( QContextMenuEvent *  e  )  [protected]

Pops up the context menu with some extensions.

Definition at line 115 of file PythonEditor.cpp.

References onComment(), and onUncomment().

void PythonEditor::drawMarker ( int  line,
int  x,
int  y,
QPainter *  p 
) [protected, virtual]

Reimplemented from Gui::TextEditor.

Definition at line 101 of file PythonEditor.cpp.

References Gui::Breakpoint::checkLine().

void PythonEditor::onComment (  )  [slot]

Inserts a '#' at the beginning of each selected line or the current line if nothing is selected.

Definition at line 126 of file PythonEditor.cpp.

References RobotExample::pos.

Referenced by contextMenuEvent(), and PythonEditor().

void PythonEditor::onUncomment (  )  [slot]

Removes the leading '#' from each selected line or the current line if nothing is selected.

In case a line hasn't a leading '#' then this line is skipped.

Definition at line 149 of file PythonEditor.cpp.

References RobotExample::pos.

Referenced by contextMenuEvent(), and PythonEditor().


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

Generated on Wed Nov 23 19:02:01 2011 for FreeCAD by  doxygen 1.6.1