-
Notifications
You must be signed in to change notification settings - Fork 0
/
mainwindow.h
163 lines (107 loc) · 4.22 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
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
158
159
160
161
162
163
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QStringListModel>
#include <QMessageBox>
#include <QFileDialog>
#include <QFormLayout>
#include <QMouseEvent>
#include <QInputDialog>
#include "shipnamelist.h"
#include "localkeylist.h"
#include "fleetnamelist.h"
#include "armynamelist.h"
#include "planetnamelist.h"
#include "characternamelist.h"
#include "savedatafiles.h"
#include "loaddatafiles.h"
#include "inputnamesdialog.h"
#include "name_list_defaults.h"
QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
MainWindow(QWidget *parent = nullptr);
~MainWindow();
private:
void ResetTree();
void ResetDict();
void ResetNameList();
void InitLocalKeyList();
void InitShipNameList();
void InitFleetNameList();
void InitArmyNameList();
void InitPlanetNameList();
void InitCharacterNameList();
void UpdateKeys(std::vector<QString> keys, TreeItem* node, QListView* listView);
// Loads in file data and dump it all into a string
bool LoadLocalKeyFile(QString* filePath);
bool LoadNameListFile(QString* filePath);
void mousePressEvent(QMouseEvent *event);
private slots:
void on_comboBox_ship_categories_currentIndexChanged(int index);
void on_comboBox_fleet_name_categories_currentIndexChanged(int index);
void on_comboBox_planet_categories_currentIndexChanged(int index);
void on_comboBox_character_name_set_currentIndexChanged(int index);
void on_comboBox_character_name_categories_currentIndexChanged(int index);
void on_comboBox_army_name_categories_currentIndexChanged(int index);
void on_comboBox_army_name_type_currentIndexChanged(int index);
void on_actionOpen_Name_List_triggered();
void on_actionOpen_Localization_triggered();
void on_pushButton_clicked();
void on_actionName_triggered();
void on_actionCreate_New_Name_List_triggered();
void on_actionSave_As_triggered();
void on_actionLocalization_Keys_triggered();
void on_actionToggle_Localization_Keys_triggered(bool checked);
void on_pushButton_planet_add_category_clicked();
void on_actionExit_triggered();
void on_actionCloseNameList_triggered();
void on_lineEdit_character_name_set_weight_textEdited(const QString &arg1);
void on_pushButton_character_add_name_set_clicked();
void on_pushButton_character_add_name_category_clicked();
void on_pushButton_character_add_names_clicked();
void on_listView_character_doubleClicked(const QModelIndex &index);
void on_pushButton_army_add_category_clicked();
void on_pushButton_army_add_names_clicked();
void on_pushButton_army_add_type_clicked();
void on_listView_army_doubleClicked(const QModelIndex &index);
void on_pushButton_fleet_add_category_clicked();
void on_pushButton_fleet_add_names_clicked();
void on_listView_fleet_doubleClicked(const QModelIndex &index);
void on_pushButton_ship_add_category_clicked();
void on_pushButton_ship_add_names_clicked();
void on_listView_ship_doubleClicked(const QModelIndex &index);
void on_pushButton_character_remove_name_set_clicked();
void on_pushButton_character_edit_name_set_clicked();
void on_pushButton_character_remove_name_category_clicked();
void on_pushButton_character_edit_name_category_clicked();
void on_pushButton_planet_remove_category_clicked();
void on_pushButton_planet_edit_category_clicked();
void on_pushButton_army_remove_category_clicked();
void on_pushButton_army_edit_category_clicked();
void on_pushButton_army_remove_type_clicked();
void on_pushButton_army_edit_type_clicked();
void on_lineEdit_alias_editingFinished();
void on_actionSave_triggered();
private:
Ui::MainWindow *ui;
ShipNameList shipNameList;
FleetNameList fleetNameList;
ArmyNameList armyNameList;
PlanetNameList planetNameList;
CharacterNameList characterNameList;
LocalKeyList localKeyList;
QMessageBox errorMessageBox;
QString localKeyFileString;
QString nameListFileString;
QString localKeyFilePath;
QString nameListFilePath;
LoadTree tree;
LoadDict dict;
NameListDefaults nld;
};
#endif // MAINWINDOW_H