QCodeEditWidget Class Reference

C++ Editor Widget, using QCodeEdit ( http://qcodeedit.edyuk.org ). More...

#include <QCodeEditWidget.h>

Inheritance diagram for QCodeEditWidget:

Inheritance graph
[legend]
List of all members.

Public Slots

void loadCppFile (const QString &filename)
void gotoPosition (int row, int col)
 Sets the cursor in specified row and column.
void markAsError (int line)
 Marks a line as an error (red background and error icon in linemarkpanel).
void markAsWarning (int line)
 Marks a line as a warning (yellow background and exlamation-mark icon in linemarkpanel).
void markAsBreakpoint (int line)
 Puts a breakpoint on specified line.
void markLine (const QString &markStrId, int line)
static void showEditorSettingsDialog ()
 Displays a settings dialog, where font, tabsize etc can be changed.
static QAction * getDisabledActions (const QString &name)
 Returns actions which can be displayed when no editor is active.
void enableBreakPointEdit (bool enable=true)
 Switches breakpoint editing on/off (default: off).
QList< int > getBreakPoints ()
QCodeEdit * getQCodeEdit ()

Public Member Functions

 QCodeEditWidget (QWidget *p=0)
 QCodeEditWidget (bool actions, QWidget *p=0)
 QCodeEditWidget (const QString &s, QWidget *p=0)
 QCodeEditWidget (const QString &s, bool actions, QWidget *p=0)
virtual ~QCodeEditWidget ()

Protected Member Functions

void init ()

Protected Attributes

QCodeEdit * editorWrapper
QFormatScheme * m_formats

Static Protected Attributes

static QLanguageFactory * m_languages = NULL

Detailed Description

C++ Editor Widget, using QCodeEdit ( http://qcodeedit.edyuk.org ).

QCodeEditWidget.jpg

This is just a small wrapper around QEditor, and added some convenience functions for detailed description look at documentation of QEditor

It has some convenience function for marking errors and warnings, breakpoint-edit and loading of c++ files It also creates a QCodeEdit wrapper for the editor to show the line-mark and line-number panels

for a ROSE specific version see RoseCodeEdit

Definition at line 26 of file QCodeEditWidget.h.


Constructor & Destructor Documentation

QCodeEditWidget::QCodeEditWidget ( QWidget *  p = 0  )  [inline]

Definition at line 30 of file QCodeEditWidget.h.

QCodeEditWidget::QCodeEditWidget ( bool  actions,
QWidget *  p = 0 
) [inline]

Definition at line 31 of file QCodeEditWidget.h.

QCodeEditWidget::QCodeEditWidget ( const QString &  s,
QWidget *  p = 0 
) [inline]

Definition at line 32 of file QCodeEditWidget.h.

QCodeEditWidget::QCodeEditWidget ( const QString &  s,
bool  actions,
QWidget *  p = 0 
) [inline]

Definition at line 33 of file QCodeEditWidget.h.

virtual QCodeEditWidget::~QCodeEditWidget (  )  [inline, virtual]

Definition at line 36 of file QCodeEditWidget.h.


Member Function Documentation

void QCodeEditWidget::enableBreakPointEdit ( bool  enable = true  )  [slot]

Switches breakpoint editing on/off (default: off).

Definition at line 86 of file QCodeEditWidget.cpp.

QList< int > QCodeEditWidget::getBreakPoints (  )  [slot]

Definition at line 69 of file QCodeEditWidget.cpp.

QAction * QCodeEditWidget::getDisabledActions ( const QString &  name  )  [static, slot]

Returns actions which can be displayed when no editor is active.

Definition at line 166 of file QCodeEditWidget.cpp.

QCodeEdit* QCodeEditWidget::getQCodeEdit (  )  [inline, slot]

Definition at line 73 of file QCodeEditWidget.h.

void QCodeEditWidget::gotoPosition ( int  row,
int  col 
) [slot]

Sets the cursor in specified row and column.

Definition at line 135 of file QCodeEditWidget.cpp.

Referenced by RoseCodeEdit::setNode().

void QCodeEditWidget::init (  )  [protected]

Definition at line 24 of file QCodeEditWidget.cpp.

void QCodeEditWidget::loadCppFile ( const QString &  filename  )  [slot]

Loads a file and forces C++ code highlighting (independent from file ending) if automatic detection of language is needed (based on filename-ending) use QEditor::load()

Definition at line 128 of file QCodeEditWidget.cpp.

Referenced by RoseCodeEdit::setNode().

void QCodeEditWidget::markAsBreakpoint ( int  line  )  [inline, slot]

Puts a breakpoint on specified line.

Definition at line 56 of file QCodeEditWidget.h.

void QCodeEditWidget::markAsError ( int  line  )  [inline, slot]

Marks a line as an error (red background and error icon in linemarkpanel).

Definition at line 50 of file QCodeEditWidget.h.

void QCodeEditWidget::markAsWarning ( int  line  )  [inline, slot]

Marks a line as a warning (yellow background and exlamation-mark icon in linemarkpanel).

Definition at line 53 of file QCodeEditWidget.h.

void QCodeEditWidget::markLine ( const QString &  markStrId,
int  line 
) [slot]

Definition at line 116 of file QCodeEditWidget.cpp.

void QCodeEditWidget::showEditorSettingsDialog (  )  [static, slot]

Displays a settings dialog, where font, tabsize etc can be changed.

Definition at line 142 of file QCodeEditWidget.cpp.


Member Data Documentation

QCodeEdit* QCodeEditWidget::editorWrapper [protected]

Definition at line 79 of file QCodeEditWidget.h.

Referenced by enableBreakPointEdit(), and init().

QFormatScheme* QCodeEditWidget::m_formats [protected]

Definition at line 81 of file QCodeEditWidget.h.

Referenced by init().

QLanguageFactory * QCodeEditWidget::m_languages = NULL [static, protected]

Definition at line 82 of file QCodeEditWidget.h.

Referenced by init(), and loadCppFile().


The documentation for this class was generated from the following files:
Generated on Tue Sep 15 14:48:50 2009 for RoseQtWidgets by  doxygen 1.4.7