X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fprojectlist.h;h=021058dc32f10dd34dcaa8a97012bded68e4a63f;hb=7a75f3504dd1ca2d84ee4e46e6cb1b4eca2e509d;hp=8ed251afc507455e7f1a3c9b11f2090a3a7199d6;hpb=4329ed5f483544c2da48d8a5ba04e39a6a47376c;p=kdenlive diff --git a/src/projectlist.h b/src/projectlist.h index 8ed251af..021058dc 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) { @@ -330,7 +327,8 @@ public slots: /** @brief Start transcoding selected clips. */ void slotTranscodeClipJob(const QString &condition, QString params, QString desc); /** @brief Start an MLT process job. */ - void slotStartFilterJob(ItemInfo, const QString&,const QString&,const QString&,const QString&,const QString&,const QString&,const QString&); + void slotStartFilterJob(ItemInfo, const QString&,const QString&,const QString&,const QString&,const QString&,const QMap &); + void slotSetThumbnail(const QString &id, int framePos, QImage img); private: @@ -350,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. */ @@ -365,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; @@ -424,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); + 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(); @@ -490,6 +496,8 @@ private slots: void slotResetInfoMessage(); /** @brief close warning info passive popup. */ void slotClosePopup(); + /** @brief process clip job result. */ + void slotGotFilterJobResults(QString ,int , int, stringMap, stringMap); signals: void clipSelected(DocClipBase *, QPoint zone = QPoint(), bool forceUpdate = false); @@ -498,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 @@ -512,7 +520,7 @@ signals: void updateProfile(const QString &); void processNextThumbnail(); /** @brief Activate the clip monitor. */ - void raiseClipMonitor(); + void raiseClipMonitor(bool forceRefresh); /** @brief Set number of running jobs. */ void jobCount(int); void cancelRunningJob(const QString, stringMap); @@ -522,8 +530,10 @@ signals: void gotProxy(const QString); void checkJobProcess(); /** @brief A Filter Job produced results, send them back to the clip. */ - void gotFilterJobResults(const QString &id, int startPos, int track, const QString &filterName, stringMap params); + void gotFilterJobResults(const QString &id, int startPos, int track, stringMap params, stringMap extra); void pauseMonitor(); + void updateAnalysisData(DocClipBase *); + void addMarkers(const QString &, QList ); }; #endif