X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=src%2FListModel.h;h=2752aab196229dd4b1c4e20d8d2e4adc84322d67;hb=3c8c537559e6bef5f019196b0989e95863ddd3ee;hp=c4c078f41451afadc1d862c9a1c0a843426e59ea;hpb=efec77e73c8eafb7ba1f0b7817567272f02262e5;p=minitube diff --git a/src/ListModel.h b/src/ListModel.h old mode 100755 new mode 100644 index c4c078f..2752aab --- a/src/ListModel.h +++ b/src/ListModel.h @@ -8,7 +8,13 @@ enum DataRoles { ItemTypeRole = Qt::UserRole, VideoRole, - ActiveTrackRole + ActiveTrackRole, + DownloadItemRole, + HoveredItemRole, + DownloadButtonHoveredRole, + DownloadButtonPressedRole, + AuthorHoveredRole, + AuthorPressedRole }; enum ItemTypes { @@ -45,6 +51,7 @@ public: bool rowExists( int row ) const { return (( row >= 0 ) && ( row < videos.size() ) ); } int activeRow() const { return m_activeRow; } // returns -1 if there is no active row int nextRow() const; + int previousRow() const; void removeIndexes(QModelIndexList &indexes); int rowForVideo(Video* video); QModelIndex indexForVideo(Video* video); @@ -66,6 +73,14 @@ public slots: void searchError(QString message); void updateThumbnail(); + void setHoveredRow(int row); + void clearHover(); + void enterAuthorHover(); + void exitAuthorHover(); + void enterAuthorPressed(); + void exitAuthorPressed(); + void updateAuthor(); + signals: void activeRowChanged(int); void needSelectionFor(QList); @@ -86,6 +101,10 @@ private: Video *m_activeVideo; QString errorMessage; + + int hoveredRow; + bool authorHovered; + bool authorPressed; }; #endif