]> git.siccegge.de Git - frida/frida.git/blob - src/gui/dialogs/SimpleStringDialog.cxx
Color logmessages according to severity
[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 QString result = edit->text();
24 return result;
25 }