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