2020-08-15 18:59:17 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <QListView>
|
|
|
|
#include "widgets/listview/GenericItemDelegate.hpp"
|
|
|
|
#include "widgets/listview/GenericListItem.hpp"
|
|
|
|
|
|
|
|
namespace chatterino {
|
|
|
|
|
|
|
|
class GenericListModel;
|
|
|
|
class Theme;
|
|
|
|
|
|
|
|
class GenericListView : public QListView
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
GenericListView();
|
|
|
|
|
|
|
|
virtual void setModel(QAbstractItemModel *model) override;
|
|
|
|
void setModel(GenericListModel *);
|
2020-08-23 11:28:22 +02:00
|
|
|
void setInvokeActionOnTab(bool);
|
2020-08-15 18:59:17 +02:00
|
|
|
bool eventFilter(QObject *watched, QEvent *event) override;
|
|
|
|
|
|
|
|
GenericListModel *model_{};
|
|
|
|
SwitcherItemDelegate itemDelegate_;
|
|
|
|
|
|
|
|
void refreshTheme(const Theme &theme);
|
|
|
|
|
|
|
|
signals:
|
|
|
|
void closeRequested();
|
2020-08-23 11:28:22 +02:00
|
|
|
|
|
|
|
private:
|
|
|
|
bool invokeActionOnTab_{};
|
2020-08-15 18:59:17 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace chatterino
|