]> git.siccegge.de Git - frida/frida.git/blob - src/gui/dialogs/NewFunctionDialog.cxx
Add doc repo as submodule
[frida/frida.git] / src / gui / dialogs / NewFunctionDialog.cxx
1 #include "NewFunctionDialog.hxx"
2
3 NewFunctionDialog::NewFunctionDialog() {
4 QGridLayout * layout = new QGridLayout;
5
6 edit = new QLineEdit;
7 layout->addWidget(edit, 0, 0, 1, 2);
8 edit->setInputMask("\\0\\xhhhhhhhhhhhhhhhH");
9
10 QPushButton * cancelButton = new QPushButton("Cancel");
11 QPushButton * okButton = new QPushButton("OK");
12 layout->addWidget(okButton, 1, 1, 1, 1);
13 connect(okButton, SIGNAL(clicked()),
14 this, SLOT(accept()));
15 layout->addWidget(cancelButton, 1, 0, 1, 1);
16 connect(cancelButton, SIGNAL(clicked()),
17 this, SLOT(reject()));
18
19 setLayout(layout);
20 setWindowTitle("Add function");
21 }
22
23 uint64_t NewFunctionDialog::result() {
24 bool ok;
25 uint64_t result = edit->text().toLongLong(&ok, 16);
26 return result;
27 }