forked from vnotex/vnote
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvgraphvizhelper.h
More file actions
36 lines (24 loc) · 889 Bytes
/
vgraphvizhelper.h
File metadata and controls
36 lines (24 loc) · 889 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#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);
static bool testGraphviz(const QString &p_dot, QString &p_msg);
static QByteArray process(const QString &p_format, const QString &p_text);
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:
void prepareCommand(QString &p_cmd, QStringList &p_args) const;
QString m_program;
QStringList m_args;
};
#endif // VGRAPHVIZHELPER_H