summary refs log tree commit diff
path: root/src/dialogs/CreateRoom.h
blob: d4c6474d16a145f1e3b7e10dcb3e42e37ef8bf40 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// SPDX-FileCopyrightText: 2021 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later

#pragma once

#include <QFrame>

#include <mtx/requests.hpp>

class QPushButton;
class TextField;
class QComboBox;
class Toggle;

namespace dialogs {

class CreateRoom : public QFrame
{
        Q_OBJECT
public:
        CreateRoom(QWidget *parent = nullptr);

signals:
        void createRoom(const mtx::requests::CreateRoom &request);

protected:
        void showEvent(QShowEvent *event) override;

private:
        void clearFields();

        QComboBox *visibilityCombo_;
        QComboBox *presetCombo_;

        Toggle *directToggle_;

        QPushButton *confirmBtn_;
        QPushButton *cancelBtn_;

        TextField *nameInput_;
        TextField *topicInput_;
        TextField *aliasInput_;

        mtx::requests::CreateRoom request_;
};

} // dialogs