Add ability to highlight messages based on user badges (#1704)

Co-authored-by: Paweł <zneix@zneix.eu>
Co-authored-by: 23rd <23rd@vivaldi.net>
Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
Daniel
2021-05-02 18:08:08 -04:00
committed by GitHub
parent 6ab5b13017
commit f6d9fb2aac
34 changed files with 956 additions and 115 deletions
+29
View File
@@ -0,0 +1,29 @@
#pragma once
#include "util/DisplayBadge.hpp"
#include <QDialog>
namespace chatterino {
class BadgePickerDialog : public QDialog,
public std::enable_shared_from_this<BadgePickerDialog>
{
using QIconPtr = std::shared_ptr<QIcon>;
using BadgeOpt = boost::optional<DisplayBadge>;
public:
BadgePickerDialog(QList<DisplayBadge> badges, QWidget *parent = nullptr);
BadgeOpt getSelection() const
{
return this->currentBadge_;
}
private:
QComboBox *dropdown_;
BadgeOpt currentBadge_;
};
} // namespace chatterino