nheko/src/dialogs/InviteUsers.h

42 lines
745 B
C
Raw Normal View History

2017-12-10 22:59:50 +01:00
#pragma once
#include <QFrame>
#include <QLabel>
#include <QListWidgetItem>
#include <QStringList>
2018-09-19 21:42:26 +02:00
class QPushButton;
2017-12-10 22:59:50 +01:00
class TextField;
class QListWidget;
namespace dialogs {
class InviteUsers : public QFrame
{
Q_OBJECT
public:
explicit InviteUsers(QWidget *parent = nullptr);
protected:
void showEvent(QShowEvent *event) override;
2017-12-10 22:59:50 +01:00
signals:
2018-09-19 21:42:26 +02:00
void sendInvites(QStringList invitees);
2017-12-10 22:59:50 +01:00
private slots:
void removeInvitee(QListWidgetItem *item);
private:
void addUser();
QStringList invitedUsers() const;
2018-09-19 21:42:26 +02:00
QPushButton *confirmBtn_;
QPushButton *cancelBtn_;
2017-12-10 22:59:50 +01:00
TextField *inviteeInput_;
QLabel *errorLabel_;
QListWidget *inviteeList_;
};
} // dialogs