mirror of
https://github.com/LongSoft/UEFITool.git
synced 2024-11-24 08:58:23 +08:00
Version 0.10.0
- UI reworked
This commit is contained in:
parent
8a3792d9b5
commit
5592529b33
@ -1295,9 +1295,12 @@ UINT8 FfsEngine::changeCompression(const QModelIndex & index, const UINT8 algori
|
|||||||
if (!index.isValid())
|
if (!index.isValid())
|
||||||
return ERR_INVALID_PARAMETER;
|
return ERR_INVALID_PARAMETER;
|
||||||
|
|
||||||
// Set action for the item
|
// Set compression for the item
|
||||||
treeModel->setItemCompression(algorithm, index);
|
treeModel->setItemCompression(algorithm, index);
|
||||||
|
|
||||||
|
// Set action for the item
|
||||||
|
treeModel->setItemAction(TreeItem::Modify, index);
|
||||||
|
|
||||||
return ERR_SUCCESS;
|
return ERR_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1598,7 +1601,7 @@ UINT8 FfsEngine::reconstruct(const QModelIndex & index, QQueue<QByteArray> & que
|
|||||||
return ERR_NOT_IMPLEMENTED;
|
return ERR_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
// Reconstruct item and it's children recursive
|
// Reconstruct item and it's children recursive
|
||||||
else if (item->action() == TreeItem::Rebuild) {
|
else if (item->action() == TreeItem::Modify || item->action() == TreeItem::Rebuild) {
|
||||||
QQueue<QByteArray> childrenQueue;
|
QQueue<QByteArray> childrenQueue;
|
||||||
|
|
||||||
switch (item->type()) {
|
switch (item->type()) {
|
||||||
|
@ -172,6 +172,8 @@ QVariant TreeItem::data(int column) const
|
|||||||
case 0: //Name
|
case 0: //Name
|
||||||
return itemName;
|
return itemName;
|
||||||
case 1: //Action
|
case 1: //Action
|
||||||
|
if (itemAction == TreeItem::Modify)
|
||||||
|
return "M";
|
||||||
if (itemAction == TreeItem::Remove)
|
if (itemAction == TreeItem::Remove)
|
||||||
return "X";
|
return "X";
|
||||||
if (itemAction == TreeItem::Rebuild)
|
if (itemAction == TreeItem::Rebuild)
|
||||||
@ -293,7 +295,4 @@ void TreeItem::setAction(const UINT8 action)
|
|||||||
void TreeItem::setCompression(const UINT8 algorithm)
|
void TreeItem::setCompression(const UINT8 algorithm)
|
||||||
{
|
{
|
||||||
itemCompression = algorithm;
|
itemCompression = algorithm;
|
||||||
|
|
||||||
// Set rebuild action
|
|
||||||
setAction(TreeItem::Rebuild);
|
|
||||||
}
|
}
|
@ -31,6 +31,7 @@ public:
|
|||||||
// Action types
|
// Action types
|
||||||
enum ActionTypes {
|
enum ActionTypes {
|
||||||
NoAction = 50,
|
NoAction = 50,
|
||||||
|
Modify,
|
||||||
Remove,
|
Remove,
|
||||||
Rebuild
|
Rebuild
|
||||||
};
|
};
|
||||||
|
212
uefitool.cpp
212
uefitool.cpp
@ -44,10 +44,80 @@ UEFITool::UEFITool(QWidget *parent) :
|
|||||||
// Enable Drag-and-Drop actions
|
// Enable Drag-and-Drop actions
|
||||||
this->setAcceptDrops(true);
|
this->setAcceptDrops(true);
|
||||||
|
|
||||||
|
// Create menus
|
||||||
|
createMenus();
|
||||||
|
|
||||||
// Initialize non-persistent data
|
// Initialize non-persistent data
|
||||||
init();
|
init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void UEFITool::createMenus()
|
||||||
|
{
|
||||||
|
// Capsule
|
||||||
|
capsuleMenu.clear();
|
||||||
|
capsuleMenu.addAction(ui->actionExtract);
|
||||||
|
capsuleMenu.addAction(ui->actionExtractBody);
|
||||||
|
capsuleMenu.addSeparator();
|
||||||
|
capsuleMenu.addAction(ui->actionRebuild);
|
||||||
|
|
||||||
|
// Image
|
||||||
|
imageMenu.clear();
|
||||||
|
imageMenu.addAction(ui->actionExtract);
|
||||||
|
imageMenu.addSeparator();
|
||||||
|
imageMenu.addAction(ui->actionRebuild);
|
||||||
|
|
||||||
|
// Region
|
||||||
|
regionMenu.clear();
|
||||||
|
regionMenu.addAction(ui->actionExtract);
|
||||||
|
regionMenu.addSeparator();
|
||||||
|
regionMenu.addAction(ui->actionRebuild);
|
||||||
|
|
||||||
|
// Padding
|
||||||
|
paddingMenu.clear();
|
||||||
|
paddingMenu.addAction(ui->actionExtract);
|
||||||
|
|
||||||
|
// Volume
|
||||||
|
volumeMenu.clear();
|
||||||
|
volumeMenu.addAction(ui->actionExtract);
|
||||||
|
volumeMenu.addAction(ui->actionExtractBody);
|
||||||
|
volumeMenu.addSeparator();
|
||||||
|
volumeMenu.addAction(ui->actionRebuild);
|
||||||
|
volumeMenu.addSeparator();
|
||||||
|
volumeMenu.addAction(ui->actionInsertInto);
|
||||||
|
volumeMenu.addSeparator();
|
||||||
|
volumeMenu.addAction(ui->actionRemove);
|
||||||
|
|
||||||
|
// File
|
||||||
|
fileMenu.clear();
|
||||||
|
fileMenu.addAction(ui->actionExtract);
|
||||||
|
fileMenu.addAction(ui->actionExtractBody);
|
||||||
|
//fileMenu.addAction(ui->actionExtractUncompressed);
|
||||||
|
fileMenu.addSeparator();
|
||||||
|
fileMenu.addAction(ui->actionRebuild);
|
||||||
|
fileMenu.addSeparator();
|
||||||
|
fileMenu.addAction(ui->actionInsertInto);
|
||||||
|
fileMenu.addAction(ui->actionInsertBefore);
|
||||||
|
fileMenu.addAction(ui->actionInsertAfter);
|
||||||
|
fileMenu.addSeparator();
|
||||||
|
fileMenu.addAction(ui->actionRemove);
|
||||||
|
|
||||||
|
// Section
|
||||||
|
sectionMenu.clear();
|
||||||
|
sectionMenu.addAction(ui->actionExtract);
|
||||||
|
sectionMenu.addAction(ui->actionExtractBody);
|
||||||
|
//sectionMenu.addAction(ui->actionExtractUncompressed);
|
||||||
|
sectionMenu.addSeparator();
|
||||||
|
sectionMenu.addAction(ui->actionRebuild);
|
||||||
|
sectionMenu.addSeparator();
|
||||||
|
sectionMenu.addAction(ui->actionInsertInto);
|
||||||
|
sectionMenu.addAction(ui->actionInsertBefore);
|
||||||
|
sectionMenu.addAction(ui->actionInsertAfter);
|
||||||
|
sectionMenu.addSeparator();
|
||||||
|
sectionMenu.addAction(ui->actionRemove);
|
||||||
|
sectionMenu.addSeparator();
|
||||||
|
sectionMenu.addMenu(ui->menuChangeCompressionTo);
|
||||||
|
}
|
||||||
|
|
||||||
UEFITool::~UEFITool()
|
UEFITool::~UEFITool()
|
||||||
{
|
{
|
||||||
delete ui;
|
delete ui;
|
||||||
@ -103,13 +173,11 @@ void UEFITool::populateUi(const QModelIndex ¤t)
|
|||||||
ui->actionExtract->setDisabled(item->hasEmptyHeader() && item->hasEmptyBody() && item->hasEmptyTail());
|
ui->actionExtract->setDisabled(item->hasEmptyHeader() && item->hasEmptyBody() && item->hasEmptyTail());
|
||||||
ui->actionRebuild->setDisabled(item->hasEmptyHeader() && item->hasEmptyBody() && item->hasEmptyTail());
|
ui->actionRebuild->setDisabled(item->hasEmptyHeader() && item->hasEmptyBody() && item->hasEmptyTail());
|
||||||
ui->actionExtractBody->setDisabled(item->hasEmptyHeader());
|
ui->actionExtractBody->setDisabled(item->hasEmptyHeader());
|
||||||
//ui->actionExtractUncompressed->setEnabled(ffsEngine->isCompressedFile(current));
|
|
||||||
ui->actionRemove->setEnabled(type == TreeItem::Volume || type == TreeItem::File || type == TreeItem::Section);
|
ui->actionRemove->setEnabled(type == TreeItem::Volume || type == TreeItem::File || type == TreeItem::Section);
|
||||||
ui->actionInsertInto->setEnabled(type == TreeItem::Volume || type == TreeItem::File
|
ui->actionInsertInto->setEnabled(type == TreeItem::Volume || (type == TreeItem::File && subtype != EFI_FV_FILETYPE_RAW && subtype != EFI_FV_FILETYPE_PAD)
|
||||||
|| (type == TreeItem::Section && (subtype == EFI_SECTION_COMPRESSION || subtype == EFI_SECTION_GUID_DEFINED || subtype == EFI_SECTION_DISPOSABLE)));
|
|| (type == TreeItem::Section && (subtype == EFI_SECTION_COMPRESSION || subtype == EFI_SECTION_GUID_DEFINED || subtype == EFI_SECTION_DISPOSABLE)));
|
||||||
ui->actionInsertBefore->setEnabled(type == TreeItem::File || type == TreeItem::Section);
|
ui->actionInsertBefore->setEnabled(type == TreeItem::File || type == TreeItem::Section);
|
||||||
ui->actionInsertAfter->setEnabled(type == TreeItem::File || type == TreeItem::Section);
|
ui->actionInsertAfter->setEnabled(type == TreeItem::File || type == TreeItem::Section);
|
||||||
//ui->actionReplace->setEnabled(ffsEngine->isOfType(TreeItem::File, current));
|
|
||||||
ui->menuChangeCompressionTo->setEnabled(type == TreeItem::Section && subtype == EFI_SECTION_COMPRESSION &&
|
ui->menuChangeCompressionTo->setEnabled(type == TreeItem::Section && subtype == EFI_SECTION_COMPRESSION &&
|
||||||
(algorithm == COMPRESSION_ALGORITHM_NONE || COMPRESSION_ALGORITHM_EFI11 || algorithm == COMPRESSION_ALGORITHM_TIANO || algorithm == COMPRESSION_ALGORITHM_LZMA));
|
(algorithm == COMPRESSION_ALGORITHM_NONE || COMPRESSION_ALGORITHM_EFI11 || algorithm == COMPRESSION_ALGORITHM_TIANO || algorithm == COMPRESSION_ALGORITHM_LZMA));
|
||||||
}
|
}
|
||||||
@ -156,12 +224,12 @@ void UEFITool::insert(const UINT8 mode)
|
|||||||
QString path;
|
QString path;
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case TreeItem::Volume:
|
case TreeItem::Volume:
|
||||||
path = QFileDialog::getOpenFileName(this, tr("Select FFS file to insert"),".","FFS file (*.ffs *.bin);;All files (*.*)");
|
path = QFileDialog::getOpenFileName(this, tr("Select FFS file to insert"),".","FFS files (*.ffs *.bin);;All files (*.*)");
|
||||||
objectType = TreeItem::File;
|
objectType = TreeItem::File;
|
||||||
break;
|
break;
|
||||||
case TreeItem::File:
|
case TreeItem::File:
|
||||||
case TreeItem::Section:
|
case TreeItem::Section:
|
||||||
path = QFileDialog::getOpenFileName(this, tr("Select section file to insert"),".","Section file (*.sct *.bin);;All files (*.*)");
|
path = QFileDialog::getOpenFileName(this, tr("Select section file to insert"),".","Section files (*.sct *.bin);;All files (*.*)");
|
||||||
objectType = TreeItem::Section;
|
objectType = TreeItem::Section;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -169,8 +237,7 @@ void UEFITool::insert(const UINT8 mode)
|
|||||||
}
|
}
|
||||||
|
|
||||||
QFileInfo fileInfo = QFileInfo(path);
|
QFileInfo fileInfo = QFileInfo(path);
|
||||||
if (!fileInfo.exists())
|
if (!fileInfo.exists()) {
|
||||||
{
|
|
||||||
ui->statusBar->showMessage(tr("Please select existing file"));
|
ui->statusBar->showMessage(tr("Please select existing file"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -178,8 +245,7 @@ void UEFITool::insert(const UINT8 mode)
|
|||||||
QFile inputFile;
|
QFile inputFile;
|
||||||
inputFile.setFileName(path);
|
inputFile.setFileName(path);
|
||||||
|
|
||||||
if (!inputFile.open(QFile::ReadOnly))
|
if (!inputFile.open(QFile::ReadOnly)) {
|
||||||
{
|
|
||||||
ui->statusBar->showMessage(tr("Can't open file for reading"));
|
ui->statusBar->showMessage(tr("Can't open file for reading"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -261,15 +327,14 @@ void UEFITool::changeToNone()
|
|||||||
|
|
||||||
void UEFITool::about()
|
void UEFITool::about()
|
||||||
{
|
{
|
||||||
QMessageBox::about(this, tr("About UEFITool"), tr(
|
QMessageBox::about(this, tr("About UEFITool"), tr(
|
||||||
"Copyright (c) 2013, Nikolaj Schlej aka CodeRush.\n\n"
|
"Copyright (c) 2013, Nikolaj Schlej aka <b>CodeRush</b>.<br><br>"
|
||||||
"The program is dedicated to RevoGirl. Rest in peace, young genius.\n\n"
|
"The program is dedicated to <b>RevoGirl</b>. Rest in peace, young genius.<br><br>"
|
||||||
"The program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License.\n"
|
"The program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License.<br>"
|
||||||
"The full text of the license may be found at\nhttp://opensource.org/licenses/bsd-license.php\n\n"
|
"The full text of the license may be found at <a href=http://opensource.org/licenses/bsd-license.php>OpenSource.org</a>.<br><br>"
|
||||||
"THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN \"AS IS\" BASIS,\n"
|
"<b>THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN \"AS IS\" BASIS, "
|
||||||
"WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND,\n"
|
"WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, "
|
||||||
"EITHER EXPRESS OR IMPLIED."
|
"EITHER EXPRESS OR IMPLIED.</b>"));
|
||||||
));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void UEFITool::aboutQt()
|
void UEFITool::aboutQt()
|
||||||
@ -284,12 +349,11 @@ void UEFITool::exit()
|
|||||||
|
|
||||||
void UEFITool::saveImageFile()
|
void UEFITool::saveImageFile()
|
||||||
{
|
{
|
||||||
QString path = QFileDialog::getSaveFileName(this, tr("Save BIOS image file"),".","BIOS image file (*.rom *.bin *.cap *.fd *.wph *.efi);;All files (*.*)");
|
QString path = QFileDialog::getSaveFileName(this, tr("Save BIOS image file"),".","BIOS image files (*.rom *.bin *.cap *.fd *.wph *.efi);;All files (*.*)");
|
||||||
|
|
||||||
QFile outputFile;
|
QFile outputFile;
|
||||||
outputFile.setFileName(path);
|
outputFile.setFileName(path);
|
||||||
if (!outputFile.open(QFile::WriteOnly))
|
if (!outputFile.open(QFile::WriteOnly)) {
|
||||||
{
|
|
||||||
ui->statusBar->showMessage(tr("Can't open file for writing"));
|
ui->statusBar->showMessage(tr("Can't open file for writing"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -297,10 +361,8 @@ void UEFITool::saveImageFile()
|
|||||||
QByteArray reconstructed;
|
QByteArray reconstructed;
|
||||||
UINT8 result = ffsEngine->reconstructImage(reconstructed);
|
UINT8 result = ffsEngine->reconstructImage(reconstructed);
|
||||||
showMessage();
|
showMessage();
|
||||||
if (result)
|
if (result) {
|
||||||
{
|
|
||||||
ui->statusBar->showMessage(tr("Reconstruction failed (%1)").arg(result));
|
ui->statusBar->showMessage(tr("Reconstruction failed (%1)").arg(result));
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -319,15 +381,14 @@ void UEFITool::resizeTreeViewColums()
|
|||||||
|
|
||||||
void UEFITool::openImageFile()
|
void UEFITool::openImageFile()
|
||||||
{
|
{
|
||||||
QString path = QFileDialog::getOpenFileName(this, tr("Open BIOS image file"),".","BIOS image file (*.rom *.bin *.cap *.bio *.fd *.wph *.efi);;All files (*.*)");
|
QString path = QFileDialog::getOpenFileName(this, tr("Open BIOS image file"),".","BIOS image files (*.rom *.bin *.cap *.bio *.fd *.wph *.efi);;All files (*.*)");
|
||||||
openImageFile(path);
|
openImageFile(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
void UEFITool::openImageFile(QString path)
|
void UEFITool::openImageFile(QString path)
|
||||||
{
|
{
|
||||||
QFileInfo fileInfo = QFileInfo(path);
|
QFileInfo fileInfo = QFileInfo(path);
|
||||||
if (!fileInfo.exists())
|
if (!fileInfo.exists()) {
|
||||||
{
|
|
||||||
ui->statusBar->showMessage(tr("Please select existing file"));
|
ui->statusBar->showMessage(tr("Please select existing file"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -335,8 +396,7 @@ void UEFITool::openImageFile(QString path)
|
|||||||
QFile inputFile;
|
QFile inputFile;
|
||||||
inputFile.setFileName(path);
|
inputFile.setFileName(path);
|
||||||
|
|
||||||
if (!inputFile.open(QFile::ReadOnly))
|
if (!inputFile.open(QFile::ReadOnly)) {
|
||||||
{
|
|
||||||
ui->statusBar->showMessage(tr("Can't open file for reading"));
|
ui->statusBar->showMessage(tr("Can't open file for reading"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -365,36 +425,39 @@ void UEFITool::extract(const UINT8 mode)
|
|||||||
UINT8 type = item->type();
|
UINT8 type = item->type();
|
||||||
|
|
||||||
QString path;
|
QString path;
|
||||||
switch (type) {
|
if(mode == EXTRACT_MODE_AS_IS) {
|
||||||
case TreeItem::Capsule:
|
switch (type) {
|
||||||
path = QFileDialog::getSaveFileName(this, tr("Save capsule to binary file"),".","Capsule file (*.cap *.bin);;All files (*.*)");
|
case TreeItem::Capsule:
|
||||||
break;
|
path = QFileDialog::getSaveFileName(this, tr("Save capsule to binary file"),".","Capsule files (*.cap *.bin);;All files (*.*)");
|
||||||
case TreeItem::Image:
|
break;
|
||||||
path = QFileDialog::getSaveFileName(this, tr("Save image to binary file"),".","Image file (*.rom *.bin);;All files (*.*)");
|
case TreeItem::Image:
|
||||||
break;
|
path = QFileDialog::getSaveFileName(this, tr("Save image to binary file"),".","Image files (*.rom *.bin);;All files (*.*)");
|
||||||
case TreeItem::Region:
|
break;
|
||||||
path = QFileDialog::getSaveFileName(this, tr("Save region to binary file"),".","Region file (*.rgn *.bin);;All files (*.*)");
|
case TreeItem::Region:
|
||||||
break;
|
path = QFileDialog::getSaveFileName(this, tr("Save region to binary file"),".","Region files (*.rgn *.bin);;All files (*.*)");
|
||||||
case TreeItem::Padding:
|
break;
|
||||||
path = QFileDialog::getSaveFileName(this, tr("Save padding to binary file"),".","Padding file (*.pad *.bin);;All files (*.*)");
|
case TreeItem::Padding:
|
||||||
break;
|
path = QFileDialog::getSaveFileName(this, tr("Save padding to binary file"),".","Padding files (*.pad *.bin);;All files (*.*)");
|
||||||
case TreeItem::Volume:
|
break;
|
||||||
path = QFileDialog::getSaveFileName(this, tr("Save volume to binary file"),".","Volume file (*.vol *.bin);;All files (*.*)");
|
case TreeItem::Volume:
|
||||||
break;
|
path = QFileDialog::getSaveFileName(this, tr("Save volume to binary file"),".","Volume files (*.vol *.bin);;All files (*.*)");
|
||||||
case TreeItem::File:
|
break;
|
||||||
path = QFileDialog::getSaveFileName(this, tr("Save FFS file to binary file"),".","FFS file (*.ffs *.bin);;All files (*.*)");
|
case TreeItem::File:
|
||||||
break;
|
path = QFileDialog::getSaveFileName(this, tr("Save FFS file to binary file"),".","FFS files (*.ffs *.bin);;All files (*.*)");
|
||||||
case TreeItem::Section:
|
break;
|
||||||
path = QFileDialog::getSaveFileName(this, tr("Select section file to insert"),".","Section file (*.sct *.bin);;All files (*.*)");
|
case TreeItem::Section:
|
||||||
break;
|
path = QFileDialog::getSaveFileName(this, tr("Save section file to binary file"),".","Section files (*.sct *.bin);;All files (*.*)");
|
||||||
default:
|
break;
|
||||||
return;
|
default:
|
||||||
}
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
path = QFileDialog::getSaveFileName(this, tr("Save object to binary file"),".","Binary files (*.bin);;All files (*.*)");
|
||||||
|
|
||||||
QFile outputFile;
|
QFile outputFile;
|
||||||
outputFile.setFileName(path);
|
outputFile.setFileName(path);
|
||||||
if (!outputFile.open(QFile::WriteOnly))
|
if (!outputFile.open(QFile::WriteOnly)) {
|
||||||
{
|
|
||||||
ui->statusBar->showMessage(tr("Can't open file for rewriting"));
|
ui->statusBar->showMessage(tr("Can't open file for rewriting"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -459,3 +522,40 @@ void UEFITool::scrollTreeView(QListWidgetItem* item)
|
|||||||
ui->structureTreeView->selectionModel()->select(index, QItemSelectionModel::Select);
|
ui->structureTreeView->selectionModel()->select(index, QItemSelectionModel::Select);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void UEFITool::contextMenuEvent (QContextMenuEvent* event)
|
||||||
|
{
|
||||||
|
if(!ui->structureTreeView->underMouse())
|
||||||
|
return;
|
||||||
|
|
||||||
|
QPoint pt = event->pos();
|
||||||
|
QModelIndex index = ui->structureTreeView->indexAt(ui->structureTreeView->viewport()->mapFrom(this, pt));
|
||||||
|
if(!index.isValid())
|
||||||
|
return;
|
||||||
|
|
||||||
|
TreeItem* item = static_cast<TreeItem*>(index.internalPointer());
|
||||||
|
switch(item->type())
|
||||||
|
{
|
||||||
|
case TreeItem::Capsule:
|
||||||
|
capsuleMenu.exec(event->globalPos());
|
||||||
|
break;
|
||||||
|
case TreeItem::Image:
|
||||||
|
imageMenu.exec(event->globalPos());
|
||||||
|
break;
|
||||||
|
case TreeItem::Region:
|
||||||
|
regionMenu.exec(event->globalPos());
|
||||||
|
break;
|
||||||
|
case TreeItem::Padding:
|
||||||
|
paddingMenu.exec(event->globalPos());
|
||||||
|
break;
|
||||||
|
case TreeItem::Volume:
|
||||||
|
volumeMenu.exec(event->globalPos());
|
||||||
|
break;
|
||||||
|
case TreeItem::File:
|
||||||
|
fileMenu.exec(event->globalPos());
|
||||||
|
break;
|
||||||
|
case TreeItem::Section:
|
||||||
|
sectionMenu.exec(event->globalPos());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
43
uefitool.h
43
uefitool.h
@ -21,6 +21,7 @@
|
|||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QFileDialog>
|
#include <QFileDialog>
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
|
#include <QMenu>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QMimeData>
|
#include <QMimeData>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
@ -46,38 +47,58 @@ public:
|
|||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void init();
|
void init();
|
||||||
|
void populateUi(const QModelIndex ¤t);
|
||||||
void openImageFile();
|
void openImageFile();
|
||||||
void saveImageFile();
|
void saveImageFile();
|
||||||
void populateUi(const QModelIndex ¤t);
|
|
||||||
void resizeTreeViewColums();
|
void resizeTreeViewColums();
|
||||||
void extract(const UINT8 mode);
|
void scrollTreeView(QListWidgetItem* item);
|
||||||
|
|
||||||
|
void extract(const UINT8 mode);
|
||||||
void extractAsIs();
|
void extractAsIs();
|
||||||
void extractBody();
|
void extractBody();
|
||||||
void extractUncompressed();
|
void extractUncompressed();
|
||||||
void insert(const UINT8 mode);
|
|
||||||
|
void insert(const UINT8 mode);
|
||||||
void insertInto();
|
void insertInto();
|
||||||
void insertBefore();
|
void insertBefore();
|
||||||
void insertAfter();
|
void insertAfter();
|
||||||
void replace();
|
|
||||||
void remove();
|
void replace();
|
||||||
void rebuild();
|
|
||||||
|
void remove();
|
||||||
|
|
||||||
|
void rebuild();
|
||||||
|
|
||||||
void changeToNone();
|
void changeToNone();
|
||||||
void changeToEfi11();
|
void changeToEfi11();
|
||||||
void changeToTiano();
|
void changeToTiano();
|
||||||
void changeToLzma();
|
void changeToLzma();
|
||||||
void about();
|
|
||||||
|
void about();
|
||||||
void aboutQt();
|
void aboutQt();
|
||||||
void scrollTreeView(QListWidgetItem* item);
|
|
||||||
void exit();
|
void exit();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::UEFITool * ui;
|
Ui::UEFITool * ui;
|
||||||
FfsEngine* ffsEngine;
|
FfsEngine* ffsEngine;
|
||||||
QQueue<MessageListItem> messageItems;
|
|
||||||
|
QQueue<MessageListItem> messageItems;
|
||||||
|
void showMessage();
|
||||||
|
|
||||||
|
QMenu capsuleMenu;
|
||||||
|
QMenu imageMenu;
|
||||||
|
QMenu regionMenu;
|
||||||
|
QMenu paddingMenu;
|
||||||
|
QMenu volumeMenu;
|
||||||
|
QMenu fileMenu;
|
||||||
|
QMenu sectionMenu;
|
||||||
|
void createMenus();
|
||||||
|
|
||||||
void dragEnterEvent(QDragEnterEvent* event);
|
void dragEnterEvent(QDragEnterEvent* event);
|
||||||
void dropEvent(QDropEvent* event);
|
void dropEvent(QDropEvent* event);
|
||||||
void showMessage();
|
void contextMenuEvent (QContextMenuEvent* event);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
239
uefitool.ui
239
uefitool.ui
@ -7,7 +7,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>800</width>
|
<width>800</width>
|
||||||
<height>483</height>
|
<height>600</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@ -20,42 +20,42 @@
|
|||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>UEFITool 0.9.3</string>
|
<string>UEFITool 0.10.0</string>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="centralWidget">
|
<widget class="QWidget" name="centralWidget">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_2">
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
<property name="margin">
|
|
||||||
<number>5</number>
|
|
||||||
</property>
|
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>5</number>
|
<number>5</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="0" column="0">
|
<property name="margin">
|
||||||
<widget class="QGroupBox" name="structureGroupBox">
|
<number>8</number>
|
||||||
<property name="sizePolicy">
|
</property>
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
<item>
|
||||||
<horstretch>0</horstretch>
|
<widget class="QGroupBox" name="groupBox">
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Structure</string>
|
<string>Structure</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||||
<property name="margin">
|
|
||||||
<number>5</number>
|
|
||||||
</property>
|
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>5</number>
|
<number>5</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="0" column="0" colspan="2">
|
<property name="margin">
|
||||||
|
<number>8</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
<widget class="QTreeView" name="structureTreeView">
|
<widget class="QTreeView" name="structureTreeView">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
<property name="indentation">
|
<property name="indentation">
|
||||||
<number>10</number>
|
<number>10</number>
|
||||||
</property>
|
</property>
|
||||||
@ -76,122 +76,16 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QGroupBox" name="infoGroupBox">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>220</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="title">
|
|
||||||
<string>Information</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>5</number>
|
|
||||||
</property>
|
|
||||||
<property name="margin">
|
|
||||||
<number>5</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QPlainTextEdit" name="infoEdit">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="undoRedoEnabled">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="readOnly">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="centerOnScroll">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0" colspan="2">
|
|
||||||
<widget class="QGroupBox" name="messageGroupBox">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>16777215</width>
|
|
||||||
<height>120</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="title">
|
|
||||||
<string>Message</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>5</number>
|
|
||||||
</property>
|
|
||||||
<property name="margin">
|
|
||||||
<number>5</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QListWidget" name="messageListWidget"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QStatusBar" name="statusBar"/>
|
<widget class="QStatusBar" name="statusBar"/>
|
||||||
<widget class="QToolBar" name="toolBar">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
|
||||||
<string>toolBar</string>
|
|
||||||
</property>
|
|
||||||
<attribute name="toolBarArea">
|
|
||||||
<enum>LeftToolBarArea</enum>
|
|
||||||
</attribute>
|
|
||||||
<attribute name="toolBarBreak">
|
|
||||||
<bool>false</bool>
|
|
||||||
</attribute>
|
|
||||||
<addaction name="actionOpenImageFile"/>
|
|
||||||
<addaction name="actionSaveImageFile"/>
|
|
||||||
<addaction name="separator"/>
|
|
||||||
<addaction name="actionRebuild"/>
|
|
||||||
<addaction name="separator"/>
|
|
||||||
<addaction name="actionRemove"/>
|
|
||||||
<addaction name="separator"/>
|
|
||||||
<addaction name="actionExtract"/>
|
|
||||||
<addaction name="actionExtractBody"/>
|
|
||||||
<addaction name="actionExtractUncompressed"/>
|
|
||||||
<addaction name="separator"/>
|
|
||||||
<addaction name="actionInsertInto"/>
|
|
||||||
<addaction name="actionInsertBefore"/>
|
|
||||||
<addaction name="actionInsertAfter"/>
|
|
||||||
<addaction name="separator"/>
|
|
||||||
<addaction name="actionReplace"/>
|
|
||||||
</widget>
|
|
||||||
<widget class="QMenuBar" name="menuBar">
|
<widget class="QMenuBar" name="menuBar">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>800</width>
|
<width>800</width>
|
||||||
<height>29</height>
|
<height>21</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QMenu" name="menuFile">
|
<widget class="QMenu" name="menuFile">
|
||||||
@ -246,6 +140,97 @@
|
|||||||
<addaction name="menuAction"/>
|
<addaction name="menuAction"/>
|
||||||
<addaction name="menuHelp"/>
|
<addaction name="menuHelp"/>
|
||||||
</widget>
|
</widget>
|
||||||
|
<widget class="QDockWidget" name="infoDockWidget">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>89</width>
|
||||||
|
<height>111</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>180</width>
|
||||||
|
<height>524287</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="features">
|
||||||
|
<set>QDockWidget::DockWidgetMovable</set>
|
||||||
|
</property>
|
||||||
|
<property name="allowedAreas">
|
||||||
|
<set>Qt::LeftDockWidgetArea|Qt::RightDockWidgetArea</set>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Information</string>
|
||||||
|
</property>
|
||||||
|
<attribute name="dockWidgetArea">
|
||||||
|
<number>2</number>
|
||||||
|
</attribute>
|
||||||
|
<widget class="QWidget" name="dockWidgetContents">
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>5</number>
|
||||||
|
</property>
|
||||||
|
<property name="margin">
|
||||||
|
<number>8</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QPlainTextEdit" name="infoEdit">
|
||||||
|
<property name="acceptDrops">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="undoRedoEnabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="readOnly">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="centerOnScroll">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
<widget class="QDockWidget" name="messageDockWidget">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>91</width>
|
||||||
|
<height>113</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>524287</width>
|
||||||
|
<height>113</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="features">
|
||||||
|
<set>QDockWidget::DockWidgetMovable</set>
|
||||||
|
</property>
|
||||||
|
<property name="allowedAreas">
|
||||||
|
<set>Qt::BottomDockWidgetArea|Qt::TopDockWidgetArea</set>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Messages</string>
|
||||||
|
</property>
|
||||||
|
<attribute name="dockWidgetArea">
|
||||||
|
<number>8</number>
|
||||||
|
</attribute>
|
||||||
|
<widget class="QWidget" name="dockWidgetContents_2">
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>5</number>
|
||||||
|
</property>
|
||||||
|
<property name="margin">
|
||||||
|
<number>8</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QListWidget" name="messageListWidget"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
<action name="actionInsertAfter">
|
<action name="actionInsertAfter">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
|
370
ui_uefitool.h
370
ui_uefitool.h
@ -1,370 +0,0 @@
|
|||||||
/********************************************************************************
|
|
||||||
** Form generated from reading UI file 'uefitool.ui'
|
|
||||||
**
|
|
||||||
** Created by: Qt User Interface Compiler version 4.8.5
|
|
||||||
**
|
|
||||||
** WARNING! All changes made in this file will be lost when recompiling UI file!
|
|
||||||
********************************************************************************/
|
|
||||||
|
|
||||||
#ifndef UI_UEFITOOL_H
|
|
||||||
#define UI_UEFITOOL_H
|
|
||||||
|
|
||||||
#include <QtCore/QVariant>
|
|
||||||
#include <QtGui/QAction>
|
|
||||||
#include <QtGui/QApplication>
|
|
||||||
#include <QtGui/QButtonGroup>
|
|
||||||
#include <QtGui/QGridLayout>
|
|
||||||
#include <QtGui/QGroupBox>
|
|
||||||
#include <QtGui/QHBoxLayout>
|
|
||||||
#include <QtGui/QHeaderView>
|
|
||||||
#include <QtGui/QListWidget>
|
|
||||||
#include <QtGui/QMainWindow>
|
|
||||||
#include <QtGui/QMenu>
|
|
||||||
#include <QtGui/QMenuBar>
|
|
||||||
#include <QtGui/QPlainTextEdit>
|
|
||||||
#include <QtGui/QStatusBar>
|
|
||||||
#include <QtGui/QToolBar>
|
|
||||||
#include <QtGui/QTreeView>
|
|
||||||
#include <QtGui/QVBoxLayout>
|
|
||||||
#include <QtGui/QWidget>
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
|
||||||
|
|
||||||
class Ui_UEFITool
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
QAction *actionInsertAfter;
|
|
||||||
QAction *actionInsertBefore;
|
|
||||||
QAction *actionReplace;
|
|
||||||
QAction *actionExtract;
|
|
||||||
QAction *actionExtractBody;
|
|
||||||
QAction *actionExtractUncompressed;
|
|
||||||
QAction *actionRemove;
|
|
||||||
QAction *actionOpenImageFile;
|
|
||||||
QAction *actionInsertInto;
|
|
||||||
QAction *actionSaveImageFile;
|
|
||||||
QAction *actionRebuild;
|
|
||||||
QAction *actionChangeToTiano;
|
|
||||||
QAction *actionChangeToEfi11;
|
|
||||||
QAction *actionChangeToLzma;
|
|
||||||
QAction *actionAbout;
|
|
||||||
QAction *actionAboutQt;
|
|
||||||
QAction *actionQuit;
|
|
||||||
QAction *actionChangeToNone;
|
|
||||||
QWidget *centralWidget;
|
|
||||||
QGridLayout *gridLayout_2;
|
|
||||||
QGroupBox *structureGroupBox;
|
|
||||||
QGridLayout *gridLayout;
|
|
||||||
QTreeView *structureTreeView;
|
|
||||||
QGroupBox *infoGroupBox;
|
|
||||||
QVBoxLayout *verticalLayout;
|
|
||||||
QPlainTextEdit *infoEdit;
|
|
||||||
QGroupBox *messageGroupBox;
|
|
||||||
QHBoxLayout *horizontalLayout;
|
|
||||||
QListWidget *messageListWidget;
|
|
||||||
QStatusBar *statusBar;
|
|
||||||
QToolBar *toolBar;
|
|
||||||
QMenuBar *menuBar;
|
|
||||||
QMenu *menuFile;
|
|
||||||
QMenu *menuAction;
|
|
||||||
QMenu *menuChangeCompressionTo;
|
|
||||||
QMenu *menuHelp;
|
|
||||||
|
|
||||||
void setupUi(QMainWindow *UEFITool)
|
|
||||||
{
|
|
||||||
if (UEFITool->objectName().isEmpty())
|
|
||||||
UEFITool->setObjectName(QString::fromUtf8("UEFITool"));
|
|
||||||
UEFITool->resize(800, 483);
|
|
||||||
QSizePolicy sizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
|
||||||
sizePolicy.setHorizontalStretch(0);
|
|
||||||
sizePolicy.setVerticalStretch(0);
|
|
||||||
sizePolicy.setHeightForWidth(UEFITool->sizePolicy().hasHeightForWidth());
|
|
||||||
UEFITool->setSizePolicy(sizePolicy);
|
|
||||||
UEFITool->setAcceptDrops(true);
|
|
||||||
actionInsertAfter = new QAction(UEFITool);
|
|
||||||
actionInsertAfter->setObjectName(QString::fromUtf8("actionInsertAfter"));
|
|
||||||
actionInsertAfter->setEnabled(false);
|
|
||||||
actionInsertBefore = new QAction(UEFITool);
|
|
||||||
actionInsertBefore->setObjectName(QString::fromUtf8("actionInsertBefore"));
|
|
||||||
actionInsertBefore->setEnabled(false);
|
|
||||||
actionReplace = new QAction(UEFITool);
|
|
||||||
actionReplace->setObjectName(QString::fromUtf8("actionReplace"));
|
|
||||||
actionReplace->setEnabled(false);
|
|
||||||
actionExtract = new QAction(UEFITool);
|
|
||||||
actionExtract->setObjectName(QString::fromUtf8("actionExtract"));
|
|
||||||
actionExtract->setEnabled(false);
|
|
||||||
actionExtractBody = new QAction(UEFITool);
|
|
||||||
actionExtractBody->setObjectName(QString::fromUtf8("actionExtractBody"));
|
|
||||||
actionExtractBody->setEnabled(false);
|
|
||||||
actionExtractUncompressed = new QAction(UEFITool);
|
|
||||||
actionExtractUncompressed->setObjectName(QString::fromUtf8("actionExtractUncompressed"));
|
|
||||||
actionExtractUncompressed->setEnabled(false);
|
|
||||||
actionRemove = new QAction(UEFITool);
|
|
||||||
actionRemove->setObjectName(QString::fromUtf8("actionRemove"));
|
|
||||||
actionRemove->setEnabled(false);
|
|
||||||
actionOpenImageFile = new QAction(UEFITool);
|
|
||||||
actionOpenImageFile->setObjectName(QString::fromUtf8("actionOpenImageFile"));
|
|
||||||
actionInsertInto = new QAction(UEFITool);
|
|
||||||
actionInsertInto->setObjectName(QString::fromUtf8("actionInsertInto"));
|
|
||||||
actionInsertInto->setEnabled(false);
|
|
||||||
actionSaveImageFile = new QAction(UEFITool);
|
|
||||||
actionSaveImageFile->setObjectName(QString::fromUtf8("actionSaveImageFile"));
|
|
||||||
actionSaveImageFile->setEnabled(false);
|
|
||||||
actionRebuild = new QAction(UEFITool);
|
|
||||||
actionRebuild->setObjectName(QString::fromUtf8("actionRebuild"));
|
|
||||||
actionRebuild->setEnabled(false);
|
|
||||||
actionChangeToTiano = new QAction(UEFITool);
|
|
||||||
actionChangeToTiano->setObjectName(QString::fromUtf8("actionChangeToTiano"));
|
|
||||||
actionChangeToEfi11 = new QAction(UEFITool);
|
|
||||||
actionChangeToEfi11->setObjectName(QString::fromUtf8("actionChangeToEfi11"));
|
|
||||||
actionChangeToLzma = new QAction(UEFITool);
|
|
||||||
actionChangeToLzma->setObjectName(QString::fromUtf8("actionChangeToLzma"));
|
|
||||||
actionAbout = new QAction(UEFITool);
|
|
||||||
actionAbout->setObjectName(QString::fromUtf8("actionAbout"));
|
|
||||||
actionAbout->setMenuRole(QAction::AboutRole);
|
|
||||||
actionAboutQt = new QAction(UEFITool);
|
|
||||||
actionAboutQt->setObjectName(QString::fromUtf8("actionAboutQt"));
|
|
||||||
actionAboutQt->setMenuRole(QAction::AboutQtRole);
|
|
||||||
actionQuit = new QAction(UEFITool);
|
|
||||||
actionQuit->setObjectName(QString::fromUtf8("actionQuit"));
|
|
||||||
actionQuit->setMenuRole(QAction::QuitRole);
|
|
||||||
actionChangeToNone = new QAction(UEFITool);
|
|
||||||
actionChangeToNone->setObjectName(QString::fromUtf8("actionChangeToNone"));
|
|
||||||
centralWidget = new QWidget(UEFITool);
|
|
||||||
centralWidget->setObjectName(QString::fromUtf8("centralWidget"));
|
|
||||||
QSizePolicy sizePolicy1(QSizePolicy::Fixed, QSizePolicy::Fixed);
|
|
||||||
sizePolicy1.setHorizontalStretch(0);
|
|
||||||
sizePolicy1.setVerticalStretch(0);
|
|
||||||
sizePolicy1.setHeightForWidth(centralWidget->sizePolicy().hasHeightForWidth());
|
|
||||||
centralWidget->setSizePolicy(sizePolicy1);
|
|
||||||
gridLayout_2 = new QGridLayout(centralWidget);
|
|
||||||
gridLayout_2->setSpacing(5);
|
|
||||||
gridLayout_2->setContentsMargins(5, 5, 5, 5);
|
|
||||||
gridLayout_2->setObjectName(QString::fromUtf8("gridLayout_2"));
|
|
||||||
structureGroupBox = new QGroupBox(centralWidget);
|
|
||||||
structureGroupBox->setObjectName(QString::fromUtf8("structureGroupBox"));
|
|
||||||
sizePolicy.setHeightForWidth(structureGroupBox->sizePolicy().hasHeightForWidth());
|
|
||||||
structureGroupBox->setSizePolicy(sizePolicy);
|
|
||||||
gridLayout = new QGridLayout(structureGroupBox);
|
|
||||||
gridLayout->setSpacing(5);
|
|
||||||
gridLayout->setContentsMargins(5, 5, 5, 5);
|
|
||||||
gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
|
|
||||||
structureTreeView = new QTreeView(structureGroupBox);
|
|
||||||
structureTreeView->setObjectName(QString::fromUtf8("structureTreeView"));
|
|
||||||
structureTreeView->setIndentation(10);
|
|
||||||
structureTreeView->setHeaderHidden(false);
|
|
||||||
structureTreeView->header()->setCascadingSectionResizes(true);
|
|
||||||
structureTreeView->header()->setDefaultSectionSize(200);
|
|
||||||
structureTreeView->header()->setStretchLastSection(true);
|
|
||||||
|
|
||||||
gridLayout->addWidget(structureTreeView, 0, 0, 1, 2);
|
|
||||||
|
|
||||||
|
|
||||||
gridLayout_2->addWidget(structureGroupBox, 0, 0, 1, 1);
|
|
||||||
|
|
||||||
infoGroupBox = new QGroupBox(centralWidget);
|
|
||||||
infoGroupBox->setObjectName(QString::fromUtf8("infoGroupBox"));
|
|
||||||
QSizePolicy sizePolicy2(QSizePolicy::Minimum, QSizePolicy::Minimum);
|
|
||||||
sizePolicy2.setHorizontalStretch(0);
|
|
||||||
sizePolicy2.setVerticalStretch(0);
|
|
||||||
sizePolicy2.setHeightForWidth(infoGroupBox->sizePolicy().hasHeightForWidth());
|
|
||||||
infoGroupBox->setSizePolicy(sizePolicy2);
|
|
||||||
infoGroupBox->setMaximumSize(QSize(220, 16777215));
|
|
||||||
verticalLayout = new QVBoxLayout(infoGroupBox);
|
|
||||||
verticalLayout->setSpacing(5);
|
|
||||||
verticalLayout->setContentsMargins(5, 5, 5, 5);
|
|
||||||
verticalLayout->setObjectName(QString::fromUtf8("verticalLayout"));
|
|
||||||
infoEdit = new QPlainTextEdit(infoGroupBox);
|
|
||||||
infoEdit->setObjectName(QString::fromUtf8("infoEdit"));
|
|
||||||
sizePolicy.setHeightForWidth(infoEdit->sizePolicy().hasHeightForWidth());
|
|
||||||
infoEdit->setSizePolicy(sizePolicy);
|
|
||||||
infoEdit->setUndoRedoEnabled(false);
|
|
||||||
infoEdit->setReadOnly(true);
|
|
||||||
infoEdit->setCenterOnScroll(false);
|
|
||||||
|
|
||||||
verticalLayout->addWidget(infoEdit);
|
|
||||||
|
|
||||||
|
|
||||||
gridLayout_2->addWidget(infoGroupBox, 0, 1, 1, 1);
|
|
||||||
|
|
||||||
messageGroupBox = new QGroupBox(centralWidget);
|
|
||||||
messageGroupBox->setObjectName(QString::fromUtf8("messageGroupBox"));
|
|
||||||
QSizePolicy sizePolicy3(QSizePolicy::Expanding, QSizePolicy::Fixed);
|
|
||||||
sizePolicy3.setHorizontalStretch(0);
|
|
||||||
sizePolicy3.setVerticalStretch(0);
|
|
||||||
sizePolicy3.setHeightForWidth(messageGroupBox->sizePolicy().hasHeightForWidth());
|
|
||||||
messageGroupBox->setSizePolicy(sizePolicy3);
|
|
||||||
messageGroupBox->setMaximumSize(QSize(16777215, 120));
|
|
||||||
horizontalLayout = new QHBoxLayout(messageGroupBox);
|
|
||||||
horizontalLayout->setSpacing(5);
|
|
||||||
horizontalLayout->setContentsMargins(5, 5, 5, 5);
|
|
||||||
horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout"));
|
|
||||||
messageListWidget = new QListWidget(messageGroupBox);
|
|
||||||
messageListWidget->setObjectName(QString::fromUtf8("messageListWidget"));
|
|
||||||
|
|
||||||
horizontalLayout->addWidget(messageListWidget);
|
|
||||||
|
|
||||||
|
|
||||||
gridLayout_2->addWidget(messageGroupBox, 1, 0, 1, 2);
|
|
||||||
|
|
||||||
UEFITool->setCentralWidget(centralWidget);
|
|
||||||
statusBar = new QStatusBar(UEFITool);
|
|
||||||
statusBar->setObjectName(QString::fromUtf8("statusBar"));
|
|
||||||
UEFITool->setStatusBar(statusBar);
|
|
||||||
toolBar = new QToolBar(UEFITool);
|
|
||||||
toolBar->setObjectName(QString::fromUtf8("toolBar"));
|
|
||||||
toolBar->setEnabled(true);
|
|
||||||
UEFITool->addToolBar(Qt::LeftToolBarArea, toolBar);
|
|
||||||
menuBar = new QMenuBar(UEFITool);
|
|
||||||
menuBar->setObjectName(QString::fromUtf8("menuBar"));
|
|
||||||
menuBar->setGeometry(QRect(0, 0, 800, 22));
|
|
||||||
menuFile = new QMenu(menuBar);
|
|
||||||
menuFile->setObjectName(QString::fromUtf8("menuFile"));
|
|
||||||
menuAction = new QMenu(menuBar);
|
|
||||||
menuAction->setObjectName(QString::fromUtf8("menuAction"));
|
|
||||||
menuChangeCompressionTo = new QMenu(menuAction);
|
|
||||||
menuChangeCompressionTo->setObjectName(QString::fromUtf8("menuChangeCompressionTo"));
|
|
||||||
menuChangeCompressionTo->setEnabled(true);
|
|
||||||
menuHelp = new QMenu(menuBar);
|
|
||||||
menuHelp->setObjectName(QString::fromUtf8("menuHelp"));
|
|
||||||
UEFITool->setMenuBar(menuBar);
|
|
||||||
|
|
||||||
toolBar->addAction(actionOpenImageFile);
|
|
||||||
toolBar->addAction(actionSaveImageFile);
|
|
||||||
toolBar->addSeparator();
|
|
||||||
toolBar->addAction(actionRebuild);
|
|
||||||
toolBar->addSeparator();
|
|
||||||
toolBar->addAction(actionRemove);
|
|
||||||
toolBar->addSeparator();
|
|
||||||
toolBar->addAction(actionExtract);
|
|
||||||
toolBar->addAction(actionExtractBody);
|
|
||||||
toolBar->addAction(actionExtractUncompressed);
|
|
||||||
toolBar->addSeparator();
|
|
||||||
toolBar->addAction(actionInsertInto);
|
|
||||||
toolBar->addAction(actionInsertBefore);
|
|
||||||
toolBar->addAction(actionInsertAfter);
|
|
||||||
toolBar->addSeparator();
|
|
||||||
toolBar->addAction(actionReplace);
|
|
||||||
menuBar->addAction(menuFile->menuAction());
|
|
||||||
menuBar->addAction(menuAction->menuAction());
|
|
||||||
menuBar->addAction(menuHelp->menuAction());
|
|
||||||
menuFile->addAction(actionOpenImageFile);
|
|
||||||
menuFile->addAction(actionSaveImageFile);
|
|
||||||
menuFile->addSeparator();
|
|
||||||
menuFile->addAction(actionQuit);
|
|
||||||
menuAction->addAction(actionRebuild);
|
|
||||||
menuAction->addSeparator();
|
|
||||||
menuAction->addAction(actionRemove);
|
|
||||||
menuAction->addSeparator();
|
|
||||||
menuAction->addAction(actionExtract);
|
|
||||||
menuAction->addAction(actionExtractBody);
|
|
||||||
menuAction->addAction(actionExtractUncompressed);
|
|
||||||
menuAction->addSeparator();
|
|
||||||
menuAction->addAction(actionInsertInto);
|
|
||||||
menuAction->addAction(actionInsertAfter);
|
|
||||||
menuAction->addAction(actionInsertBefore);
|
|
||||||
menuAction->addSeparator();
|
|
||||||
menuAction->addAction(actionReplace);
|
|
||||||
menuAction->addSeparator();
|
|
||||||
menuAction->addAction(menuChangeCompressionTo->menuAction());
|
|
||||||
menuChangeCompressionTo->addAction(actionChangeToNone);
|
|
||||||
menuChangeCompressionTo->addAction(actionChangeToTiano);
|
|
||||||
menuChangeCompressionTo->addAction(actionChangeToEfi11);
|
|
||||||
menuChangeCompressionTo->addAction(actionChangeToLzma);
|
|
||||||
menuHelp->addAction(actionAbout);
|
|
||||||
menuHelp->addAction(actionAboutQt);
|
|
||||||
|
|
||||||
retranslateUi(UEFITool);
|
|
||||||
|
|
||||||
QMetaObject::connectSlotsByName(UEFITool);
|
|
||||||
} // setupUi
|
|
||||||
|
|
||||||
void retranslateUi(QMainWindow *UEFITool)
|
|
||||||
{
|
|
||||||
UEFITool->setWindowTitle(QApplication::translate("UEFITool", "UEFITool 0.9.3", 0, QApplication::UnicodeUTF8));
|
|
||||||
actionInsertAfter->setText(QApplication::translate("UEFITool", "Insert &after...", 0, QApplication::UnicodeUTF8));
|
|
||||||
#ifndef QT_NO_TOOLTIP
|
|
||||||
actionInsertAfter->setToolTip(QApplication::translate("UEFITool", "Insert an object from file after selected object", 0, QApplication::UnicodeUTF8));
|
|
||||||
#endif // QT_NO_TOOLTIP
|
|
||||||
actionInsertAfter->setShortcut(QApplication::translate("UEFITool", "Ctrl+Shift+I", 0, QApplication::UnicodeUTF8));
|
|
||||||
actionInsertBefore->setText(QApplication::translate("UEFITool", "Insert &before...", 0, QApplication::UnicodeUTF8));
|
|
||||||
#ifndef QT_NO_TOOLTIP
|
|
||||||
actionInsertBefore->setToolTip(QApplication::translate("UEFITool", "Insert object from file before selected object", 0, QApplication::UnicodeUTF8));
|
|
||||||
#endif // QT_NO_TOOLTIP
|
|
||||||
actionInsertBefore->setShortcut(QApplication::translate("UEFITool", "Ctrl+Alt+I", 0, QApplication::UnicodeUTF8));
|
|
||||||
actionReplace->setText(QApplication::translate("UEFITool", "Rep&lace", 0, QApplication::UnicodeUTF8));
|
|
||||||
#ifndef QT_NO_TOOLTIP
|
|
||||||
actionReplace->setToolTip(QApplication::translate("UEFITool", "Replace selected object with an object from file", 0, QApplication::UnicodeUTF8));
|
|
||||||
#endif // QT_NO_TOOLTIP
|
|
||||||
actionReplace->setShortcut(QApplication::translate("UEFITool", "Ctrl+R", 0, QApplication::UnicodeUTF8));
|
|
||||||
actionExtract->setText(QApplication::translate("UEFITool", "E&xtract as is...", 0, QApplication::UnicodeUTF8));
|
|
||||||
#ifndef QT_NO_TOOLTIP
|
|
||||||
actionExtract->setToolTip(QApplication::translate("UEFITool", "Extract selected object as is to file", 0, QApplication::UnicodeUTF8));
|
|
||||||
#endif // QT_NO_TOOLTIP
|
|
||||||
actionExtract->setShortcut(QApplication::translate("UEFITool", "Ctrl+E", 0, QApplication::UnicodeUTF8));
|
|
||||||
actionExtractBody->setText(QApplication::translate("UEFITool", "Extract &without header...", 0, QApplication::UnicodeUTF8));
|
|
||||||
#ifndef QT_NO_TOOLTIP
|
|
||||||
actionExtractBody->setToolTip(QApplication::translate("UEFITool", "Extract selected object without header to file", 0, QApplication::UnicodeUTF8));
|
|
||||||
#endif // QT_NO_TOOLTIP
|
|
||||||
actionExtractBody->setShortcut(QApplication::translate("UEFITool", "Ctrl+Shift+E", 0, QApplication::UnicodeUTF8));
|
|
||||||
actionExtractUncompressed->setText(QApplication::translate("UEFITool", "Extract &uncompressed...", 0, QApplication::UnicodeUTF8));
|
|
||||||
#ifndef QT_NO_TOOLTIP
|
|
||||||
actionExtractUncompressed->setToolTip(QApplication::translate("UEFITool", "Extract selected FFS file uncompressing it ", 0, QApplication::UnicodeUTF8));
|
|
||||||
#endif // QT_NO_TOOLTIP
|
|
||||||
actionExtractUncompressed->setShortcut(QApplication::translate("UEFITool", "Ctrl+Alt+E", 0, QApplication::UnicodeUTF8));
|
|
||||||
actionRemove->setText(QApplication::translate("UEFITool", "Re&move", 0, QApplication::UnicodeUTF8));
|
|
||||||
#ifndef QT_NO_TOOLTIP
|
|
||||||
actionRemove->setToolTip(QApplication::translate("UEFITool", "Remove selected object", 0, QApplication::UnicodeUTF8));
|
|
||||||
#endif // QT_NO_TOOLTIP
|
|
||||||
actionRemove->setShortcut(QApplication::translate("UEFITool", "Ctrl+Del", 0, QApplication::UnicodeUTF8));
|
|
||||||
actionOpenImageFile->setText(QApplication::translate("UEFITool", "&Open image file...", 0, QApplication::UnicodeUTF8));
|
|
||||||
#ifndef QT_NO_TOOLTIP
|
|
||||||
actionOpenImageFile->setToolTip(QApplication::translate("UEFITool", "Open image file", 0, QApplication::UnicodeUTF8));
|
|
||||||
#endif // QT_NO_TOOLTIP
|
|
||||||
actionOpenImageFile->setShortcut(QApplication::translate("UEFITool", "Ctrl+O", 0, QApplication::UnicodeUTF8));
|
|
||||||
actionInsertInto->setText(QApplication::translate("UEFITool", "Insert &into...", 0, QApplication::UnicodeUTF8));
|
|
||||||
#ifndef QT_NO_TOOLTIP
|
|
||||||
actionInsertInto->setToolTip(QApplication::translate("UEFITool", "Insert object from file into selected object", 0, QApplication::UnicodeUTF8));
|
|
||||||
#endif // QT_NO_TOOLTIP
|
|
||||||
actionInsertInto->setShortcut(QApplication::translate("UEFITool", "Ctrl+I", 0, QApplication::UnicodeUTF8));
|
|
||||||
actionSaveImageFile->setText(QApplication::translate("UEFITool", "&Save image file...", 0, QApplication::UnicodeUTF8));
|
|
||||||
#ifndef QT_NO_TOOLTIP
|
|
||||||
actionSaveImageFile->setToolTip(QApplication::translate("UEFITool", "Save modified image file", 0, QApplication::UnicodeUTF8));
|
|
||||||
#endif // QT_NO_TOOLTIP
|
|
||||||
actionSaveImageFile->setShortcut(QApplication::translate("UEFITool", "Ctrl+S", 0, QApplication::UnicodeUTF8));
|
|
||||||
actionRebuild->setText(QApplication::translate("UEFITool", "&Rebuild", 0, QApplication::UnicodeUTF8));
|
|
||||||
#ifndef QT_NO_TOOLTIP
|
|
||||||
actionRebuild->setToolTip(QApplication::translate("UEFITool", "Rebuild selected object", 0, QApplication::UnicodeUTF8));
|
|
||||||
#endif // QT_NO_TOOLTIP
|
|
||||||
actionRebuild->setShortcut(QApplication::translate("UEFITool", "Ctrl+Space", 0, QApplication::UnicodeUTF8));
|
|
||||||
actionChangeToTiano->setText(QApplication::translate("UEFITool", "&Tiano", 0, QApplication::UnicodeUTF8));
|
|
||||||
actionChangeToTiano->setShortcut(QApplication::translate("UEFITool", "Ctrl+T", 0, QApplication::UnicodeUTF8));
|
|
||||||
actionChangeToEfi11->setText(QApplication::translate("UEFITool", "&EFI 1.1", 0, QApplication::UnicodeUTF8));
|
|
||||||
actionChangeToEfi11->setShortcut(QApplication::translate("UEFITool", "Ctrl+Shift+T", 0, QApplication::UnicodeUTF8));
|
|
||||||
actionChangeToLzma->setText(QApplication::translate("UEFITool", "&LZMA", 0, QApplication::UnicodeUTF8));
|
|
||||||
actionChangeToLzma->setShortcut(QApplication::translate("UEFITool", "Ctrl+L", 0, QApplication::UnicodeUTF8));
|
|
||||||
actionAbout->setText(QApplication::translate("UEFITool", "&About UEFITool", 0, QApplication::UnicodeUTF8));
|
|
||||||
actionAbout->setShortcut(QApplication::translate("UEFITool", "F1", 0, QApplication::UnicodeUTF8));
|
|
||||||
actionAboutQt->setText(QApplication::translate("UEFITool", "About &Qt", 0, QApplication::UnicodeUTF8));
|
|
||||||
actionQuit->setText(QApplication::translate("UEFITool", "&Quit", 0, QApplication::UnicodeUTF8));
|
|
||||||
actionChangeToNone->setText(QApplication::translate("UEFITool", "&Uncompressed", 0, QApplication::UnicodeUTF8));
|
|
||||||
actionChangeToNone->setShortcut(QApplication::translate("UEFITool", "Ctrl+U", 0, QApplication::UnicodeUTF8));
|
|
||||||
structureGroupBox->setTitle(QApplication::translate("UEFITool", "Structure", 0, QApplication::UnicodeUTF8));
|
|
||||||
infoGroupBox->setTitle(QApplication::translate("UEFITool", "Information", 0, QApplication::UnicodeUTF8));
|
|
||||||
messageGroupBox->setTitle(QApplication::translate("UEFITool", "Message", 0, QApplication::UnicodeUTF8));
|
|
||||||
toolBar->setWindowTitle(QApplication::translate("UEFITool", "toolBar", 0, QApplication::UnicodeUTF8));
|
|
||||||
menuFile->setTitle(QApplication::translate("UEFITool", "&File", 0, QApplication::UnicodeUTF8));
|
|
||||||
menuAction->setTitle(QApplication::translate("UEFITool", "A&ction", 0, QApplication::UnicodeUTF8));
|
|
||||||
menuChangeCompressionTo->setTitle(QApplication::translate("UEFITool", "Change &compression to", 0, QApplication::UnicodeUTF8));
|
|
||||||
menuHelp->setTitle(QApplication::translate("UEFITool", "H&elp", 0, QApplication::UnicodeUTF8));
|
|
||||||
} // retranslateUi
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
namespace Ui {
|
|
||||||
class UEFITool: public Ui_UEFITool {};
|
|
||||||
} // namespace Ui
|
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
|
||||||
|
|
||||||
#endif // UI_UEFITOOL_H
|
|
Loading…
Reference in New Issue
Block a user