RoseGraphicsView Class Reference

GraphicsView which can display trees or graphs. More...

#include <RoseGraphicsView.h>

Inheritance diagram for RoseGraphicsView:

Inheritance graph
[legend]
List of all members.

Public Slots

void setNode (SgNode *sgNode)
void gotoNode (SgNode *sgNode)
void setFilter (AstFilterInterface *filter)
void setFileFilter (int id)

Signals

void nodeActivated (SgNode *node)
void nodeActivatedAlt (SgNode *node)
void clicked (const QString &filename, int line, int column)
void nodeDropped (SgNode *node, QPoint pos)

Public Member Functions

 RoseGraphicsView (QWidget *parent=0)
virtual ~RoseGraphicsView ()
void setSgDragEnabled (bool b)
void setSgDropEnabled (bool b)
bool isSgDragEnabled () const
bool isSgDropEnabled () const

Protected Member Functions

virtual void updateGraph (SgNode *node, AstFilterInterface *filter)=0
virtual void wheelEvent (QWheelEvent *event)
virtual void scaleView (qreal scaleFactor)
virtual void mousePressEvent (QMouseEvent *event)
virtual void dragEnterEvent (QDragEnterEvent *ev)
virtual void dropEvent (QDropEvent *ev)
virtual void dragMoveEvent (QDragMoveEvent *ev)
virtual void mouseMoveEvent (QMouseEvent *event)
virtual bool acceptMimeData (const QMimeData *mimeData)
virtual void handleMimeData (const QMimeData *mimeData, const QPoint &pos)

Protected Attributes

QPoint dragStartPosition
 position of mouseclick, used for d&d functions
bool dragEnabled
 if SgNodes can be dragged out of this view
bool dropEnabled
 if SgNodes can be dropped at this view

Properties

bool SgDragEnabled []
bool SgDropEnabled []

Private Attributes

AstFilterInterfacecurFilter
SgNode * curNode

Detailed Description

GraphicsView which can display trees or graphs.

implementation of drag&drop and handling of SgNode's is done here

Definition at line 17 of file RoseGraphicsView.h.


Constructor & Destructor Documentation

RoseGraphicsView::RoseGraphicsView ( QWidget *  parent = 0  ) 

Definition at line 23 of file RoseGraphicsView.cpp.

RoseGraphicsView::~RoseGraphicsView (  )  [virtual]

Definition at line 42 of file RoseGraphicsView.cpp.


Member Function Documentation

bool RoseGraphicsView::acceptMimeData ( const QMimeData *  mimeData  )  [protected, virtual]

Definition at line 158 of file RoseGraphicsView.cpp.

Referenced by dragEnterEvent().

Here is the caller graph for this function:

void RoseGraphicsView::clicked ( const QString &  filename,
int  line,
int  column 
) [signal]

Referenced by mousePressEvent().

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

Definition at line 133 of file RoseGraphicsView.cpp.

Here is the call graph for this function:

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

Definition at line 143 of file RoseGraphicsView.cpp.

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

Definition at line 149 of file RoseGraphicsView.cpp.

Here is the call graph for this function:

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

Definition at line 40 of file RoseGraphicsView.h.

void RoseGraphicsView::handleMimeData ( const QMimeData *  mimeData,
const QPoint &  pos 
) [protected, virtual]

Definition at line 163 of file RoseGraphicsView.cpp.

Referenced by dropEvent().

Here is the call graph for this function:

Here is the caller graph for this function:

bool RoseGraphicsView::isSgDragEnabled (  )  const [inline]

Definition at line 32 of file RoseGraphicsView.h.

bool RoseGraphicsView::isSgDropEnabled (  )  const [inline]

Definition at line 33 of file RoseGraphicsView.h.

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

Definition at line 104 of file RoseGraphicsView.cpp.

Here is the call graph for this function:

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

Definition at line 73 of file RoseGraphicsView.cpp.

Here is the call graph for this function:

void RoseGraphicsView::nodeActivated ( SgNode *  node  )  [signal]

Referenced by mousePressEvent().

void RoseGraphicsView::nodeActivatedAlt ( SgNode *  node  )  [signal]

void RoseGraphicsView::nodeDropped ( SgNode *  node,
QPoint  pos 
) [signal]

Referenced by handleMimeData(), and RoseGraphicsView().

void RoseGraphicsView::scaleView ( qreal  scaleFactor  )  [protected, virtual]

Definition at line 172 of file RoseGraphicsView.cpp.

Referenced by wheelEvent().

Here is the caller graph for this function:

void RoseGraphicsView::setFileFilter ( int  id  )  [slot]

Definition at line 64 of file RoseGraphicsView.cpp.

void RoseGraphicsView::setFilter ( AstFilterInterface filter  )  [slot]

Definition at line 53 of file RoseGraphicsView.cpp.

Referenced by setFileFilter().

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

Definition at line 47 of file RoseGraphicsView.cpp.

Referenced by gotoNode(), and RoseGraphicsView().

void RoseGraphicsView::setSgDragEnabled ( bool  b  )  [inline]

Definition at line 29 of file RoseGraphicsView.h.

void RoseGraphicsView::setSgDropEnabled ( bool  b  )  [inline]

Definition at line 30 of file RoseGraphicsView.h.

virtual void RoseGraphicsView::updateGraph ( SgNode *  node,
AstFilterInterface filter 
) [protected, pure virtual]

Reimplement in derived classes, and use curFilter and curNode to generate graph/tree

Implemented in AstGraphWidget, and CallGraphWidget.

Referenced by setFilter(), and setNode().

void RoseGraphicsView::wheelEvent ( QWheelEvent *  event  )  [protected, virtual]

Definition at line 181 of file RoseGraphicsView.cpp.

Here is the call graph for this function:


Member Data Documentation

AstFilterInterface* RoseGraphicsView::curFilter [private]

Definition at line 84 of file RoseGraphicsView.h.

Referenced by setFilter(), setNode(), and ~RoseGraphicsView().

SgNode* RoseGraphicsView::curNode [private]

Definition at line 85 of file RoseGraphicsView.h.

Referenced by setFilter(), and setNode().

bool RoseGraphicsView::dragEnabled [protected]

if SgNodes can be dragged out of this view

Definition at line 79 of file RoseGraphicsView.h.

Referenced by isSgDragEnabled(), mouseMoveEvent(), and setSgDragEnabled().

QPoint RoseGraphicsView::dragStartPosition [protected]

position of mouseclick, used for d&d functions

Definition at line 78 of file RoseGraphicsView.h.

Referenced by mouseMoveEvent(), and mousePressEvent().

bool RoseGraphicsView::dropEnabled [protected]

if SgNodes can be dropped at this view

Definition at line 80 of file RoseGraphicsView.h.

Referenced by acceptMimeData(), dropEvent(), isSgDropEnabled(), and setSgDropEnabled().


Property Documentation

bool RoseGraphicsView::SgDragEnabled [read, write]

Definition at line 21 of file RoseGraphicsView.h.

bool RoseGraphicsView::SgDropEnabled [read, write]

Definition at line 21 of file RoseGraphicsView.h.


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