CutterGraphView

class CutterGraphView : public GraphView

Common Cutter specific graph functionality.

Subclassed by DisassemblerGraphView, SimpleTextGraphView

Public Types

enum class GraphExportType

Values:

enumerator Png
enumerator Jpeg
enumerator Svg
enumerator GVDot
enumerator GVJson
enumerator GVGif
enumerator GVPng
enumerator GVJpeg
enumerator GVPostScript
enumerator GVSvg
enumerator GVPdf
enumerator RzGml
enumerator RzJson

Public Functions

CutterGraphView(QWidget *parent)
virtual bool event(QEvent *event) override
void exportGraph(QString filePath, GraphExportType exportType, RzCoreGraphType graphType, RVA address = RVA_INVALID)

Export graph to a file in the specified format.

Parameters:
  • filePath – - output file path

  • exportType – - export type, GV* and Rz* types require graphCommand

  • graphType – - graph type, example RZ_CORE_GRAPH_TYPE_FUNCALL or RZ_CORE_GRAPH_TYPE_IMPORT

  • address – - object address (if global set it to RVA_INVALID)

void exportRzTextGraph(QString filePath, RzCoreGraphType type, RzCoreGraphFormat format, RVA address)

Export graph in one of the text formats supported by rizin json, gml, SDB key-value.

Parameters:
  • filePath – - output file path

  • type – - graph type, example RZ_CORE_GRAPH_TYPE_FUNCALL or RZ_CORE_GRAPH_TYPE_IMPORT

  • format – - graph format, example RZ_CORE_GRAPH_FORMAT_DOT or RZ_CORE_GRAPH_FORMAT_GML

  • address – - object address (if global set it to RVA_INVALID)

void showExportGraphDialog(QString defaultName, RzCoreGraphType type, RVA address = RVA_INVALID)

Show graph export dialog.

Parameters:
  • defaultName – - default file name in the export dialog

  • type – - graph type, example RZ_CORE_GRAPH_TYPE_FUNCALL or RZ_CORE_GRAPH_TYPE_IMPORT

  • address – - object address (if global set it to RVA_INVALID)

Public Slots

virtual void refreshView()
void updateColors()
void fontsUpdatedSlot()
void zoom(QPointF mouseRelativePos, double velocity)
void setZoom(QPointF mouseRelativePos, double scale)
void zoomIn()
void zoomOut()
void zoomReset()
virtual void showExportDialog()

Show the export file dialog. Override this to support rizin based export formats.

Signals

void viewRefreshed()
void viewZoomed()
void graphMoved()
void resized()

Public Static Functions

static bool graphIsBitamp(GraphExportType type)