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