]> git.sesse.net Git - kdenlive/blobdiff - src/folderprojectitem.h
const'ref. Fix coding style. Minor optimization
[kdenlive] / src / folderprojectitem.h
index 2ed0631b9c813fa741db69f93e81afbc3217703e..9d277a2f4a4cc39cd25c32723e413c7aecd8e086 100644 (file)
@@ -24,6 +24,9 @@
 #include <QTreeWidgetItem>
 #include <QTreeWidget>
 
+#include <KDebug>
+
+#include "definitions.h"
 
 /** \brief Represents a clip or a folder in the projecttree
  *
@@ -36,10 +39,20 @@ public:
     QString clipId() const;
     const QString groupName() const;
     void setGroupName(const QString name);
+    void switchIcon();
+
+    /** Make sure folders appear on top of the tree widget */
+    virtual bool operator<(const QTreeWidgetItem &other)const {
+        int column = treeWidget()->sortColumn();
+        if (other.type() == PROJECTFOLDERTYPE)
+            return text(column).toLower() < other.text(column).toLower();
+        else return true;
+    }
 
 private:
     QString m_groupName;
     QString m_clipId;
+
 };
 
 #endif