source: s10k/Vago/xmlParsers/projectfilevago.h@ 1132

Last change on this file since 1132 was 1093, checked in by s10k, 7 years ago

Vago 1.4

File size: 3.2 KB
Line 
1/*
2 *
3Copyright (C) 2017 Fábio Bento (random-guy)
4
5This program is free software: you can redistribute it and/or modify
6it under the terms of the GNU General Public License as published by
7the Free Software Foundation, either version 3 of the License, or
8(at your option) any later version.
9
10This program is distributed in the hope that it will be useful,
11but WITHOUT ANY WARRANTY; without even the implied warranty of
12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13GNU General Public License for more details.
14
15You should have received a copy of the GNU General Public License
16along with this program. If not, see <http://www.gnu.org/licenses/>.
17*
18*/
19
20#ifndef PROJECTFILEVAGO_H
21#define PROJECTFILEVAGO_H
22
23#include "utilvago.h"
24#include <pugixml/pugixml.hpp>
25
26class ProjectFileVago
27{
28
29public:
30
31 struct ProjectTableRow{
32 QString fileFolder;
33 QString fromTo;
34 QString command;
35 bool isDisabled = false;
36 };
37
38 struct ProjectTable{
39 QVector<ProjectTableRow> rows;
40 QString from;
41 QString to;
42 };
43
44 struct ProjectXMLTable : public ProjectTable{};
45
46 struct ProjectTexturesTable: public ProjectTable{
47 QString rbTexturesType;
48 bool cbGenMipMaps = false;
49 bool cbNoUwrap = false;
50 bool cbNoVwrap = false;
51 bool cbLarge = false;
52 bool cbEnvMap = false;
53 QString leEnvMapTexture;
54 };
55
56 struct ProjectCharactersTable : public ProjectTable{
57 bool cbCellShading = false;
58 bool cbNormals = false;
59 bool cbStandingPose = false;
60 bool cbWithTRBS_ONCC = false;
61 QString leTRBS_ONCC;
62 };
63
64 struct ProjectObjectsTable : public ProjectTable{
65 bool cbTexture = false;
66 QString leTextureName;
67 bool cbWithAnimation = false;
68 QString leAnimationName;
69 };
70
71 struct ProjectLevelsTable : public ProjectTable{
72 bool cbSpecificFilesLevels = false;
73 QString leSpecificFilesLevels;
74 bool cbDatLevels = false;
75 QString leTargetDatLevels;
76 bool cbBnvLevels = false;
77 QString leBnvLevels;
78 bool cbGridsLevels = false;
79 bool cbAdditionalSourcesLevels = false;
80 QString leAdditSourcesLevels;
81 };
82
83 struct ProjectMiscTable : public ProjectTable{};
84
85 struct ProjectData{
86 ProjectXMLTable xmlTable;
87 ProjectTexturesTable texturesTable;
88 ProjectCharactersTable charactersTable;
89 ProjectObjectsTable objectsTable;
90 ProjectLevelsTable levelsTable;
91 ProjectMiscTable miscTable;
92 };
93
94public:
95 ProjectFileVago() = delete;
96 static ProjectFileVago::ProjectData readProjectDataFromFile(const QString &fileFullPath);
97 static void saveProjectDataToFile(const QString &fileFullPath, const ProjectData &newProjectData);
98private:
99 static void upgradeProjectFileIfNecessary(const QString &filePath);
100private:
101 static const QString XMLTableName;
102 static const QString TexturesTableName;
103 static const QString CharactersTableName;
104 static const QString ObjectsTableName;
105 static const QString LevelsTableName;
106 static const QString MiscTableName;
107};
108
109#endif // PROJECTFILEVAGO_H
Note: See TracBrowser for help on using the repository browser.