#ifndef CHANNELSVIEW_H
#define CHANNELSVIEW_H
-#include <QtGui>
+#include <QtWidgets>
+
#include "view.h"
class VideoSource;
class ChannelModel;
+class ChannelListView;
-class ChannelView : public QListView, public View {
-
+class ChannelView : public View {
Q_OBJECT
public:
- ChannelView(QWidget *parent = 0);
-
+ ChannelView(QWidget *parent = nullptr);
+
signals:
void activated(VideoSource *videoSource);
void appear();
void disappear();
-protected:
- void mouseMoveEvent(QMouseEvent *event);
- void leaveEvent(QEvent *event);
- void paintEvent(QPaintEvent *event);
-
private:
enum SortBy {
SortByName = 0,
};
private slots:
- void itemEntered(const QModelIndex &index);
void itemActivated(const QModelIndex &index);
+ void showContextMenu(const QPoint &point);
void toggleShowUpdated(bool enable);
void setSortBy(SortBy sortBy);
void setSortByName() { setSortBy(SortByName); }
void setSortByMostWatched() { setSortBy(SortByMostWatched); }
void markAllAsWatched();
void unwatchedCountChanged(int count);
+ void updateQuery(bool transition = false);
private:
- void updateQuery(bool transition = false);
void setupActions();
+ QString noSubscriptionsMessage();
+ ChannelListView *listView;
ChannelModel *channelsModel;
- QList<QAction*> statusActions;
+ QVector<QAction *> statusActions;
bool showUpdated;
SortBy sortBy;
- QString errorMessage;
QAction *markAsWatchedAction;
-
};
#endif // CHANNELSVIEW_H