2017-12-11 00:59:50 +03:00
|
|
|
#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;
|
2018-01-16 23:50:47 +03:00
|
|
|
void showEvent(QShowEvent *event) override;
|
2017-12-11 00:59:50 +03:00
|
|
|
|
|
|
|
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
|