-
Notifications
You must be signed in to change notification settings - Fork 15
/
MainWindow.h
126 lines (119 loc) · 3.66 KB
/
MainWindow.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
/****************************************************************************
** Deling Final Fantasy VIII Field Editor
** Copyright (C) 2009-2012 Arzel Jérôme <[email protected]>
**
** This program is free software: you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation, either version 3 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program. If not, see <http://www.gnu.org/licenses/>.
****************************************************************************/
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QtWidgets>
#include "files/MsdFile.h"
#include "FieldArchivePC.h"
#include "FieldArchivePS.h"
#include "FieldThread.h"
#include "Search.h"
#include "SearchAll.h"
#include "BGPreview.h"
#include "TextPreview.h"
#include "widgets/PageWidget.h"
#include "VarManager.h"
#include "MiscSearch.h"
#include "FsDialog.h"
#include "ConfigDialog.h"
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
enum Pages {
TextPage, ScriptPage, ModelPage, WalkmeshPage, BackgroundPage, EncounterPage, FontPage, MiscPage
};
enum ExportType {
MIM, MAP, LZK, one, mim, map, jsm, sym, msd, inf, id, ca, tdw, msk, mrt, rat, pmp, pmd, sfx, pvp
};
MainWindow();
public slots:
void openFile(QString path=QString());
private slots:
void filterMap();
void fillPage();
void fillBackground(const QImage &image);
void about();
int closeFiles(bool quit=false);
void setModified(bool modified=true);
void save();
void saveAs(QString path=QString());
void exportCurrent();
void exportAllScripts();
void exportAllEncounters();
void exportAllBackground();
void importCurrent();
void optimizeArchive();
void manageArchive();
void configDialog();
bool gotoField(int fieldID);
void gotoText(int fieldID, int textID, int from, int size);
void gotoScript(int fieldID, int groupID, int methodID, int opcodeID);
void search();
void varManager();
void runFF8();
void miscSearch();
void bgPage();
void setCurrentPage(int index);
void fullScreen();
void setGameLang(QAction *action);
signals:
void fieldIdChanged(int);
private:
bool openArchive(const QString &path);
bool openFsArchive(const QString &);
bool openMsdFile(const QString &);
bool openJsmFile(const QString &);
bool openIsoArchive(const QString &);
void setReadOnly(bool);
void buildGameLangMenu(const QStringList &langs);
FieldArchive *fieldArchive;
FieldPC *field;
Field *currentField;
FieldThread *fieldThread;//TODO
File *file;
MiscSearch *miscSearchD;
QLabel *currentPath;
Search *searchDialog;
SearchAll *searchAllDialog;
QAction *actionSave;
QAction *actionSaveAs;
QMenu *menuExportAll;
QAction *actionExport, *actionImport;
QAction *actionOpti;
QAction *actionClose;
QAction *actionFind;
QAction *actionRun;
QAction *actionGameLang;
QMenu *menuGameLang;
QAction *actionEncode;
QToolBar *toolBar;
QList<PageWidget *> pageWidgets;
QTreeWidget *list1;
QLineEdit *lineSearch;
BGPreview *bgPreview;
QTabBar *tabBar;
QStackedWidget *mainStackedWidget, *stackedWidget;
FsDialog *fsDialog;
VarManager *_varManager;
bool firstShow;
protected:
void showEvent(QShowEvent *);
void closeEvent(QCloseEvent *);
};
#endif // MAINWINDOW_H