summaryrefslogtreecommitdiff
path: root/gui/trimprocess.h
blob: 0d55c889780711426ba7248d7bb049848c1fedd3 (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
#pragma once

#include "apitrace.h"

#include <QObject>
#include <QProcess>

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

    void setTrimIndex(int trimIndex);
    int trimIndex();

    void setTracePath(const QString &str);
    QString tracePath() const;

private:
    void updateTrimPath();

public slots:
    void start();

signals:
    void trimmedFile(const QString &trimPath);
    void error(const QString &msg);

private slots:
    void trimFinished();
    void trimError(QProcess::ProcessError err);

private:
    QStringList m_args;
    QString m_tracePath;
    QString m_trimPath;
    int m_trimIndex;
    QProcess *m_process;
};