DisassemblerGraphView

class DisassemblerGraphView

Inherits from GraphView

Public Types

enum GraphExportType

Values:

Png
Jpeg
Svg
GVDot
GVJson
GVGif
GVPng
GVJpeg
GVPostScript
GVSvg
using EdgeConfigurationMapping = std::map<std::pair<ut64, ut64>, EdgeConfiguration>

Public Functions

DisassemblerGraphView(QWidget *parent, CutterSeekable *seekable, MainWindow *mainWindow, QList<QAction *> additionalMenuAction)
~DisassemblerGraphView()
void drawBlock(QPainter &p, GraphView::GraphBlock &block, bool interactive)

drawBlock

Parameters
  • p: painter object, not necesarily current widget
  • block:
  • interactive: - can be used for disabling elemnts during export

void blockClicked(GraphView::GraphBlock &block, QMouseEvent *event, QPoint pos)
void blockDoubleClicked(GraphView::GraphBlock &block, QMouseEvent *event, QPoint pos)
bool helpEvent(QHelpEvent *event)
void blockHelpEvent(GraphView::GraphBlock &block, QHelpEvent *event, QPoint pos)
GraphView::EdgeConfiguration edgeConfiguration(GraphView::GraphBlock &from, GraphView::GraphBlock *to, bool interactive)
void blockTransitionedTo(GraphView::GraphBlock *to)
bool event(QEvent *event)
void loadCurrentGraph()
int getWidth()
int getHeight()
std::unordered_map<ut64, GraphBlock> getBlocks()
DisassemblerGraphView::EdgeConfigurationMapping getEdgeConfigurations()
void exportGraph(QString filePath, GraphExportType type)
void exportR2GraphvizGraph(QString filePath, QString type)
bool isGraphEmpty()

Public Members

std::unordered_map<ut64, DisassemblyBlock> disassembly_blocks
QString windowTitle
ut64 currentFcnAddr = RVA_INVALID

keep the current addr of the fcn of Graph Everytime overview updates its contents, it compares this value with the one in Graph if they aren’t same, then Overview needs to update the pixmap cache.

Public Slots

void refreshView()
void colorsUpdatedSlot()
void fontsUpdatedSlot()
void onSeekChanged(RVA addr)
void zoom(QPointF mouseRelativePos, double velocity)
void setZoom(QPointF mouseRelativePos, double scale)
void zoomIn()
void zoomOut()
void zoomReset()
void takeTrue()
void takeFalse()
void nextInstr()
void prevInstr()
void copySelection()

Signal

signal DisassemblerGraphView::viewRefreshed
signal DisassemblerGraphView::viewZoomed
signal DisassemblerGraphView::graphMoved
signal DisassemblerGraphView::resized
signal DisassemblerGraphView::nameChanged