]> git.sesse.net Git - kdenlive/blobdiff - src/projectlist.h
Moving widget files into widgets folder.
[kdenlive] / src / projectlist.h
index 9ba4b355408113be9533451704263f76d1236fe8..ca6a1026370002bc6971c685c66788550147de6e 100644 (file)
@@ -27,7 +27,6 @@
 #include <QToolButton>
 #include <QTreeWidget>
 #include <QPainter>
-#include <QStyledItemDelegate>
 #include <QUndoStack>
 #include <QTimer>
 #include <QApplication>
@@ -52,7 +51,6 @@
 #include <nepomuk2/resource.h>
 #endif
 
-
 #include "definitions.h"
 #include "timecode.h"
 #include "kdenlivesettings.h"
@@ -101,10 +99,7 @@ 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 SmallInfoLabel: public QPushButton
 {
@@ -113,6 +108,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,19 +124,6 @@ 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