]> git.siccegge.de Git - frida/frida.git/blob - src/gui/dialogs/SimpleStringDialog.cxx
Add option to comment on instructions (in GUI)
[frida/frida.git] / src / gui / dialogs / SimpleStringDialog.cxx
1 #include "SimpleStringDialog.hxx"
2
3 SimpleStringDialog::SimpleStringDialog(const QString& title) {
4 QGridLayout * layout = new QGridLayout;
5
6 edit = new QLineEdit;
7 layout->addWidget(edit, 0, 0, 1, 2);
8
9 QPushButton * cancelButton = new QPushButton("Cancel");
10 QPushButton * okButton = new QPushButton("OK");
11 layout->addWidget(okButton, 1, 1, 1, 1);
12 connect(okButton, SIGNAL(clicked()),
13 this, SLOT(accept()));
14 layout->addWidget(cancelButton, 1, 0, 1, 1);
15 connect(cancelButton, SIGNAL(clicked()),
16 this, SLOT(reject()));
17
18 setLayout(layout);
19 setWindowTitle(title);
20 }
21
22 QString SimpleStringDialog::result() {
23 bool ok;
24 QString result = edit->text();
25 return result;
26 }