]> git.sur5r.net Git - minitube/blobdiff - src/ListModel.h
Imported Upstream version 1.9
[minitube] / src / ListModel.h
old mode 100755 (executable)
new mode 100644 (file)
index c4c078f..f9d424b
@@ -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,9 +73,18 @@ 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<Video*>);
+    void haveSuggestions(const QStringList &suggestions);
 
 private:
     void searchMore(int max);
@@ -86,6 +102,10 @@ private:
     Video *m_activeVideo;
 
     QString errorMessage;
+
+    int hoveredRow;
+    bool authorHovered;
+    bool authorPressed;
 };
 
 #endif