| 2 | #include "ui_searchwidget.h" |
| 3 | |
| 4 | SearchWidget::SearchWidget(const QString &line, int type, QWidget *parent) : QDialog{parent}, ui(new Ui::searchwidget) { |
| 5 | m_searchType = type; |
| 6 | bool mode = (type == Hex); |
| 7 | ui->setupUi(this); |
| 8 | |
| 9 | ui->searchEdit->setText(line); |
| 10 | ui->searchEdit->selectAll(); |
| 11 | |
| 12 | ui->radioHEX->setChecked(mode); |
| 13 | ui->radioASCII->setChecked(!mode); |
| 14 | |
| 15 | connect(ui->buttonCancel, &QPushButton::clicked, this, &SearchWidget::close); |
| 16 | connect(ui->buttonFind, &QPushButton::clicked, this, &SearchWidget::findNext); |
| 17 | connect(ui->radioASCII, &QRadioButton::clicked, this, &SearchWidget::changeInputASCII); |
| 18 | connect(ui->radioHEX, &QRadioButton::clicked, this, &SearchWidget::changeInputHEX); |
| 19 | connect(ui->buttonFindNot, &QPushButton::clicked, this, &SearchWidget::findNextNot); |
| 20 | connect(ui->buttonPrev, &QPushButton::clicked, this, &SearchWidget::findPrev); |
| 21 | connect(ui->buttonPrevNot, &QPushButton::clicked, this, &SearchWidget::findPrevNot); |
| 22 | } |
| 23 | |
| 24 | SearchWidget::~SearchWidget() { |
| 25 | delete ui; |
nothing calls this directly
no outgoing calls
no test coverage detected