1 #pragma once
2 
3 #include "util/DisplayBadge.hpp"
4 
5 #include <QComboBox>
6 #include <QDialog>
7 #include <boost/optional.hpp>
8 
9 namespace chatterino {
10 
11 class BadgePickerDialog : public QDialog,
12                           public std::enable_shared_from_this<BadgePickerDialog>
13 {
14     using QIconPtr = std::shared_ptr<QIcon>;
15     using BadgeOpt = boost::optional<DisplayBadge>;
16 
17 public:
18     BadgePickerDialog(QList<DisplayBadge> badges, QWidget *parent = nullptr);
19 
getSelection() const20     BadgeOpt getSelection() const
21     {
22         return this->currentBadge_;
23     }
24 
25 private:
26     QComboBox *dropdown_;
27 
28     BadgeOpt currentBadge_;
29 };
30 
31 }  // namespace chatterino
32