1 /*************************************************************************** 2 * Copyright (C) 2021 by Abderrahman Taha * 3 * * 4 * * 5 * This program is free software; you can redistribute it and/or modify * 6 * it under the terms of the GNU General Public License as published by * 7 * the Free Software Foundation; either version 2 of the License, or * 8 * (at your option) any later version. * 9 * * 10 * This program is distributed in the hope that it will be useful, * 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 13 * GNU General Public License for more details. * 14 * * 15 * You should have received a copy of the GNU General Public License * 16 * along with this program; if not, write to the * 17 * Free Software Foundation, Inc., * 18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * 19 ***************************************************************************/ 20 #include <QFileDialog> 21 #include <QJsonArray> 22 #include <QJsonDocument> 23 #include <QJsonObject> 24 #include <QStringList> 25 #include <QTextStream> 26 #include <iostream> 27 #include <qfile.h> 28 #include <qstring.h> 29 //#include <QDialog> 30 31 enum ModelType { PAR_TYPE, PAR_4D_TYPE, ISO_TYPE, PARISO_TYPE, UNDEFINED_TYPE }; 32 33 struct TreeStruct 34 { 35 QStringList name; 36 QStringList Component; 37 QStringList Const; 38 QStringList Funct; 39 QStringList Grid; 40 QStringList Vect; 41 QStringList Cnd; 42 QStringList RGBT; 43 QStringList VRGBT; 44 QStringList Gradient; 45 QString Noise; 46 QString text; 47 QStringList fxyz; 48 QStringList xmin; 49 QStringList xmax; 50 QStringList ymin; 51 QStringList ymax; 52 QStringList zmin; 53 QStringList zmax; 54 QStringList fx; 55 QStringList fy; 56 QStringList fz; 57 QStringList fw; 58 QStringList umin; 59 QStringList umax; 60 QStringList vmin; 61 QStringList vmax; 62 QStringList tmin; 63 QStringList tmax; 64 ModelType type; 65 }; 66 67 class ParisoMathObject 68 { 69 public: 70 int NbIsoStruct; 71 int NbParamStruct; 72 QJsonObject CurrentJsonObject; 73 QJsonArray MyJsonObjectSelection; 74 TreeStruct CurrentTreestruct; 75 std::vector<TreeStruct> CurrentParisoTreestruct; 76 QString dotsymbol; 77 78 public: 79 ParisoMathObject(); 80 ~ParisoMathObject(); 81 void ReadJsonFile(QString, QJsonObject &); 82 }; 83