graph_analysis
Static Public Member Functions | Static Public Attributes | List of all members
graph_analysis::gui::dialogs::IODialog Class Reference

#include <IODialog.hpp>

Static Public Member Functions

static QString getGraphReaderSuffixFilter ()
 
static QString getGraphWriterSuffixFilter ()
 
static QString getImportGraphFilename (QWidget *parent=NULL, const QString &settingsLabel=DefaultSettingsLabel)
 
static QString getExportGraphFilename (QWidget *parent=NULL, const QString &settingsLabel=DefaultSettingsLabel)
 
static graph_analysis::representation::Type getTypeNameFromFilter (QString filtername)
 
static BaseGraph::Ptr importGraph (QWidget *parent=NULL, const QString &filename=QString(), const QString &settingsLabel=DefaultSettingsLabel)
 
static void exportGraph (const BaseGraph::Ptr &graph, QWidget *parent=NULL, const QString &settingsLabel=DefaultSettingsLabel)
 
static void exportScene (QGraphicsScene *scene, QWidget *parent=NULL)
 
static void exportSceneAsPdf (QGraphicsScene *scene, QString filename, QWidget *parent=NULL)
 
static void exportSceneAsSvg (QGraphicsScene *scene, QString filename)
 

Static Public Attributes

static QString DefaultSettingsLabel = "IO"
 

Member Function Documentation

◆ exportGraph()

void graph_analysis::gui::dialogs::IODialog::exportGraph ( const BaseGraph::Ptr &  graph,
QWidget *  parent = NULL,
const QString &  settingsLabel = DefaultSettingsLabel 
)
static

Export a given graph, i.e. opens a file dialog for selecting the target and file format

Parameters
graphGraph to export
parentParent widget point
settingsLabelLabel for the QSettings to create disjoint lists for recentExportDir, recentExportFileList, recentExportFile

◆ exportScene()

void graph_analysis::gui::dialogs::IODialog::exportScene ( QGraphicsScene *  scene,
QWidget *  parent = NULL 
)
static

Opens a file dialog to save a graphics scene

Parameters
sceneScene to save
parentParent of the dialog to be opened

◆ exportSceneAsPdf()

void graph_analysis::gui::dialogs::IODialog::exportSceneAsPdf ( QGraphicsScene *  scene,
QString  filename,
QWidget *  parent = NULL 
)
static

Export a graphics scene as Pdf, will open a printer dialog with preconfigure setting to save as pdf

Parameters
sceneScene to save
filenameFilename to use for saving
parentParent of the dialog to be opened

◆ exportSceneAsSvg()

void graph_analysis::gui::dialogs::IODialog::exportSceneAsSvg ( QGraphicsScene *  scene,
QString  filename 
)
static

Export a graphics scene as svg

Parameters
sceneScene to save
filenameFilename to use for saving

◆ getExportGraphFilename()

QString graph_analysis::gui::dialogs::IODialog::getExportGraphFilename ( QWidget *  parent = NULL,
const QString &  settingsLabel = DefaultSettingsLabel 
)
static

Get the filename for exportingg a graph

Returns
filename or empty string on failure

◆ getGraphReaderSuffixFilter()

QString graph_analysis::gui::dialogs::IODialog::getGraphReaderSuffixFilter ( )
static

Get the suffix filter for all supported graph format that can be imported

Returns
The string filter that can be passed to a QFileDialog

◆ getGraphWriterSuffixFilter()

QString graph_analysis::gui::dialogs::IODialog::getGraphWriterSuffixFilter ( )
static

Get the suffix filter for all supported graph format that can be exported

Returns
The string filter that can be passed to a QFileDialog

◆ getImportGraphFilename()

QString graph_analysis::gui::dialogs::IODialog::getImportGraphFilename ( QWidget *  parent = NULL,
const QString &  settingsLabel = DefaultSettingsLabel 
)
static

Get the filename for importing a graph

Returns
filename or empty string on failure

◆ getTypeNameFromFilter()

graph_analysis::representation::Type graph_analysis::gui::dialogs::IODialog::getTypeNameFromFilter ( QString  filtername)
static

Get the representation type from a given filter selection

◆ importGraph()

BaseGraph::Ptr graph_analysis::gui::dialogs::IODialog::importGraph ( QWidget *  parent = NULL,
const QString &  filename = QString(),
const QString &  settingsLabel = DefaultSettingsLabel 
)
static

Retrieve the imported graph, i.e. opens a file dialog (filtered by supported import types)

Parameters
parentParent of this dialog
filenameof the file to be loaded (to skip showing the menu)
settingsLabelfor the QSetting for creating multiple recent filelists
Returns
the imported graph, or empty shared pointer, on failure

Member Data Documentation

◆ DefaultSettingsLabel

QString graph_analysis::gui::dialogs::IODialog::DefaultSettingsLabel = "IO"
static

The documentation for this class was generated from the following files: