1 /***************************************************************************
3 * Copyright (C) 2011 by Jean-Baptiste Mardelle (jb@kdenlive.org) *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
19 ***************************************************************************/
21 #ifndef ABSTRACTCLIPJOB
22 #define ABSTRACTCLIPJOB
27 #include "definitions.h"
29 enum JOBTYPE { NOJOBTYPE = 0, PROXYJOB = 1, CUTJOB = 2, MLTJOB = 3};
31 class AbstractClipJob : public QObject
36 AbstractClipJob(JOBTYPE type, ClipType cType, const QString &id, const QStringList ¶meters); virtual ~ AbstractClipJob();
41 const QString clipId() const;
42 const QString errorMessage() const;
43 const QString logDetails() const;
44 ClipJobStatus status();
45 virtual void setStatus(ClipJobStatus status);
46 virtual const QString destination() const;
47 virtual void startJob();
48 virtual stringMap cancelProperties();
49 virtual void processLogInfo();
50 virtual const QString statusMessage();
51 /** @brief Returns true if only one instance of this job can be run on a clip. */
52 virtual bool isExclusive();
53 bool addClipToProject() const;
54 void setAddClipToProject(bool add);
57 ClipJobStatus m_jobStatus;
59 QString m_errorMessage;
61 bool m_addClipToProject;
62 QProcess *m_jobProcess;
65 void jobProgress(const QString&, int, int);
66 void cancelRunningJob(const QString &, const stringMap&);