-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCustomDialog.cpp
33 lines (25 loc) · 909 Bytes
/
CustomDialog.cpp
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
#include "CustomDialog.h"
CustomDialog::CustomDialog(QWidget *parent) :
QDialog(parent)
{
QFormLayout *layout = new QFormLayout;
characterLineEdit = new QLineEdit;
messageLineEdit = new QLineEdit;
messagePropertiesLineEdit = new QLineEdit; //test
layout->addRow(new QLabel("Character:"), characterLineEdit);
layout->addRow(new QLabel("Message:"), messageLineEdit);
layout->addRow(new QLabel("Message Properties:"), messagePropertiesLineEdit);
QPushButton *button = new QPushButton("Submit");
layout->addWidget(button);
connect(button, &QPushButton::clicked, this, &QDialog::accept);
setLayout(layout);
}
QString CustomDialog::getCharacter() {
return characterLineEdit->text();
}
QString CustomDialog::getMessage() {
return messageLineEdit->text();
}
QString CustomDialog::getMessageProperties() {
return messagePropertiesLineEdit->text();
}