X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Ffolderprojectitem.h;h=c49dfaae529fc642be61b74a9569c4aceac7886d;hb=a3eee7be24126f5a3458d488f44cd61c66135e17;hp=2ed0631b9c813fa741db69f93e81afbc3217703e;hpb=cfb1c21baeae84b6cf51851305c30fa890c6b4a6;p=kdenlive diff --git a/src/folderprojectitem.h b/src/folderprojectitem.h index 2ed0631b..c49dfaae 100644 --- a/src/folderprojectitem.h +++ b/src/folderprojectitem.h @@ -24,6 +24,9 @@ #include #include +#include + +#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() == ProjectFoldeType) + return text(column).toLower() < other.text(column).toLower(); + else return true; + } private: QString m_groupName; QString m_clipId; + }; #endif