forked from myst6re/makoureactor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Window.h
157 lines (138 loc) · 4.45 KB
/
Window.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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
/****************************************************************************
** Makou Reactor Final Fantasy VII Field Script Editor
** Copyright (C) 2009-2013 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 DEF_WINDOW
#define DEF_WINDOW
#include <QtWidgets>
#include "core/field/FieldArchive.h"
#include "widgets/FieldList.h"
#include "widgets/ScriptManager.h"
#include "widgets/VarManager.h"
#include "widgets/TextManager.h"
#include "widgets/BGDialog.h"
#include "widgets/ApercuBG.h"
#include "widgets/Search.h"
#include "widgets/FieldModel.h"
#include "widgets/ModelManagerPC.h"
#include "widgets/ModelManagerPS.h"
#include "widgets/TutWidget.h"
#include "widgets/WalkmeshManager.h"
#include "widgets/QTaskBarButton.h"
#include "widgets/LgpDialog.h"
#include "widgets/Splitter.h"
//#include "FieldModelThread.h"
class Window : public QMainWindow, ArchiveObserver
{
Q_OBJECT
public:
explicit Window();
virtual ~Window();
void open(const QString &cheminFic, FieldArchiveIO::Type type, bool isPS);
FieldArchive::Sorting getFieldSorting();
bool observerWasCanceled() const;
void setObserverMaximum(unsigned int max);
void setObserverValue(int value);
int currentFieldId() const;
inline TextManager *textWidget() const {
return _textDialog;
}
inline ScriptManager *scriptWidget() const {
return _scriptManager;
}
public slots:
void openFile(const QString &path=QString());
void openDir();
void setModified(bool enabled=true);
void saveAs(bool currentPath=false);
void save();
int closeFile(bool quit=false);
bool gotoField(int fieldID);
void gotoOpcode(int fieldID, int grpScriptID, int scriptID, int opcodeID);
void gotoText(int fieldID, int textID, int from, int size);
void jpText(bool);
// void notifyFileChanged(const QString &path);
// void notifyDirectoryChanged(const QString &path);
void exporter();
void massExport();
void massImport();
void importer();
void varManager();
void runFF7();
void textManager(int textID=-1, int from=0, int size=0, bool activate=true);
void modelManager();
void encounterManager();
void tutManager();
void walkmeshManager();
void backgroundManager();
void miscManager();
void searchManager();
void archiveManager();
void miscOperations();
void fontManager();
void about();
private slots:
void openRecentFile(QAction *action);
void disableEditors();
void openField(bool reload=false);
void showModel(int grpScriptID);
void showModel(Field *field, FieldModelFile *fieldModelFile);
void changeLanguage(QAction *);
void toggleFieldList();
void toggleBackgroundPreview();
void config();
private:
void setWindowTitle();
void restartNow();
void showProgression(const QString &message, bool canBeCanceled);
void hideProgression();
QProgressDialog *progressDialog();
void fillRecentMenu();
QLineEdit *lineSearch;
FieldList *fieldList;
QStackedWidget *zonePreview;
ApercuBG *zoneImage;
FieldModel *fieldModel;
Splitter *horizontalSplitter, *verticalSplitter;
QToolBar *toolBar;
FieldArchive *fieldArchive;
Field *field;
bool firstShow;
Search *searchDialog;
VarManager *varDialog;
QMenu *_recentMenu;
QAction *actionSave, *actionSaveAs, *actionExport;
QAction *actionMassExport, *actionImport, *actionMassImport, *actionClose;
QAction *actionRun, *actionModels, *actionArchive;
QAction *actionEncounter;
QAction *actionMisc, *actionMiscOperations, *actionJp_txt;
QMenu *menuLang;
ScriptManager *_scriptManager;
TextManager *_textDialog;
ModelManager *_modelManager;
TutWidget *_tutManager;
WalkmeshManager *_walkmeshManager;
BGDialog *_backgroundManager;
QTaskBarButton *taskBarButton;
QProgressDialog *_progressDialog;
QAction *authorAction;
QLabel *authorLbl;
// FieldModelThread *modelThread;
protected:
void closeEvent(QCloseEvent *event);
QMenu *createPopupMenu();
};
#endif