This repository has been archived by the owner on Oct 4, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 33
/
fd44editor.h
69 lines (53 loc) · 1.59 KB
/
fd44editor.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
/* fd44editor.h
Copyright (c) 2012, 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 FD44EDITOR_H
#define FD44EDITOR_H
#include <QMainWindow>
#include <QByteArray>
#include <QClipboard>
#include <QDragEnterEvent>
#include <QDropEvent>
#include <QFile>
#include <QFileDialog>
#include <QFileInfo>
#include <QMessageBox>
#include <QMimeData>
#include <QUrl>
#include "motherboards.h"
namespace Ui {
class FD44Editor;
}
class FD44Editor : public QMainWindow
{
Q_OBJECT
public:
explicit FD44Editor(QWidget *parent = 0);
~FD44Editor();
void openImageFile(QString path);
private slots:
void openImageFile();
void saveImageFile();
void enableSaveButton();
void enableDtsKeyEdit(int index);
void enableMacMagicEdit(int index);
void enableDtsMagicCombobox(int index);
void copyToClipboard();
private:
Ui::FD44Editor *ui;
QString lastError;
bios_t opened;
bios_t readFromBIOS(const QByteArray & data);
QByteArray writeToBIOS(const QByteArray & data, const bios_t & bios);
bios_t readFromUI();
bool writeToUI(bios_t bios);
void dragEnterEvent(QDragEnterEvent* event);
void dropEvent(QDropEvent* event);
};
#endif // FD44EDITOR_H