2017-12-12 00:00:37 +03:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <QFrame>
|
|
|
|
|
|
|
|
#include <mtx.hpp>
|
|
|
|
|
2018-09-19 22:42:26 +03:00
|
|
|
class QPushButton;
|
2017-12-12 00:00:37 +03:00
|
|
|
class TextField;
|
|
|
|
class QComboBox;
|
|
|
|
class Toggle;
|
|
|
|
|
|
|
|
namespace dialogs {
|
|
|
|
|
|
|
|
class CreateRoom : public QFrame
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
CreateRoom(QWidget *parent = nullptr);
|
|
|
|
|
|
|
|
signals:
|
2018-09-19 22:42:26 +03:00
|
|
|
void createRoom(const mtx::requests::CreateRoom &request);
|
2017-12-12 00:00:37 +03:00
|
|
|
|
|
|
|
protected:
|
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_;
|
|
|
|
|
2018-09-19 22:42:26 +03:00
|
|
|
QPushButton *confirmBtn_;
|
|
|
|
QPushButton *cancelBtn_;
|
2017-12-12 00:00:37 +03:00
|
|
|
|
|
|
|
TextField *nameInput_;
|
|
|
|
TextField *topicInput_;
|
|
|
|
TextField *aliasInput_;
|
|
|
|
|
|
|
|
mtx::requests::CreateRoom request_;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // dialogs
|