]> git.sesse.net Git - kdenlive/blob - src/projecttree/abstractclipjob.h
Cleaning code style of Definitions.
[kdenlive] / src / projecttree / abstractclipjob.h
1 /***************************************************************************
2  *                                                                         *
3  *   Copyright (C) 2011 by Jean-Baptiste Mardelle (jb@kdenlive.org)        *
4  *                                                                         *
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.                                   *
9  *                                                                         *
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.                          *
14  *                                                                         *
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  ***************************************************************************/
20
21 #ifndef ABSTRACTCLIPJOB
22 #define ABSTRACTCLIPJOB
23
24 #include <QObject>
25 #include <QProcess>
26
27 #include "definitions.h"
28
29 enum JOBTYPE { NOJOBTYPE = 0, PROXYJOB = 1, CUTJOB = 2, MLTJOB = 3};
30
31 class AbstractClipJob : public QObject
32 {
33     Q_OBJECT
34
35 public:
36     AbstractClipJob(JOBTYPE type, ClipType cType, const QString &id, const QStringList &parameters);    virtual ~ AbstractClipJob();
37     ClipType clipType;
38     JOBTYPE jobType;
39     QString description;
40     bool replaceClip;
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);
55     
56 protected:
57     ClipJobStatus m_jobStatus;
58     QString m_clipId;
59     QString m_errorMessage;
60     QString m_logDetails;
61     bool m_addClipToProject;
62     QProcess *m_jobProcess;
63     
64 signals:
65     void jobProgress(const QString&, int, int);
66     void cancelRunningJob(const QString &, const stringMap&);
67 };
68
69
70 #endif
71