X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fprojectlist.h;h=6f763906afc9b7f409d54629eac8ce2791427967;hb=45562081dc35cc2e1cebdf867094245b705d2a94;hp=49bccdf0e87374f87c74e332bdc6b876378a2eb5;hpb=09194484c415d7a7645bcf7c2245cc753059ea4c;p=kdenlive diff --git a/src/projectlist.h b/src/projectlist.h index 49bccdf0..6f763906 100644 --- a/src/projectlist.h +++ b/src/projectlist.h @@ -168,31 +168,28 @@ public: QString subText = index.data(DurationRole).toString(); int usage = index.data(UsageRole).toInt(); if (usage != 0) subText.append(QString(" (%1)").arg(usage)); - if (option.state & (QStyle::State_Selected)) painter->setPen(option.palette.color(QPalette::Mid)); QRectF bounding; painter->drawText(r2, Qt::AlignLeft | Qt::AlignVCenter , subText, &bounding); - int jobProgress = index.data(Qt::UserRole + 5).toInt(); if (jobProgress != 0 && jobProgress != JOBDONE && jobProgress != JOBABORTED) { if (jobProgress != JOBCRASHED) { // Draw job progress bar QColor color = option.palette.alternateBase().color(); - painter->setPen(Qt::NoPen); - color.setAlpha(180); - painter->setBrush(QBrush(color)); - QRect progress(pixmapPoint.x() + 1, pixmapPoint.y() + pixmap.height() - 9, pixmap.width() - 2, 8); - painter->drawRect(progress); - painter->setBrush(option.palette.text()); - if (jobProgress > 0) { - progress.adjust(1, 1, 0, -1); - progress.setWidth((pixmap.width() - 4) * jobProgress / 100); - painter->drawRect(progress); - } else if (jobProgress == JOBWAITING) { - // Draw kind of a pause icon - progress.adjust(1, 1, 0, -1); - progress.setWidth(2); - painter->drawRect(progress); - progress.moveLeft(progress.right() + 2); + color.setAlpha(150); + painter->setPen(option.palette.link().color()); + QRect progress(pixmapPoint.x() + 2, pixmapPoint.y() + pixmap.height() - 9, pixmap.width() - 4, 7); + painter->setBrush(QBrush(color)); + painter->drawRect(progress); + painter->setBrush(option.palette.link()); + progress.adjust(2, 2, -2, -2); + if (jobProgress == JOBWAITING) { + progress.setLeft(progress.right() - 2); + painter->drawRect(progress); + progress.moveLeft(progress.left() - 5); + painter->drawRect(progress); + } + else if (jobProgress > 0) { + progress.setWidth(progress.width() * jobProgress / 100); painter->drawRect(progress); } } else if (jobProgress == JOBCRASHED) { @@ -245,8 +242,8 @@ public: void setupGeneratorMenu(const QHash& menus); QString currentClipUrl() const; KUrl::List getConditionalUrls(const QString &condition) const; - /** @brief Get a list of selected clip Id's that match a condition. */ - QStringList getConditionalIds(const QString &condition) const; + /** @brief Get a list of selected clip Id's and url's that match a condition. */ + QMap getConditionalIds(const QString &condition) const; QDomDocument generateTemplateXml(QString data, const QString &replaceString); void cleanup(); void trashUnusedClips(); @@ -351,7 +348,7 @@ private: QAction *m_discardCurrentClipJobs; QMenu *m_extractAudioAction; QMenu *m_transcodeAction; - QMenu *m_stabilizeAction; + QMenu *m_clipsActionsMenu; KdenliveDoc *m_doc; ItemDelegate *m_listViewDelegate; /** @brief False if we have not yet finished opening the document. */ @@ -366,6 +363,7 @@ private: QList m_thumbnailQueue; QAction *m_proxyAction; QMutex m_jobMutex; + QMutex m_processMutex; bool m_abortAllJobs; /** @brief We are cleaning up the project list, so stop processing signals. */ bool m_closing; @@ -425,7 +423,14 @@ private: /** @brief Get the list of job names for current clip. */ QStringList getPendingJobs(const QString &id); /** @brief Start an MLT process job. */ - void processClipJob(QStringList ids, const QString&destination, bool autoAdd, QStringList jobParams, const QString &description, QMap extraParams = QMap ()); + void processClipJob(QStringList ids, const QString&destination, bool autoAdd, QStringList jobParams, const QString &description, stringMap extraParams = stringMap()); + /** @brief Create rounded shape pixmap for project tree thumb. */ + QPixmap roundedPixmap(QImage img); + QPixmap roundedPixmap(QPixmap source); + /** @brief Extract a clip's metadata with the exiftool program. */ + void extractMetadata(DocClipBase *clip); + /** @brief Add a special FFmpeg tag if clip matches some properties (for example set full_luma for Sony NEX camcorders. */ + //void checkCamcorderFilters(DocClipBase *clip, QMap meta); private slots: void slotClipSelected(); @@ -501,7 +506,7 @@ signals: void showClipProperties(QList , QMap commonproperties); void projectModified(); void loadingIsOver(); - void displayMessage(const QString, int progress); + void displayMessage(const QString, int progress, MessageType type = DefaultMessage); void clipNameChanged(const QString, const QString); void clipNeedsReload(const QString&); /** @brief A property affecting display was changed, so we need to update monitors and thumbnails