Jose Fonseca | 9653f95 | 2015-05-19 16:32:43 +0100 | [diff] [blame] | 1 | #pragma once |
Dan McCabe | 1c3ddde | 2012-03-21 09:53:45 -0700 | [diff] [blame] | 2 | |
| 3 | #include "apitrace.h" |
| 4 | |
| 5 | #include <QObject> |
| 6 | #include <QProcess> |
| 7 | |
| 8 | class TrimProcess : public QObject |
| 9 | { |
| 10 | Q_OBJECT |
| 11 | public: |
| 12 | TrimProcess(QObject *parent=0); |
| 13 | ~TrimProcess(); |
| 14 | |
| 15 | void setTrimIndex(int trimIndex); |
| 16 | int trimIndex(); |
| 17 | |
| 18 | void setTracePath(const QString &str); |
| 19 | QString tracePath() const; |
| 20 | |
| 21 | private: |
| 22 | void updateTrimPath(); |
| 23 | |
| 24 | public slots: |
| 25 | void start(); |
| 26 | |
| 27 | signals: |
| 28 | void trimmedFile(const QString &trimPath); |
| 29 | void error(const QString &msg); |
| 30 | |
| 31 | private slots: |
| 32 | void trimFinished(); |
| 33 | void trimError(QProcess::ProcessError err); |
| 34 | |
| 35 | private: |
| 36 | QStringList m_args; |
| 37 | QString m_tracePath; |
| 38 | QString m_trimPath; |
Dan McCabe | 1c3ddde | 2012-03-21 09:53:45 -0700 | [diff] [blame] | 39 | int m_trimIndex; |
| 40 | QProcess *m_process; |
| 41 | }; |