RoseTreeView Class Reference

TreeView displaying an ItemTreeModel. More...

#include <RoseTreeView.h>

Inheritance diagram for RoseTreeView:

Inheritance graph
[legend]
List of all members.

Public Slots

virtual void setNode (SgNode *node)
virtual void setFilter (AstFilterInterface *filter)
virtual bool gotoNode (SgNode *node)

Signals

void nodeActivated (SgNode *node)
void nodeActivatedAlt (SgNode *node)
void clicked (const QString &file, int startRow, int startCol, int endRow, int endCol)
 Emitted when clicked, provides the sourcefile and position of the SgNode (can be connected to an editor).
void nodeDropped (SgNode *node, const QPoint &p)

Public Member Functions

 RoseTreeView (QWidget *parent=NULL)
virtual ~RoseTreeView ()
void setSgDragEnabled (bool b)
void setSgDropEnabled (bool b)
bool isSgDragEnabled () const
bool isSgDropEnabled () const
void addArrow (const QModelIndex &i1, const QModelIndex &i2)
void removeAllArrows ()

Protected Slots

virtual void viewClicked (const QModelIndex &ind)
void viewDoubleClicked (const QModelIndex &ind)

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)
virtual bool acceptMimeData (const QMimeData *mimeData)
virtual void handleMimeData (const QMimeData *mimeData, const QPoint &pos)
 extracts and takes proper action for the arrived mimeData
virtual void paintEvent (QPaintEvent *ev)
void drawArrowBezier (const QPoint &p1, const QPoint &p2, QPainter *painter, float curvature)
void normalizeVec (QPointF &vec) const
QPointF getOrtho (const QPointF &input, bool direction=true) const
virtual void updateModel ()

Protected Attributes

QList< QPair< QModelIndex,
QModelIndex > > 
arrows
ItemTreeModelmodel
AstFilterInterfacecurFilter
SgNode * curNode
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 []

Detailed Description

TreeView displaying an ItemTreeModel.

Features:

Usage:

Definition at line 29 of file RoseTreeView.h.


Constructor & Destructor Documentation

RoseTreeView::RoseTreeView ( QWidget *  parent = NULL  ) 

Definition at line 20 of file RoseTreeView.cpp.

Here is the call graph for this function:

RoseTreeView::~RoseTreeView (  )  [virtual]

Definition at line 44 of file RoseTreeView.cpp.


Member Function Documentation

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

handler to decide wether to accept a certain mime data default is to accept application/SgNode to support application/SgNode-* overwrite these two functions in the derived class

Definition at line 195 of file RoseTreeView.cpp.

Referenced by dragEnterEvent().

Here is the caller graph for this function:

void RoseTreeView::addArrow ( const QModelIndex &  i1,
const QModelIndex &  i2 
)

Definition at line 207 of file RoseTreeView.cpp.

Referenced by AsmView::addArrows().

Here is the caller graph for this function:

void RoseTreeView::clicked ( const QString &  file,
int  startRow,
int  startCol,
int  endRow,
int  endCol 
) [signal]

Emitted when clicked, provides the sourcefile and position of the SgNode (can be connected to an editor).

Referenced by RoseTreeView(), and viewClicked().

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

Definition at line 171 of file RoseTreeView.cpp.

Here is the call graph for this function:

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

Definition at line 179 of file RoseTreeView.cpp.

void RoseTreeView::drawArrowBezier ( const QPoint &  p1,
const QPoint &  p2,
QPainter *  painter,
float  curvature 
) [protected]

Definition at line 266 of file RoseTreeView.cpp.

Referenced by paintEvent().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 185 of file RoseTreeView.cpp.

Here is the call graph for this function:

QPointF RoseTreeView::getOrtho ( const QPointF &  input,
bool  direction = true 
) const [protected]

Definition at line 259 of file RoseTreeView.cpp.

Referenced by drawArrowBezier().

Here is the caller graph for this function:

bool RoseTreeView::gotoNode ( SgNode *  node  )  [virtual, slot]

Reimplemented in AsmView, and AstBrowserWidget.

Definition at line 63 of file RoseTreeView.cpp.

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

extracts and takes proper action for the arrived mimeData

Definition at line 200 of file RoseTreeView.cpp.

Referenced by dropEvent().

Here is the call graph for this function:

Here is the caller graph for this function:

bool RoseTreeView::isSgDragEnabled (  )  const [inline]

Definition at line 43 of file RoseTreeView.h.

bool RoseTreeView::isSgDropEnabled (  )  const [inline]

Definition at line 44 of file RoseTreeView.h.

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

Definition at line 136 of file RoseTreeView.cpp.

Here is the call graph for this function:

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

Reimplemented in ProjectView.

Definition at line 128 of file RoseTreeView.cpp.

Referenced by ProjectView::mousePressEvent().

Here is the caller graph for this function:

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

Emitted if clicked on an Entry warning: may be null (appropriate action would be to clear the attached view)

Referenced by AstBrowserWidget::AstBrowserWidget(), and viewClicked().

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

Referenced by AstBrowserWidget::AstBrowserWidget(), and viewDoubleClicked().

void RoseTreeView::nodeDropped ( SgNode *  node,
const QPoint &  p 
) [signal]

Referenced by AsmView::AsmView(), AstBrowserWidget::AstBrowserWidget(), BAstView::BAstView(), and handleMimeData().

void RoseTreeView::normalizeVec ( QPointF &  vec  )  const [protected]

Definition at line 250 of file RoseTreeView.cpp.

Referenced by drawArrowBezier().

Here is the caller graph for this function:

void RoseTreeView::paintEvent ( QPaintEvent *  ev  )  [protected, virtual]

Definition at line 220 of file RoseTreeView.cpp.

Here is the call graph for this function:

void RoseTreeView::removeAllArrows (  ) 

Definition at line 213 of file RoseTreeView.cpp.

Referenced by AsmView::selectionChanged().

void RoseTreeView::setFilter ( AstFilterInterface filter  )  [virtual, slot]

Reimplemented in AstBrowserWidget.

Definition at line 54 of file RoseTreeView.cpp.

void RoseTreeView::setNode ( SgNode *  node  )  [virtual, slot]

Reimplemented in AstBrowserWidget.

Definition at line 48 of file RoseTreeView.cpp.

Referenced by AsmView::asmNodeDropped(), BAstView::BAstView(), and AsmView::on_nodeDropped().

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

Definition at line 40 of file RoseTreeView.h.

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

Definition at line 41 of file RoseTreeView.h.

Referenced by ProjectView::ProjectView().

Here is the caller graph for this function:

virtual void RoseTreeView::updateModel (  )  [inline, protected, virtual]

Reimplemented in AsmView, BAstView, and ProjectView.

Definition at line 97 of file RoseTreeView.h.

Referenced by RoseTreeView(), setFilter(), and setNode().

Here is the caller graph for this function:

void RoseTreeView::viewClicked ( const QModelIndex &  ind  )  [protected, virtual, slot]

Definition at line 77 of file RoseTreeView.cpp.

Referenced by AstBrowserWidget::AstBrowserWidget(), and RoseTreeView().

void RoseTreeView::viewDoubleClicked ( const QModelIndex &  ind  )  [protected, slot]

Definition at line 108 of file RoseTreeView.cpp.

Referenced by AstBrowserWidget::AstBrowserWidget(), and RoseTreeView().


Member Data Documentation

QList<QPair<QModelIndex,QModelIndex> > RoseTreeView::arrows [protected]

Definition at line 95 of file RoseTreeView.h.

Referenced by addArrow(), paintEvent(), and removeAllArrows().

AstFilterInterface* RoseTreeView::curFilter [protected]

The user calls setNode and filter, the new values are stored here then updateView is called

Definition at line 104 of file RoseTreeView.h.

Referenced by setFilter(), BAstView::updateModel(), and AsmView::updateModel().

SgNode* RoseTreeView::curNode [protected]

Definition at line 105 of file RoseTreeView.h.

Referenced by AsmView::contextMenuEvent(), AsmView::on_nodeDropped(), setNode(), BAstView::updateModel(), and AsmView::updateModel().

bool RoseTreeView::dragEnabled [protected]

if SgNodes can be dragged out of this view

Definition at line 110 of file RoseTreeView.h.

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

QPoint RoseTreeView::dragStartPosition [protected]

position of mouseclick, used for d&d functions

Definition at line 109 of file RoseTreeView.h.

Referenced by mouseMoveEvent(), and mousePressEvent().

bool RoseTreeView::dropEnabled [protected]

if SgNodes can be dropped at this view

Definition at line 111 of file RoseTreeView.h.

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

ItemTreeModel* RoseTreeView::model [protected]

Reimplemented in AstBrowserWidget.

Definition at line 97 of file RoseTreeView.h.

Referenced by AsmView::addArrows(), BAstView::BAstView(), gotoNode(), AsmView::gotoNode(), mouseMoveEvent(), ProjectView::ProjectView(), RoseTreeView(), AsmView::selectionChanged(), BAstView::updateModel(), AsmView::updateModel(), viewClicked(), and viewDoubleClicked().


Property Documentation

bool RoseTreeView::SgDragEnabled [read, write]

Definition at line 33 of file RoseTreeView.h.

bool RoseTreeView::SgDropEnabled [read, write]

Definition at line 33 of file RoseTreeView.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