2013-10-08 15:07:03 +08:00
|
|
|
/* uefitool.h
|
|
|
|
|
|
|
|
Copyright (c) 2013, Nikolaj Schlej. All rights reserved.
|
|
|
|
This program and the accompanying materials
|
|
|
|
are licensed and made available under the terms and conditions of the BSD License
|
|
|
|
which accompanies this distribution. The full text of the license may be found at
|
|
|
|
http://opensource.org/licenses/bsd-license.php
|
|
|
|
|
|
|
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __UEFITOOL_H__
|
|
|
|
#define __UEFITOOL_H__
|
|
|
|
|
|
|
|
#include <QMainWindow>
|
|
|
|
#include <QByteArray>
|
|
|
|
#include <QDragEnterEvent>
|
|
|
|
#include <QDropEvent>
|
|
|
|
#include <QFile>
|
|
|
|
#include <QFileDialog>
|
|
|
|
#include <QFileInfo>
|
|
|
|
#include <QMessageBox>
|
|
|
|
#include <QMimeData>
|
|
|
|
#include <QString>
|
|
|
|
#include <QUrl>
|
|
|
|
|
|
|
|
#include "basetypes.h"
|
2013-11-15 18:48:14 +08:00
|
|
|
#include "ffs.h"
|
2013-10-15 23:19:15 +08:00
|
|
|
#include "ffsengine.h"
|
2013-10-08 15:07:03 +08:00
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class UEFITool;
|
|
|
|
}
|
|
|
|
|
|
|
|
class UEFITool : public QMainWindow
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit UEFITool(QWidget *parent = 0);
|
|
|
|
~UEFITool();
|
|
|
|
|
|
|
|
void openImageFile(QString path);
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
void init();
|
|
|
|
void openImageFile();
|
2013-11-07 21:46:28 +08:00
|
|
|
void saveImageFile();
|
|
|
|
void populateUi(const QModelIndex ¤t);
|
|
|
|
void resizeTreeViewColums();
|
2013-11-17 17:01:11 +08:00
|
|
|
void extract(const UINT8 mode);
|
|
|
|
void extractAsIs();
|
2013-11-07 21:46:28 +08:00
|
|
|
void extractBody();
|
|
|
|
void extractUncompressed();
|
2013-11-14 18:40:39 +08:00
|
|
|
void insert(const UINT8 mode);
|
2013-11-07 21:46:28 +08:00
|
|
|
void insertInto();
|
|
|
|
void insertBefore();
|
|
|
|
void insertAfter();
|
|
|
|
void replace();
|
|
|
|
void remove();
|
2013-11-15 18:48:14 +08:00
|
|
|
void scrollTreeView(QListWidgetItem* item);
|
2013-10-08 15:07:03 +08:00
|
|
|
|
|
|
|
private:
|
|
|
|
Ui::UEFITool * ui;
|
2013-10-15 23:19:15 +08:00
|
|
|
FfsEngine* ffsEngine;
|
|
|
|
|
2013-10-08 15:07:03 +08:00
|
|
|
void dragEnterEvent(QDragEnterEvent* event);
|
|
|
|
void dropEvent(QDropEvent* event);
|
2013-11-17 17:01:11 +08:00
|
|
|
void showMessage();
|
2013-10-08 15:07:03 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|