NodeInfoWidget Class Reference

Shows information about an SgNode (similar to pdf generator). More...

#include <NodeInfoWidget.h>

Inheritance diagram for NodeInfoWidget:

Inheritance graph
[legend]
List of all members.

Public Slots

void setNode (SgNode *node)
void gotoNode (SgNode *node)

Public Member Functions

 NodeInfoWidget (QWidget *parent=0)
virtual ~NodeInfoWidget ()
int addSection (const QString &sectionName, const QColor &bgColor, const QColor &altBgColor)
int addSection (const QString &sectionName, int colorNr=-1)
QModelIndex addEntryToSection (int sectionId, const QString &property, const QVariant &value)
QModelIndex addEntry (const QModelIndex &parent, const QString &property, const QVariant &value)
void clear ()
 Removes all sections and entries.

Protected Member Functions

virtual void dragEnterEvent (QDragEnterEvent *ev)
virtual void dragMoveEvent (QDragMoveEvent *ev)
virtual void dropEvent (QDropEvent *ev)
virtual void mousePressEvent (QMouseEvent *event)
virtual void mouseMoveEvent (QMouseEvent *event)
void printDeclModifier (const QModelIndex &par, const SgDeclarationModifier &declMod)
void printFuncModifier (const QModelIndex &par, const SgFunctionModifier &funcMod)
void printSpecialFuncModifier (const QModelIndex &par, const SgSpecialFunctionModifier &funcMod)
QString getTraversalName (SgNode *node)
virtual void drawRow (QPainter *p, const QStyleOptionViewItem &viewItem, const QModelIndex &index) const

Protected Attributes

SgNode * curNode
QPoint dragStartPosition
 position of mouseclick, used for d&d functions
QList< QPair< QColor, QColor > > colors
PropertyTreeModelmodel
QVector< QPair< QColor, QColor > > predefColors

Detailed Description

Shows information about an SgNode (similar to pdf generator).

NodeInfoWidget.jpg

Shows following information about an SgNode:

Usage: just call setNode()

Definition at line 24 of file NodeInfoWidget.h.


Constructor & Destructor Documentation

NodeInfoWidget::NodeInfoWidget ( QWidget *  parent = 0  ) 

Definition at line 11 of file NodeInfoWidget.cpp.

NodeInfoWidget::~NodeInfoWidget (  )  [virtual]

Definition at line 18 of file NodeInfoWidget.cpp.


Member Function Documentation

QModelIndex PropertyTreeWidget::addEntry ( const QModelIndex &  parent,
const QString &  property,
const QVariant &  value 
) [inherited]

This method can be used to have a tree structure of prop-value pairs

Parameters:
parent the return value of a previous addEntry() or addEntryToSection()
property String of the property
value value as an QVariant

Definition at line 84 of file PropertyTreeWidget.cpp.

Referenced by printDeclModifier(), printFuncModifier(), printSpecialFuncModifier(), and setNode().

Here is the call graph for this function:

Here is the caller graph for this function:

QModelIndex PropertyTreeWidget::addEntryToSection ( int  sectionId,
const QString &  property,
const QVariant &  value 
) [inherited]

Adds a Property-Value pair to a section

Parameters:
sectionId the return value of addSection()
property String of the property
value value as an QVariant
Returns:
modelIndex of the Prop-value pair

Definition at line 74 of file PropertyTreeWidget.cpp.

Referenced by setNode().

Here is the call graph for this function:

int PropertyTreeWidget::addSection ( const QString &  sectionName,
int  colorNr = -1 
) [inherited]

Adds a new section

Parameters:
sectionName Title of sections
colorNr which color to use, there are 6 different predefined colors, use 0 to 6 if parameter is negative (default) the next "free" color is used

Definition at line 60 of file PropertyTreeWidget.cpp.

Here is the call graph for this function:

int PropertyTreeWidget::addSection ( const QString &  sectionName,
const QColor &  bgColor,
const QColor &  altBgColor 
) [inherited]

Each section has a Background-Col and an alternating Bg-color which is used when alternatingRowColors=true

Definition at line 50 of file PropertyTreeWidget.cpp.

Referenced by setNode().

Here is the call graph for this function:

void PropertyTreeWidget::clear (  )  [inherited]

Removes all sections and entries.

Definition at line 119 of file PropertyTreeWidget.cpp.

Referenced by setNode().

Here is the call graph for this function:

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

Definition at line 349 of file NodeInfoWidget.cpp.

void NodeInfoWidget::dragMoveEvent ( QDragMoveEvent *  ev  )  [protected, virtual]

Definition at line 358 of file NodeInfoWidget.cpp.

void PropertyTreeWidget::drawRow ( QPainter *  p,
const QStyleOptionViewItem &  viewItem,
const QModelIndex &  index 
) const [protected, virtual, inherited]

Definition at line 94 of file PropertyTreeWidget.cpp.

Here is the call graph for this function:

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

Definition at line 364 of file NodeInfoWidget.cpp.

QString NodeInfoWidget::getTraversalName ( SgNode *  node  )  [protected]

Definition at line 60 of file NodeInfoWidget.cpp.

Referenced by setNode().

void NodeInfoWidget::gotoNode ( SgNode *  node  )  [inline, slot]

Definition at line 34 of file NodeInfoWidget.h.

void NodeInfoWidget::mouseMoveEvent ( QMouseEvent *  event  )  [protected, virtual]

Definition at line 324 of file NodeInfoWidget.cpp.

void NodeInfoWidget::mousePressEvent ( QMouseEvent *  event  )  [protected, virtual]

Definition at line 316 of file NodeInfoWidget.cpp.

void NodeInfoWidget::printDeclModifier ( const QModelIndex &  par,
const SgDeclarationModifier &  declMod 
) [protected]

Definition at line 23 of file NodeInfoWidget.cpp.

Referenced by setNode().

Here is the call graph for this function:

void NodeInfoWidget::printFuncModifier ( const QModelIndex &  par,
const SgFunctionModifier &  funcMod 
) [protected]

Definition at line 34 of file NodeInfoWidget.cpp.

Referenced by setNode().

Here is the call graph for this function:

void NodeInfoWidget::printSpecialFuncModifier ( const QModelIndex &  par,
const SgSpecialFunctionModifier &  funcMod 
) [protected]

Definition at line 46 of file NodeInfoWidget.cpp.

Referenced by setNode().

Here is the call graph for this function:

void NodeInfoWidget::setNode ( SgNode *  node  )  [slot]

Definition at line 84 of file NodeInfoWidget.cpp.

Referenced by dropEvent(), and gotoNode().


Member Data Documentation

QList<QPair<QColor,QColor> > PropertyTreeWidget::colors [protected, inherited]

Definition at line 70 of file PropertyTreeWidget.h.

Referenced by PropertyTreeWidget::addSection(), PropertyTreeWidget::clear(), and PropertyTreeWidget::drawRow().

SgNode* NodeInfoWidget::curNode [protected]

Definition at line 38 of file NodeInfoWidget.h.

Referenced by mouseMoveEvent(), and setNode().

QPoint NodeInfoWidget::dragStartPosition [protected]

position of mouseclick, used for d&d functions

Definition at line 46 of file NodeInfoWidget.h.

Referenced by mouseMoveEvent(), and mousePressEvent().

PropertyTreeModel* PropertyTreeWidget::model [protected, inherited]

Definition at line 72 of file PropertyTreeWidget.h.

Referenced by PropertyTreeWidget::addEntry(), PropertyTreeWidget::addEntryToSection(), PropertyTreeWidget::addSection(), PropertyTreeWidget::clear(), PropertyTreeWidget::drawRow(), and PropertyTreeWidget::PropertyTreeWidget().

QVector<QPair<QColor,QColor> > PropertyTreeWidget::predefColors [protected, inherited]

Definition at line 75 of file PropertyTreeWidget.h.

Referenced by PropertyTreeWidget::addSection(), and PropertyTreeWidget::PropertyTreeWidget().


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