summary refs log tree commit diff
path: root/include/dialogs
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2017-12-10 23:59:50 +0200
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2017-12-10 23:59:50 +0200
commitef0b0f68795786751b04615451d42dbd7b3d7a5d (patch)
treea04f4677032d054d803e0a67929fbfe4d46eb87a /include/dialogs
parentAdd gui option for joining rooms (#25) (diff)
downloadnheko-ef0b0f68795786751b04615451d42dbd7b3d7a5d.tar.xz
Add menu to invite users
Diffstat (limited to 'include/dialogs')
-rw-r--r--include/dialogs/InviteUsers.h41
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