#ifndef CHANNELSVIEW_H
#define CHANNELSVIEW_H
-#include <QtGui>
-#if QT_VERSION >= 0x050000
#include <QtWidgets>
-#endif
+
#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 mousePressEvent(QMouseEvent *event);
- 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);
private:
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