X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fprojectlist.h;h=bd80c8b8324314c5c4e7ba1529c516057b808f36;hb=a3eee7be24126f5a3458d488f44cd61c66135e17;hp=9ba4b355408113be9533451704263f76d1236fe8;hpb=8be6c85ffd189c228938a982d0d6a5f97650481a;p=kdenlive diff --git a/src/projectlist.h b/src/projectlist.h index 9ba4b355..bd80c8b8 100644 --- a/src/projectlist.h +++ b/src/projectlist.h @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include @@ -52,7 +51,6 @@ #include #endif - #include "definitions.h" #include "timecode.h" #include "kdenlivesettings.h" @@ -101,10 +99,8 @@ class Render; class KdenliveDoc; class DocClipBase; class AbstractClipJob; - -const int NameRole = Qt::UserRole; -const int DurationRole = NameRole + 1; -const int UsageRole = NameRole + 2; +class ItemDelegate; +class QGLWidget; class SmallInfoLabel: public QPushButton { @@ -113,6 +109,12 @@ public: SmallInfoLabel(QWidget *parent = 0); static const QString getStyleSheet(const QPalette &p); private: + enum ItemRole { + NameRole = Qt::UserRole, + DurationRole, + UsageRole + }; + QTimeLine* m_timeLine; public slots: @@ -123,25 +125,12 @@ private slots: void slotTimeLineFinished(); }; - -class ItemDelegate: public QStyledItemDelegate -{ -public: - ItemDelegate(QAbstractItemView* parent = 0): QStyledItemDelegate(parent) { - } - - /*void drawFocus(QPainter *, const QStyleOptionViewItem &, const QRect &) const { - }*/ - - void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const; -}; - class ProjectList : public QWidget { Q_OBJECT public: - ProjectList(QWidget *parent = 0); + ProjectList(QGLWidget *glContext, QWidget *parent = 0); virtual ~ProjectList(); QDomElement producersList(); @@ -292,6 +281,7 @@ private: /** @brief The action that will trigger the log dialog. */ QAction *m_logAction; #endif + QGLWidget *m_mainGLContext; void requestClipThumbnail(const QString &id); @@ -319,7 +309,7 @@ private: * @param status The job status (see definitions.h) * @param progress The job progress (in percents) * @param statusMessage The job info message */ - void setJobStatus(ProjectItem *item, JOBTYPE jobType, CLIPJOBSTATUS status, int progress = 0, const QString &statusMessage = QString()); + void setJobStatus(ProjectItem *item, JOBTYPE jobType, ClipJobStatus status, int progress = 0, const QString &statusMessage = QString()); void monitorItemEditing(bool enable); /** @brief Get cached thumbnail for a project's clip or create it if no cache. */ void getCachedThumbnail(ProjectItem *item);