vnote/src/vgraphvizhelper.h
Le Tan 10e2bba7f6 support Mermaid and Flowchart.js preview
Mermaid preview is disabled for some issues.
2018-04-12 19:31:13 +08:00

33 lines
740 B
C++

#ifndef VGRAPHVIZHELPER_H
#define VGRAPHVIZHELPER_H
#include <QObject>
#include <QStringList>
#include <QProcess>
#include "vconstants.h"
class VGraphvizHelper : public QObject
{
Q_OBJECT
public:
explicit VGraphvizHelper(QObject *p_parent = nullptr);
void processAsync(int p_id, TimeStamp p_timeStamp, const QString &p_format, const QString &p_text);
void prepareCommand(QString &p_cmd, QStringList &p_args) const;
signals:
void resultReady(int p_id, TimeStamp p_timeStamp, const QString &p_format, const QString &p_result);
private slots:
void handleProcessFinished(int p_exitCode, QProcess::ExitStatus p_exitStatus);
private:
QString m_program;
QStringList m_args;
};
#endif // VGRAPHVIZHELPER_H