}
}
-void ProjectItem::setJobStatus(JOBTYPE jobType, CLIPJOBSTATUS status, int progress)
+void ProjectItem::setJobStatus(JOBTYPE jobType, CLIPJOBSTATUS status, int progress, const QString &statusMessage)
{
setData(0, JobTypeRole, jobType);
if (progress > 0) setData(0, JobProgressRole, progress);
else {
setData(0, JobProgressRole, status);
+ setData(0, JobStatusMessage, statusMessage);
+ slotSetToolTip();
}
}
-void ProjectItem::setJobInfo(const QString &statusMessage)
-{
- setData(0, JobStatusMessage, statusMessage);
- slotSetToolTip();
-}
-
void ProjectItem::setConditionalJobStatus(CLIPJOBSTATUS status, JOBTYPE requestedJobType)
{
if (data(0, JobTypeRole).toInt() == requestedJobType) {
static int itemDefaultHeight();
void slotSetToolTip();
/** \brief Set the status of the clip job. */
- void setJobStatus(JOBTYPE jobType, CLIPJOBSTATUS status, int progress = 0);
- /** \brief Set the info string for this clip job. */
- void setJobInfo(const QString &statusMessage);
+ void setJobStatus(JOBTYPE jobType, CLIPJOBSTATUS status, int progress = 0, const QString &statusMessage = QString());
/** \brief Set the status of a clip job if it is of the specified job type. */
void setConditionalJobStatus(CLIPJOBSTATUS status, JOBTYPE requestedJobType);
/** \brief Returns the proxy status for this clip (true means there is a proxy clip). */
connect(m_listView, SIGNAL(showProperties(DocClipBase *)), this, SIGNAL(showClipProperties(DocClipBase *)));
connect(this, SIGNAL(cancelRunningJob(const QString, stringMap )), this, SLOT(slotCancelRunningJob(const QString, stringMap)));
- connect(this, SIGNAL(processLog(const QString, int , int)), this, SLOT(slotProcessLog(const QString, int , int)));
+ connect(this, SIGNAL(processLog(const QString, int , int, const QString)), this, SLOT(slotProcessLog(const QString, int , int, const QString)));
connect(this, SIGNAL(updateJobStatus(const QString &, int, int, const QString &, const QString &, const QString)), this, SLOT(slotUpdateJobStatus(const QString &, int, int, const QString &, const QString &, const QString)));
ProxyJob *job = new ProxyJob(item->clipType(), id, QStringList() << path << item->clipUrl().path() << item->referencedClip()->producerProperty("_exif_orientation") << m_doc->getDocumentProperty("proxyparams").simplified() << QString::number(m_render->frameRenderWidth()) << QString::number(m_render->renderHeight()));
m_jobList.append(job);
- setJobStatus(item, job->jobType, JOBWAITING);
+ setJobStatus(item, job->jobType, JOBWAITING, 0, job->statusMessage());
slotCheckJobProcess();
}
if (!extraParams.isEmpty()) jobParams << extraParams;
CutClipJob *job = new CutClipJob(item->clipType(), id, jobParams);
m_jobList.append(job);
- setJobStatus(item, job->jobType, JOBWAITING);
+ setJobStatus(item, job->jobType, JOBWAITING, 0, job->statusMessage());
slotCheckJobProcess();
}
}
QString destination = job->destination();
- // Get the list of clips that will need to get progress info
+ // Check if the clip is still here
ProjectItem *processingItem = getItemById(job->clipId());
if (processingItem == NULL) {
job->setStatus(JOBDONE);
continue;
}
+ // Set clip status to started
+ emit processLog(job->clipId(), 0, job->jobType, job->statusMessage());
// Make sure destination path is writable
QFile file(destination);
else delete command;
}
-void ProjectList::slotProcessLog(const QString id, int progress, int type)
+void ProjectList::slotProcessLog(const QString id, int progress, int type, const QString message)
{
ProjectItem *item = getItemById(id);
- setJobStatus(item, (JOBTYPE) type, JOBWORKING, progress);
+ setJobStatus(item, (JOBTYPE) type, JOBWORKING, progress, message);
}
void ProjectList::slotProxyCurrentItem(bool doProxy, ProjectItem *itemToProxy)
{
if (item == NULL || (m_abortAllJobs && m_closing)) return;
monitorItemEditing(false);
- item->setJobStatus(jobType, status, progress);
+ item->setJobStatus(jobType, status, progress, statusMessage);
if (status == JOBCRASHED) {
DocClipBase *clip = item->referencedClip();
if (!clip) {
/** @brief Discard a running clip jobs. */
void slotCancelRunningJob(const QString id, stringMap);
/** @brief Update a clip's job status. */
- void slotProcessLog(const QString, int progress, int);
+ void slotProcessLog(const QString, int progress, int, const QString = QString());
/** @brief A clip job crashed, inform user. */
void slotUpdateJobStatus(const QString &id, int type, int status, const QString &label, const QString &actionName, const QString details);
void slotUpdateJobStatus(ProjectItem *item, int type, int status, const QString &label, const QString &actionName = QString(), const QString details = QString());
/** @brief Set number of running jobs. */
void jobCount(int);
void cancelRunningJob(const QString, stringMap);
- void processLog(const QString, int , int);
+ void processLog(const QString, int , int, const QString = QString());
void addClip(const QString, const QString &, const QString &);
void updateJobStatus(const QString, int, int, const QString &label = QString(), const QString &actionName = QString(), const QString details = QString());
void checkJobProcess();