summaryrefslogtreecommitdiff
path: root/gui/traceprocess.h
blob: 343bac967cf6fddf6c64557fe8a457fde17441bf (plain)
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
37
38
39
40
41
42
43
44
#ifndef TRACEPROCESS_H
#define TRACEPROCESS_H

#include <QObject>
#include <QProcess>

class TraceProcess : public QObject
{
    Q_OBJECT
public:
    TraceProcess(QObject *parent=0);
    ~TraceProcess();

    bool canTrace() const;

    void setApi(const QString &str);
    void setExecutablePath(const QString &str);
    QString executablePath() const;

    void setArguments(const QStringList &args);
    QStringList arguments() const;

public slots:
    void start();

signals:
    void tracedFile(const QString &tracePath);
    void error(const QString &msg);

private slots:
    void traceFinished();
    void traceError(QProcess::ProcessError err);

private:
    QString m_api;
    QString m_execPath;
    QStringList m_args;
    QString m_tracePath;
    QProcess *m_process;

    bool m_canTrace;
};

#endif