2017-12-12 00:00:37 +03:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <QFrame>
|
|
|
|
|
|
|
|
#include <mtx.hpp>
|
|
|
|
|
|
|
|
class FlatButton;
|
|
|
|
class TextField;
|
|
|
|
class QComboBox;
|
|
|
|
class Toggle;
|
|
|
|
|
|
|
|
namespace dialogs {
|
|
|
|
|
|
|
|
class CreateRoom : public QFrame
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
CreateRoom(QWidget *parent = nullptr);
|
|
|
|
|
|
|
|
signals:
|
|
|
|
void closing(bool isCreating, const mtx::requests::CreateRoom &request);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
void paintEvent(QPaintEvent *event) override;
|
2018-01-16 23:50:47 +03:00
|
|
|
void showEvent(QShowEvent *event) override;
|
2017-12-12 00:00:37 +03:00
|
|
|
|
|
|
|
private:
|
|
|
|
void clearFields();
|
|
|
|
|
|
|
|
QComboBox *visibilityCombo_;
|
|
|
|
QComboBox *presetCombo_;
|
|
|
|
|
|
|
|
Toggle *directToggle_;
|
|
|
|
|
|
|
|
FlatButton *confirmBtn_;
|
|
|
|
FlatButton *cancelBtn_;
|
|
|
|
|
|
|
|
TextField *nameInput_;
|
|
|
|
TextField *topicInput_;
|
|
|
|
TextField *aliasInput_;
|
|
|
|
|
|
|
|
mtx::requests::CreateRoom request_;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // dialogs
|