RoseCodeEdit Class Reference

Class which extends QCodeEditWidget to support SgNode's. More...

#include <RoseCodeEdit.h>

Inheritance diagram for RoseCodeEdit:

Inheritance graph
[legend]
List of all members.

Public Slots

void setNode (SgNode *sgNode)
void gotoNode (SgNode *sgNode)
 same as setNode, for convenience with the link mechanism
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

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

Protected Member Functions

virtual void dragEnterEvent (QDragEnterEvent *ev)
virtual void dropEvent (QDropEvent *ev)
void init ()

Protected Attributes

QCodeEdit * editorWrapper
QFormatScheme * m_formats

Static Protected Attributes

static QLanguageFactory * m_languages = NULL

Detailed Description

Class which extends QCodeEditWidget to support SgNode's.

Uses node->get_file_info() to display the original source code (NOT the unparsed code) setNode() and getNode() load the file where the SgNode occures in and sets the cursor at the right position (start_of_construct)

Definition at line 18 of file RoseCodeEdit.h.


Constructor & Destructor Documentation

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

Definition at line 21 of file RoseCodeEdit.h.

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

Definition at line 22 of file RoseCodeEdit.h.

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

Definition at line 23 of file RoseCodeEdit.h.

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

Definition at line 24 of file RoseCodeEdit.h.

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

Definition at line 26 of file RoseCodeEdit.h.


Member Function Documentation

void RoseCodeEdit::dragEnterEvent ( QDragEnterEvent *  ev  )  [protected, virtual]

Definition at line 47 of file RoseCodeEdit.cpp.

Here is the call graph for this function:

void RoseCodeEdit::dropEvent ( QDropEvent *  ev  )  [protected, virtual]

Definition at line 62 of file RoseCodeEdit.cpp.

Here is the call graph for this function:

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

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

Definition at line 86 of file QCodeEditWidget.cpp.

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

Definition at line 69 of file QCodeEditWidget.cpp.

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

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

Definition at line 166 of file QCodeEditWidget.cpp.

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

Definition at line 73 of file QCodeEditWidget.h.

void RoseCodeEdit::gotoNode ( SgNode *  sgNode  )  [inline, slot]

same as setNode, for convenience with the link mechanism

Definition at line 33 of file RoseCodeEdit.h.

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

Sets the cursor in specified row and column.

Definition at line 135 of file QCodeEditWidget.cpp.

Referenced by setNode().

void QCodeEditWidget::init (  )  [protected, inherited]

Definition at line 24 of file QCodeEditWidget.cpp.

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

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 setNode().

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

Puts a breakpoint on specified line.

Definition at line 56 of file QCodeEditWidget.h.

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

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, inherited]

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, inherited]

Definition at line 116 of file QCodeEditWidget.cpp.

void RoseCodeEdit::setNode ( SgNode *  sgNode  )  [slot]

If the specified sgNode is a SgLocatedNode, the right file is opened and the cursor is set to start position of this SgNode If node is SgFile the file is opened and cursor is set to beginning of file

Definition at line 17 of file RoseCodeEdit.cpp.

Referenced by dropEvent().

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

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, inherited]

Definition at line 79 of file QCodeEditWidget.h.

Referenced by QCodeEditWidget::enableBreakPointEdit(), and QCodeEditWidget::init().

QFormatScheme* QCodeEditWidget::m_formats [protected, inherited]

Definition at line 81 of file QCodeEditWidget.h.

Referenced by QCodeEditWidget::init().

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

Definition at line 82 of file QCodeEditWidget.h.

Referenced by QCodeEditWidget::init(), and QCodeEditWidget::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