UEFITool 0.18.3

- added pattern-based search for hex patterns, '.' (dot) means "any hex
digit"
- added pattern-based search for GUIDs
- added copy action for messages
- focus is now setting properly for all search window tabs
This commit is contained in:
Nikolaj Schlej 2014-07-14 00:38:34 +02:00
parent fd578a8c70
commit 6e1f226aa0
8 changed files with 274 additions and 64 deletions

View file

@ -15,13 +15,34 @@
SearchDialog::SearchDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::SearchDialog)
ui(new Ui::SearchDialog),
hexValidator(QRegExp("([0-9a-fA-F\\.])*")),
guidValidator(QRegExp("[0-9a-fA-F\\.]{8}-[0-9a-fA-F\\.]{4}-[0-9a-fA-F\\.]{4}-[0-9a-fA-F\\.]{4}-[0-9a-fA-F\\.]{12}"))
{
// Create UI
ui->setupUi(this);
ui->hexEdit->setValidator(&hexValidator);
ui->guidEdit->setValidator(&guidValidator);
// Connect
connect(ui->tabWidget, SIGNAL(currentChanged(int)), this, SLOT(setEditFocus(int)));
// Set initial focus
setEditFocus(ui->tabWidget->currentIndex());
}
SearchDialog::~SearchDialog()
{
delete ui;
}
void SearchDialog::setEditFocus(int index)
{
if (index == 0) // Hex pattern
ui->hexEdit->setFocus();
else if (index == 1) // GUID
ui->guidEdit->setFocus();
else if (index == 2) // Text
ui->textEdit->setFocus();
}