CutterGraphView

class CutterGraphView : public GraphView

Common Cutter specific graph functionality.

Subclassed by DisassemblerGraphView, SimpleTextGraphView

Public Types

enum GraphExportType

Values:

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

Public Functions

CutterGraphView(QWidget *parent)
virtual bool event(QEvent *event) override
void exportGraph(QString filePath, GraphExportType type, QString graphCommand = "", RVA address = RVA_INVALID)

Export graph to a file in the specified format.

Parameters
  • filePath

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

  • graphCommand – rizin graph printing command without type, not required for direct image export

  • address – object address for commands like agf

void exportRizinGraphvizGraph(QString filePath, QString type, QString graphCommand, RVA address)

Export image using rizin ag*w command and graphviz. Requires graphviz dot executable in the path.

Parameters
  • filePath – output file path

  • type – image format as expected by “e graph.gv.format”

  • graphCommand – rizin command without type, for example agf

  • address – object address if required by command

void exportRzTextGraph(QString filePath, QString graphCommand, RVA address)

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

Parameters
  • filePath – output file path

  • graphCommand – graph command including the format, example “agfd” or “agfg”

  • address – object address if required by command

void showExportGraphDialog(QString defaultName, QString graphCommand = "", RVA address = RVA_INVALID)

Show graph export dialog.

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

  • graphCommand – - rizin graph commmand with graph type and without export type, for example afC. Leave empty for non-rizin graphs. In such case only direct image export will be available.

  • address – - object address if relevant for graphCommand

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)