]> git.sesse.net Git - kdenlive/blobdiff - src/folderprojectitem.cpp
Show the track type in add track dialog through icons in the track list
[kdenlive] / src / folderprojectitem.cpp
index aa628c3105872f43470b183763c688546eceab5e..b9b33b11d0a32e4dcc4b88db27a07610f5c87af3 100644 (file)
 
 FolderProjectItem::FolderProjectItem(QTreeWidget * parent, const QStringList & strings, const QString &clipId) :
         QTreeWidgetItem(parent, strings, PROJECTFOLDERTYPE),
-        m_groupName(strings.at(1)),
+        m_groupName(strings.at(0)),
         m_clipId(clipId)
 {
     setSizeHint(0, QSize(65, QFontInfo(font(1)).pixelSize() * 2));
     setFlags(Qt::ItemIsSelectable | Qt::ItemIsDragEnabled | Qt::ItemIsEnabled | Qt::ItemIsEditable);
-    setIcon(0, KIcon("folder").pixmap(sizeHint(0)));
-    setToolTip(1, "<b>" + i18n("Folder"));
+    setData(0, Qt::DecorationRole, KIcon("folder").pixmap(sizeHint(0)));
+    //setIcon(0, KIcon("folder").pixmap(sizeHint(0)));
+    setToolTip(0, "<b>" + i18n("Folder"));
     //setFlags(Qt::NoItemFlags);
     //kDebug() << "Constructed with clipId: " << m_clipId;
 }
@@ -56,7 +57,7 @@ const QString FolderProjectItem::groupName() const
 void FolderProjectItem::setGroupName(const QString name)
 {
     m_groupName = name;
-    setText(1, name);
+    setText(0, name);
 }