From 5592529b33a7e7450adddce974d44f24b8126554 Mon Sep 17 00:00:00 2001 From: Nikolaj Schlej Date: Fri, 22 Nov 2013 23:25:15 +0100 Subject: [PATCH] Version 0.10.0 - UI reworked --- ffsengine.cpp | 7 +- treeitem.cpp | 5 +- treeitem.h | 1 + uefitool.cpp | 212 +++++++++++++++++++++-------- uefitool.h | 43 ++++-- uefitool.ui | 239 +++++++++++++++----------------- ui_uefitool.h | 370 -------------------------------------------------- 7 files changed, 308 insertions(+), 569 deletions(-) delete mode 100644 ui_uefitool.h diff --git a/ffsengine.cpp b/ffsengine.cpp index 390ce12..93945bc 100644 --- a/ffsengine.cpp +++ b/ffsengine.cpp @@ -1295,9 +1295,12 @@ UINT8 FfsEngine::changeCompression(const QModelIndex & index, const UINT8 algori if (!index.isValid()) return ERR_INVALID_PARAMETER; - // Set action for the item + // Set compression for the item treeModel->setItemCompression(algorithm, index); + // Set action for the item + treeModel->setItemAction(TreeItem::Modify, index); + return ERR_SUCCESS; } @@ -1598,7 +1601,7 @@ UINT8 FfsEngine::reconstruct(const QModelIndex & index, QQueue & que return ERR_NOT_IMPLEMENTED; } // Reconstruct item and it's children recursive - else if (item->action() == TreeItem::Rebuild) { + else if (item->action() == TreeItem::Modify || item->action() == TreeItem::Rebuild) { QQueue childrenQueue; switch (item->type()) { diff --git a/treeitem.cpp b/treeitem.cpp index 80c7f24..b7b19f5 100644 --- a/treeitem.cpp +++ b/treeitem.cpp @@ -172,6 +172,8 @@ QVariant TreeItem::data(int column) const case 0: //Name return itemName; case 1: //Action + if (itemAction == TreeItem::Modify) + return "M"; if (itemAction == TreeItem::Remove) return "X"; if (itemAction == TreeItem::Rebuild) @@ -293,7 +295,4 @@ void TreeItem::setAction(const UINT8 action) void TreeItem::setCompression(const UINT8 algorithm) { itemCompression = algorithm; - - // Set rebuild action - setAction(TreeItem::Rebuild); } \ No newline at end of file diff --git a/treeitem.h b/treeitem.h index 1802884..508907c 100644 --- a/treeitem.h +++ b/treeitem.h @@ -31,6 +31,7 @@ public: // Action types enum ActionTypes { NoAction = 50, + Modify, Remove, Rebuild }; diff --git a/uefitool.cpp b/uefitool.cpp index 2a15959..a73b931 100644 --- a/uefitool.cpp +++ b/uefitool.cpp @@ -44,10 +44,80 @@ UEFITool::UEFITool(QWidget *parent) : // Enable Drag-and-Drop actions this->setAcceptDrops(true); + // Create menus + createMenus(); + // Initialize non-persistent data 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() { delete ui; @@ -103,13 +173,11 @@ void UEFITool::populateUi(const QModelIndex ¤t) ui->actionExtract->setDisabled(item->hasEmptyHeader() && item->hasEmptyBody() && item->hasEmptyTail()); ui->actionRebuild->setDisabled(item->hasEmptyHeader() && item->hasEmptyBody() && item->hasEmptyTail()); ui->actionExtractBody->setDisabled(item->hasEmptyHeader()); - //ui->actionExtractUncompressed->setEnabled(ffsEngine->isCompressedFile(current)); 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))); ui->actionInsertBefore->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 && (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; switch (type) { 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; break; case TreeItem::File: 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; break; default: @@ -169,8 +237,7 @@ void UEFITool::insert(const UINT8 mode) } QFileInfo fileInfo = QFileInfo(path); - if (!fileInfo.exists()) - { + if (!fileInfo.exists()) { ui->statusBar->showMessage(tr("Please select existing file")); return; } @@ -178,8 +245,7 @@ void UEFITool::insert(const UINT8 mode) QFile inputFile; inputFile.setFileName(path); - if (!inputFile.open(QFile::ReadOnly)) - { + if (!inputFile.open(QFile::ReadOnly)) { ui->statusBar->showMessage(tr("Can't open file for reading")); return; } @@ -261,15 +327,14 @@ void UEFITool::changeToNone() void UEFITool::about() { - QMessageBox::about(this, tr("About UEFITool"), tr( - "Copyright (c) 2013, Nikolaj Schlej aka CodeRush.\n\n" - "The program is dedicated to RevoGirl. Rest in peace, young genius.\n\n" - "The program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License.\n" - "The full text of the license may be found at\nhttp://opensource.org/licenses/bsd-license.php\n\n" - "THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN \"AS IS\" BASIS,\n" - "WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND,\n" - "EITHER EXPRESS OR IMPLIED." - )); + QMessageBox::about(this, tr("About UEFITool"), tr( + "Copyright (c) 2013, Nikolaj Schlej aka CodeRush.

" + "The program is dedicated to RevoGirl. Rest in peace, young genius.

" + "The program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License.
" + "The full text of the license may be found at OpenSource.org.

" + "THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN \"AS IS\" BASIS, " + "WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, " + "EITHER EXPRESS OR IMPLIED.")); } void UEFITool::aboutQt() @@ -284,12 +349,11 @@ void UEFITool::exit() 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; outputFile.setFileName(path); - if (!outputFile.open(QFile::WriteOnly)) - { + if (!outputFile.open(QFile::WriteOnly)) { ui->statusBar->showMessage(tr("Can't open file for writing")); return; } @@ -297,10 +361,8 @@ void UEFITool::saveImageFile() QByteArray reconstructed; UINT8 result = ffsEngine->reconstructImage(reconstructed); showMessage(); - if (result) - { + if (result) { ui->statusBar->showMessage(tr("Reconstruction failed (%1)").arg(result)); - return; } @@ -319,15 +381,14 @@ void UEFITool::resizeTreeViewColums() 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); } void UEFITool::openImageFile(QString path) { QFileInfo fileInfo = QFileInfo(path); - if (!fileInfo.exists()) - { + if (!fileInfo.exists()) { ui->statusBar->showMessage(tr("Please select existing file")); return; } @@ -335,8 +396,7 @@ void UEFITool::openImageFile(QString path) QFile inputFile; inputFile.setFileName(path); - if (!inputFile.open(QFile::ReadOnly)) - { + if (!inputFile.open(QFile::ReadOnly)) { ui->statusBar->showMessage(tr("Can't open file for reading")); return; } @@ -365,36 +425,39 @@ void UEFITool::extract(const UINT8 mode) UINT8 type = item->type(); QString path; - switch (type) { - case TreeItem::Capsule: - path = QFileDialog::getSaveFileName(this, tr("Save capsule to binary file"),".","Capsule file (*.cap *.bin);;All files (*.*)"); - break; - case TreeItem::Image: - path = QFileDialog::getSaveFileName(this, tr("Save image to binary file"),".","Image file (*.rom *.bin);;All files (*.*)"); - break; - case TreeItem::Region: - path = QFileDialog::getSaveFileName(this, tr("Save region to binary file"),".","Region file (*.rgn *.bin);;All files (*.*)"); - break; - case TreeItem::Padding: - path = QFileDialog::getSaveFileName(this, tr("Save padding to binary file"),".","Padding file (*.pad *.bin);;All files (*.*)"); - break; - case TreeItem::Volume: - path = QFileDialog::getSaveFileName(this, tr("Save volume to binary file"),".","Volume file (*.vol *.bin);;All files (*.*)"); - break; - case TreeItem::File: - path = QFileDialog::getSaveFileName(this, tr("Save FFS file to binary file"),".","FFS file (*.ffs *.bin);;All files (*.*)"); - break; - case TreeItem::Section: - path = QFileDialog::getSaveFileName(this, tr("Select section file to insert"),".","Section file (*.sct *.bin);;All files (*.*)"); - break; - default: - return; - } + if(mode == EXTRACT_MODE_AS_IS) { + switch (type) { + case TreeItem::Capsule: + path = QFileDialog::getSaveFileName(this, tr("Save capsule to binary file"),".","Capsule files (*.cap *.bin);;All files (*.*)"); + break; + case TreeItem::Image: + path = QFileDialog::getSaveFileName(this, tr("Save image to binary file"),".","Image files (*.rom *.bin);;All files (*.*)"); + break; + case TreeItem::Region: + path = QFileDialog::getSaveFileName(this, tr("Save region to binary file"),".","Region files (*.rgn *.bin);;All files (*.*)"); + break; + case TreeItem::Padding: + path = QFileDialog::getSaveFileName(this, tr("Save padding to binary file"),".","Padding files (*.pad *.bin);;All files (*.*)"); + break; + case TreeItem::Volume: + path = QFileDialog::getSaveFileName(this, tr("Save volume to binary file"),".","Volume files (*.vol *.bin);;All files (*.*)"); + break; + case TreeItem::File: + path = QFileDialog::getSaveFileName(this, tr("Save FFS file to binary file"),".","FFS files (*.ffs *.bin);;All files (*.*)"); + break; + case TreeItem::Section: + path = QFileDialog::getSaveFileName(this, tr("Save section file to binary file"),".","Section files (*.sct *.bin);;All files (*.*)"); + break; + default: + return; + } + } + else + path = QFileDialog::getSaveFileName(this, tr("Save object to binary file"),".","Binary files (*.bin);;All files (*.*)"); QFile outputFile; outputFile.setFileName(path); - if (!outputFile.open(QFile::WriteOnly)) - { + if (!outputFile.open(QFile::WriteOnly)) { ui->statusBar->showMessage(tr("Can't open file for rewriting")); return; } @@ -459,3 +522,40 @@ void UEFITool::scrollTreeView(QListWidgetItem* item) 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(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; + } +} \ No newline at end of file diff --git a/uefitool.h b/uefitool.h index 0a9b458..a0e7119 100644 --- a/uefitool.h +++ b/uefitool.h @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -46,38 +47,58 @@ public: private slots: void init(); + void populateUi(const QModelIndex ¤t); void openImageFile(); void saveImageFile(); - void populateUi(const QModelIndex ¤t); - void resizeTreeViewColums(); - void extract(const UINT8 mode); + + void resizeTreeViewColums(); + void scrollTreeView(QListWidgetItem* item); + + void extract(const UINT8 mode); void extractAsIs(); void extractBody(); void extractUncompressed(); - void insert(const UINT8 mode); + + void insert(const UINT8 mode); void insertInto(); void insertBefore(); void insertAfter(); - void replace(); - void remove(); - void rebuild(); + + void replace(); + + void remove(); + + void rebuild(); + void changeToNone(); void changeToEfi11(); void changeToTiano(); void changeToLzma(); - void about(); + + void about(); void aboutQt(); - void scrollTreeView(QListWidgetItem* item); + void exit(); private: Ui::UEFITool * ui; FfsEngine* ffsEngine; - QQueue messageItems; + + QQueue messageItems; + void showMessage(); + + QMenu capsuleMenu; + QMenu imageMenu; + QMenu regionMenu; + QMenu paddingMenu; + QMenu volumeMenu; + QMenu fileMenu; + QMenu sectionMenu; + void createMenus(); void dragEnterEvent(QDragEnterEvent* event); void dropEvent(QDropEvent* event); - void showMessage(); + void contextMenuEvent (QContextMenuEvent* event); }; #endif diff --git a/uefitool.ui b/uefitool.ui index 2da11ad..9fbbc62 100644 --- a/uefitool.ui +++ b/uefitool.ui @@ -7,7 +7,7 @@ 0 0 800 - 483 + 600 @@ -20,42 +20,42 @@ true - UEFITool 0.9.3 + UEFITool 0.10.0 - + 0 0 - - - 5 - + 5 - - - - - 0 - 0 - - + + 8 + + + Structure - - - 5 - + 5 - + + 8 + + + + + 0 + 0 + + 10 @@ -76,122 +76,16 @@ - - - - - 0 - 0 - - - - - 220 - 16777215 - - - - Information - - - - 5 - - - 5 - - - - - - 0 - 0 - - - - false - - - true - - - false - - - - - - - - - - - 0 - 0 - - - - - 16777215 - 120 - - - - Message - - - - 5 - - - 5 - - - - - - - - - - true - - - toolBar - - - LeftToolBarArea - - - false - - - - - - - - - - - - - - - - - - 0 0 800 - 29 + 21 @@ -246,6 +140,97 @@ + + + + 89 + 111 + + + + + 180 + 524287 + + + + QDockWidget::DockWidgetMovable + + + Qt::LeftDockWidgetArea|Qt::RightDockWidgetArea + + + Information + + + 2 + + + + + 5 + + + 8 + + + + + false + + + false + + + true + + + false + + + + + + + + + + 91 + 113 + + + + + 524287 + 113 + + + + QDockWidget::DockWidgetMovable + + + Qt::BottomDockWidgetArea|Qt::TopDockWidgetArea + + + Messages + + + 8 + + + + + 5 + + + 8 + + + + + + + false diff --git a/ui_uefitool.h b/ui_uefitool.h deleted file mode 100644 index ade0788..0000000 --- a/ui_uefitool.h +++ /dev/null @@ -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 -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -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