mirror-chatterino2/src/widgets/dialogs/BadgePickerDialog.hpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

34 lines
650 B
C++
Raw Normal View History

#pragma once
#include "util/DisplayBadge.hpp"
#include <boost/optional.hpp>
#include <QComboBox>
#include <QDialog>
#include <memory>
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