diff options
author | Konstantinos Sideris <sideris.konstantin@gmail.com> | 2017-12-10 23:59:50 +0200 |
---|---|---|
committer | Konstantinos Sideris <sideris.konstantin@gmail.com> | 2017-12-10 23:59:50 +0200 |
commit | ef0b0f68795786751b04615451d42dbd7b3d7a5d (patch) | |
tree | a04f4677032d054d803e0a67929fbfe4d46eb87a /include/dialogs | |
parent | Add gui option for joining rooms (#25) (diff) | |
download | nheko-ef0b0f68795786751b04615451d42dbd7b3d7a5d.tar.xz |
Add menu to invite users
Diffstat (limited to 'include/dialogs')
-rw-r--r-- | include/dialogs/InviteUsers.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/include/dialogs/InviteUsers.h b/include/dialogs/InviteUsers.h new file mode 100644 index 00000000..236a2558 --- /dev/null +++ b/include/dialogs/InviteUsers.h @@ -0,0 +1,41 @@ +#pragma once + +#include <QFrame> +#include <QLabel> +#include <QListWidgetItem> +#include <QStringList> + +class FlatButton; +class TextField; +class QListWidget; + +namespace dialogs { + +class InviteUsers : public QFrame +{ + Q_OBJECT +public: + explicit InviteUsers(QWidget *parent = nullptr); + +protected: + void paintEvent(QPaintEvent *event) override; + +signals: + void closing(bool isLeaving, QStringList invitees); + +private slots: + void removeInvitee(QListWidgetItem *item); + +private: + void addUser(); + QStringList invitedUsers() const; + + FlatButton *confirmBtn_; + FlatButton *cancelBtn_; + + TextField *inviteeInput_; + QLabel *errorLabel_; + + QListWidget *inviteeList_; +}; +} // dialogs |