#ifndef MEMBERPICKERDIALOG_H #define MEMBERPICKERDIALOG_H #include "../models.h" #include QT_BEGIN_NAMESPACE class QListWidget; QT_END_NAMESPACE /// A simple dialog that shows a checklist of humans and returns the selected emails. class MemberPickerDialog : public QDialog { Q_OBJECT public: explicit MemberPickerDialog(const QString &title, QWidget *parent = nullptr); /// Populate the checklist. Members whose emails appear in `exclude` are hidden. void setMembers(const std::vector &members, const std::vector &exclude = {}); /// Returns the emails of all checked items. QStringList selectedEmails() const; private: QListWidget *m_list; }; #endif // MEMBERPICKERDIALOG_H