UEFITool/uefitool.h

115 lines
2.5 KiB
C
Raw Normal View History

2013-10-08 15:07:03 +08:00
/* uefitool.h
Copyright (c) 2014, Nikolaj Schlej. All rights reserved.
2013-10-08 15:07:03 +08:00
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.
*/
2013-10-08 15:07:03 +08:00
#ifndef __UEFITOOL_H__
#define __UEFITOOL_H__
#include <QMainWindow>
#include <QByteArray>
#include <QClipboard>
2013-10-08 15:07:03 +08:00
#include <QDragEnterEvent>
#include <QDropEvent>
#include <QFile>
#include <QFileDialog>
#include <QFileInfo>
#include <QListWidget>
2013-11-23 06:25:15 +08:00
#include <QMenu>
2013-10-08 15:07:03 +08:00
#include <QMessageBox>
#include <QMimeData>
#include <QPlainTextEdit>
#include <QProcess>
#include <QSettings>
#include <QSplitter>
2013-10-08 15:07:03 +08:00
#include <QString>
#include <QTreeView>
2013-10-08 15:07:03 +08:00
#include <QUrl>
#include "basetypes.h"
#include "ffs.h"
#include "ffsengine.h"
#include "searchdialog.h"
2013-10-08 15:07:03 +08:00
namespace Ui {
class UEFITool;
2013-10-08 15:07:03 +08:00
}
class UEFITool : public QMainWindow
{
Q_OBJECT
2013-10-08 15:07:03 +08:00
public:
explicit UEFITool(QWidget *parent = 0);
~UEFITool();
void openImageFile(QString path);
void setProgramPath(QString path);
2013-10-08 15:07:03 +08:00
private slots:
2013-10-08 15:07:03 +08:00
void init();
void populateUi(const QModelIndex &current);
2013-11-23 06:25:15 +08:00
void scrollTreeView(QListWidgetItem* item);
void openImageFile();
void openImageFileInNewWindow();
void saveImageFile();
void search();
void extract(const UINT8 mode);
void extractAsIs();
void extractBody();
void insert(const UINT8 mode);
void insertInto();
void insertBefore();
void insertAfter();
void replace(const UINT8 mode);
void replaceAsIs();
void replaceBody();
void rebuild();
2018-04-30 13:38:54 +08:00
void doNotRebuild();
void remove();
void copyMessage();
void copyAllMessages();
void enableMessagesCopyActions(QListWidgetItem* item);
void clearMessages();
void about();
void aboutQt();
2013-11-23 06:25:15 +08:00
void exit();
void writeSettings();
2013-10-08 15:07:03 +08:00
private:
Ui::UEFITool* ui;
FfsEngine* ffsEngine;
SearchDialog* searchDialog;
QClipboard* clipboard;
QString currentDir;
QString currentProgramPath;
QQueue<MessageListItem> messageItems;
const QString version;
void showMessages();
2013-10-08 15:07:03 +08:00
void dragEnterEvent(QDragEnterEvent* event);
void dropEvent(QDropEvent* event);
void contextMenuEvent(QContextMenuEvent* event);
void readSettings();
2013-10-08 15:07:03 +08:00
};
#endif