mirror-chatterino2/src/widgets/listview/GenericListView.hpp
fourtf 50da694fff
Stable (#1905)
* fixed SearchWindow memory leak

* Update CHANGELOG.md

* added DebugCount for BaseWindow

* [Bug Fix] Color of second user highlight cannot be set (#1898)

* Highlighting: Fix bug preventing user highlight from being set

Before this commit, only the row of a clicked cell was checked, but not
the tab it was clicked in.

Since the "Whispers" row is the second row in the "Messages" tab on the
highlighting page, the color picker was not opened for the second entry
in the "Users" tab either. This commit fixes the bug by also checking
tab the cell was clicked in.

* Update CHANGELOG.md

* Emote Popup Improvements (#1895)

* Put exact matching emotes first

* Close GenericListView on Escape press

* smol fix

* fixed emote input when not in the first char

* fixes #1902

* closes #1904

Co-authored-by: Leon Richardt <leon.richardt@gmail.com>
Co-authored-by: Daniel <24928223+dnsge@users.noreply.github.com>
2020-08-23 11:28:22 +02:00

37 lines
716 B
C++

#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 *);
void setInvokeActionOnTab(bool);
bool eventFilter(QObject *watched, QEvent *event) override;
GenericListModel *model_{};
SwitcherItemDelegate itemDelegate_;
void refreshTheme(const Theme &theme);
signals:
void closeRequested();
private:
bool invokeActionOnTab_{};
};
} // namespace chatterino