| 1 | #include "newbreakpointdialog.h" |
| 2 | #include "ui_newbreakpointdialog.h" |
| 3 | |
| 4 | #include <QDebug> |
| 5 | |
| 6 | NewBreakpointDialog::NewBreakpointDialog(QWidget *parent) : |
| 7 | QDialog(parent), |
| 8 | ui(new Ui::NewBreakpointDialog) |
| 9 | { |
| 10 | ui->setupUi(this); |
| 11 | } |
| 12 | |
| 13 | NewBreakpointDialog::~NewBreakpointDialog() |
| 14 | { |
| 15 | delete ui; |
| 16 | } |
| 17 | |
| 18 | void NewBreakpointDialog::accept() |
| 19 | { |
| 20 | type = ui->typeComboBox->currentIndex() == 0 ? "instr" : "line"; |
| 21 | instr = ui->instrumentSpinBox->value(); |
| 22 | line = ui->lineSpinBox->value(); |
| 23 | if (type == "instr") { |
| 24 | instrline = QString::number(instr); |
| 25 | } else { |
| 26 | instrline = QString("%1:%2").arg(int(instr)).arg(line); |
| 27 | } |
| 28 | skip = ui->skipSpinBox->value(); |
| 29 | QDialog::accept(); |
| 30 | } |
| 31 |