]> git.sur5r.net Git - minitube/blob - src/playlistview.h
Imported Upstream version 2.0
[minitube] / src / playlistview.h
1 #ifndef PLAYLISTVIEW_H
2 #define PLAYLISTVIEW_H
3
4 #include <QtGui>
5
6 class PlaylistView : public QListView {
7
8     Q_OBJECT
9
10 public:
11     PlaylistView(QWidget *parent = 0);
12     void setClickableAuthors(bool enabled) { clickableAuthors = enabled; }
13
14 protected:
15     void leaveEvent(QEvent *event);
16     void mouseMoveEvent(QMouseEvent *event);
17     void mousePressEvent(QMouseEvent *event);
18     void mouseReleaseEvent(QMouseEvent *event);
19
20 signals:
21     void authorPushed(QModelIndex index);
22
23 private slots:
24     void itemEntered(const QModelIndex &index);
25
26 private:
27     bool isHoveringAuthor(QMouseEvent *event);
28     bool isShowMoreItem(const QModelIndex &index);
29     bool isHoveringThumbnail(QMouseEvent *event);
30
31     bool clickableAuthors;
32
33 };
34
35 #endif // PLAYLISTVIEW_H