AsmView Class Reference

Displays a disassembled binary. More...

#include <AsmView.h>

Inheritance diagram for AsmView:

Inheritance graph
[legend]
List of all members.

Public Slots

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

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

 AsmView (QWidget *parent=NULL)
virtual ~AsmView ()
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

void asmNodeDropped (SgNode *node)
void on_nodeDropped (SgNode *node, const QPoint &pos)
void selectionChanged (const QItemSelection &selected, const QItemSelection &deselected)
virtual void viewClicked (const QModelIndex &ind)
void viewDoubleClicked (const QModelIndex &ind)

Protected Member Functions

void addArrows (int drawColumn, int addressColumn, const QModelIndex &startInd)
void updateModel ()
void contextMenuEvent (QContextMenuEvent *event)
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

Protected Attributes

SgNode * curNode2
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

Displays a disassembled binary.

AsmView.jpg

Features:

Definition at line 22 of file AsmView.h.


Constructor & Destructor Documentation

AsmView::AsmView ( QWidget *  parent = NULL  ) 

Definition at line 24 of file AsmView.cpp.

AsmView::~AsmView (  )  [virtual]

Definition at line 35 of file AsmView.cpp.


Member Function Documentation

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

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 RoseTreeView::dragEnterEvent().

Here is the caller graph for this function:

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

Definition at line 207 of file RoseTreeView.cpp.

Referenced by addArrows().

Here is the caller graph for this function:

void AsmView::addArrows ( int  drawColumn,
int  addressColumn,
const QModelIndex &  startInd 
) [protected]

Definition at line 255 of file AsmView.cpp.

Referenced by selectionChanged().

Here is the call graph for this function:

void AsmView::asmNodeDropped ( SgNode *  node  )  [protected, slot]

Definition at line 39 of file AsmView.cpp.

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

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

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

void AsmView::contextMenuEvent ( QContextMenuEvent *  event  )  [protected]

Definition at line 173 of file AsmView.cpp.

Here is the call graph for this function:

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

Definition at line 171 of file RoseTreeView.cpp.

Here is the call graph for this function:

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

Definition at line 179 of file RoseTreeView.cpp.

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

Definition at line 266 of file RoseTreeView.cpp.

Referenced by RoseTreeView::paintEvent().

Here is the call graph for this function:

Here is the caller graph for this function:

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

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

Definition at line 259 of file RoseTreeView.cpp.

Referenced by RoseTreeView::drawArrowBezier().

Here is the caller graph for this function:

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

Sets the Item corresponding to the node as currentIndex (i.e. selects it, scrolls that the item is visible)

Reimplemented from RoseTreeView.

Definition at line 109 of file AsmView.cpp.

Referenced by asmNodeDropped().

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

extracts and takes proper action for the arrived mimeData

Definition at line 200 of file RoseTreeView.cpp.

Referenced by RoseTreeView::dropEvent().

Here is the call graph for this function:

Here is the caller graph for this function:

bool RoseTreeView::isSgDragEnabled (  )  const [inline, inherited]

Definition at line 43 of file RoseTreeView.h.

bool RoseTreeView::isSgDropEnabled (  )  const [inline, inherited]

Definition at line 44 of file RoseTreeView.h.

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

Definition at line 136 of file RoseTreeView.cpp.

Here is the call graph for this function:

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

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

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

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

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

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

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

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

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

Definition at line 250 of file RoseTreeView.cpp.

Referenced by RoseTreeView::drawArrowBezier().

Here is the caller graph for this function:

void AsmView::on_nodeDropped ( SgNode *  node,
const QPoint &  pos 
) [protected, slot]

Definition at line 132 of file AsmView.cpp.

Referenced by AsmView().

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

Definition at line 220 of file RoseTreeView.cpp.

Here is the call graph for this function:

void RoseTreeView::removeAllArrows (  )  [inherited]

Definition at line 213 of file RoseTreeView.cpp.

Referenced by selectionChanged().

void AsmView::selectionChanged ( const QItemSelection &  selected,
const QItemSelection &  deselected 
) [protected, slot]

Definition at line 239 of file AsmView.cpp.

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

Reimplemented in AstBrowserWidget.

Definition at line 54 of file RoseTreeView.cpp.

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

Reimplemented in AstBrowserWidget.

Definition at line 48 of file RoseTreeView.cpp.

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

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

Definition at line 40 of file RoseTreeView.h.

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

Definition at line 41 of file RoseTreeView.h.

Referenced by ProjectView::ProjectView().

Here is the caller graph for this function:

void AsmView::updateModel (  )  [protected, virtual]

Reimplemented from RoseTreeView.

Definition at line 61 of file AsmView.cpp.

Referenced by on_nodeDropped().

Here is the call graph for this function:

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

Definition at line 77 of file RoseTreeView.cpp.

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

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

Definition at line 108 of file RoseTreeView.cpp.

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


Member Data Documentation

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

Definition at line 95 of file RoseTreeView.h.

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

AstFilterInterface* RoseTreeView::curFilter [protected, inherited]

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 RoseTreeView::setFilter(), BAstView::updateModel(), and updateModel().

SgNode* RoseTreeView::curNode [protected, inherited]

Definition at line 105 of file RoseTreeView.h.

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

SgNode* AsmView::curNode2 [protected]

Definition at line 46 of file AsmView.h.

Referenced by contextMenuEvent(), on_nodeDropped(), and updateModel().

bool RoseTreeView::dragEnabled [protected, inherited]

if SgNodes can be dragged out of this view

Definition at line 110 of file RoseTreeView.h.

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

QPoint RoseTreeView::dragStartPosition [protected, inherited]

position of mouseclick, used for d&d functions

Definition at line 109 of file RoseTreeView.h.

Referenced by RoseTreeView::mouseMoveEvent(), and RoseTreeView::mousePressEvent().

bool RoseTreeView::dropEnabled [protected, inherited]

if SgNodes can be dropped at this view

Definition at line 111 of file RoseTreeView.h.

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

ItemTreeModel* RoseTreeView::model [protected, inherited]

Reimplemented in AstBrowserWidget.

Definition at line 97 of file RoseTreeView.h.

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


Property Documentation

bool RoseTreeView::SgDragEnabled [read, write, inherited]

Definition at line 33 of file RoseTreeView.h.

bool RoseTreeView::SgDropEnabled [read, write, inherited]

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:48 2009 for RoseQtWidgets by  doxygen 1.4.7