mirror of
https://github.com/LongSoft/UEFITool.git
synced 2025-05-12 22:26:13 -04:00
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:
parent
fd578a8c70
commit
6e1f226aa0
8 changed files with 274 additions and 64 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue