matrixion/src/dialogs/CreateRoom.h

45 lines
766 B
C
Raw Normal View History

2017-12-12 00:00:37 +03:00
#pragma once
#include <QFrame>
2020-01-31 19:00:13 +03:00
#include <mtx/requests.hpp>
2017-12-12 00:00:37 +03:00
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:
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