"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "ui_modules/parametersoptions.cpp" between
mathmod-11.0-source.zip and mathmod-11.1-source.zip

About: MathMod is a mathematical modeling software that visualize and animate implicit and parametric surfaces.

parametersoptions.cpp  (mathmod-11.0-source):parametersoptions.cpp  (mathmod-11.1-source)
skipping to change at line 357 skipping to change at line 357
} }
else if ((array[i].toObject())["Param4D"].isObject()) else if ((array[i].toObject())["Param4D"].isObject())
{ {
jpar newjpar; jpar newjpar;
jsobj = ((array[i].toObject())["Param4D"].toObject()); jsobj = ((array[i].toObject())["Param4D"].toObject());
newjpar.read(jsobj); newjpar.read(jsobj);
pariso.JPar.append(newjpar); pariso.JPar.append(newjpar);
a = (jsobj)["Name"].toArray()[0].toString(); a = (jsobj)["Name"].toArray()[0].toString();
lst.append(a); lst.append(a);
} }
else if ((array[i].toObject())["Param3D_C"].isObject())
{
jpar newjpar;
jsobj = ((array[i].toObject())["Param3D_C"].toObject());
newjpar.read(jsobj);
pariso.JPar.append(newjpar);
a = (jsobj)["Name"].toArray()[0].toString();
lst.append(a);
}
else if ((array[i].toObject())["Param4D_C"].isObject())
{
jpar newjpar;
jsobj = ((array[i].toObject())["Param4D_C"].toObject());
newjpar.read(jsobj);
pariso.JPar.append(newjpar);
a = (jsobj)["Name"].toArray()[0].toString();
lst.append(a);
}
else if ((array[i].toObject())["ParIso"].isArray()) else if ((array[i].toObject())["ParIso"].isArray())
{ {
jpariso newjpariso; jpariso newjpariso;
jpar newjpar; jpar newjpar;
jiso newjiso; jiso newjiso;
jsarray = ((array[i].toObject())["ParIso"].toArray()); jsarray = ((array[i].toObject())["ParIso"].toArray());
for(int i=0; i<jsarray.size(); i++) for(int i=0; i<jsarray.size(); i++)
{ {
if ((jsarray[i].toObject())["Param3D"].isObject()) if ((jsarray[i].toObject())["Param3D"].isObject())
{ {
jsobj = (jsarray[i].toObject())["Param3D"].toObject(); jsobj = (jsarray[i].toObject())["Param3D"].toObject();
newjpar.read(jsobj); newjpar.read(jsobj);
newjpariso.JPar = newjpar; newjpariso.JPar = newjpar;
} else if ((jsarray[i].toObject())["Iso3D"].isObject()) }
else if ((jsarray[i].toObject())["Param3D_C"].isObject())
{
jsobj = (jsarray[i].toObject())["Param3D_C"].toObject();
newjpar.read(jsobj);
newjpariso.JPar = newjpar;
}
else if ((jsarray[i].toObject())["Param4D_C"].isObject())
{
jsobj = (jsarray[i].toObject())["Param4D_C"].toObject();
newjpar.read(jsobj);
newjpariso.JPar = newjpar;
}
else if ((jsarray[i].toObject())["Iso3D"].isObject())
{ {
jsobj = (jsarray[i].toObject())["Iso3D"].toObject(); jsobj = (jsarray[i].toObject())["Iso3D"].toObject();
newjiso.read(jsobj); newjiso.read(jsobj);
newjpariso.JIso = newjiso; newjpariso.JIso = newjiso;
} }
} }
a = newjpariso.Name = (array[i].toObject())["Name"].toString(); a = newjpariso.Name = (array[i].toObject())["Name"].toString();
pariso.JParIso.append(newjpariso); pariso.JParIso.append(newjpariso);
lst.append(a); lst.append(a);
} }
skipping to change at line 431 skipping to change at line 462
bool Parametersoptions::isFloat(std::string myString) bool Parametersoptions::isFloat(std::string myString)
{ {
std::istringstream iss(myString); std::istringstream iss(myString);
float f; float f;
iss >> std::noskipws >> f; iss >> std::noskipws >> f;
return iss.eof() && !iss.fail(); return iss.eof() && !iss.fail();
} }
void Parametersoptions::LoadConfig(QApplication &app, int argc, char *argv[]) void Parametersoptions::LoadConfig(QApplication &app, int argc, char *argv[])
{ {
QString argv1; QString argv1="";
if (argc > 1) if (argc > 1)
{ {
argv1 = QString(argv[1]); argv1 = QString(argv[1]);
if (!argv1.endsWith("/")) if (!argv1.endsWith("/"))
argv1 += "/"; argv1 += "/";
filecollection = argv1 + filecollection; filecollection = argv1 + filecollection;
fileconfig = argv1 + fileconfig; fileconfig = argv1 + fileconfig;
advancedmodels = argv1 + advancedmodels; advancedmodels = argv1 + advancedmodels;
} }
/* /*
#ifdef Q_OS_MACOS #ifdef Q_OS_MACOS
else else
{ {
MACOS = true; MACOS = true;
argv1 ="../Resources/"; fileconfig2 = fileconfig2.remove(fileconfig2.size()-5, 5);
filecollection = argv1 + filecollection; filecollection = fileconfig2 + "Resources/" + filecollection;
fileconfig = argv1 + fileconfig; fileconfig = fileconfig2 + "Resources/" + fileconfig;
advancedmodels = argv1 + advancedmodels; advancedmodels = fileconfig2 + "Resources/" + advancedmodels;
} }
#endif #endif
*/ */
QFile mathmodfileconfig(fileconfig); QFile mathmodfileconfig(fileconfig);
if (!mathmodfileconfig.exists() && ((argc > 1) || MACOS)) if (!mathmodfileconfig.exists() && ((argc > 1) || MACOS))
{ {
QFile file3(":/mathmodconfig.js"); QFile file3(":/mathmodconfig.js");
file3.copy(fileconfig); file3.copy(fileconfig);
QFile::setPermissions(fileconfig, QFile::setPermissions(fileconfig,
QFileDevice::ReadOwner | QFileDevice::WriteOwner); QFileDevice::ReadOwner | QFileDevice::WriteOwner);
} }
skipping to change at line 532 skipping to change at line 563
ControlW = tmp["ControlW"].toInt(); ControlW = tmp["ControlW"].toInt();
ControlH = tmp["ControlH"].toInt(); ControlH = tmp["ControlH"].toInt();
GlwinW = tmp["GlwinW"].toInt(); GlwinW = tmp["GlwinW"].toInt();
GlwinH = tmp["GlwinH"].toInt(); GlwinH = tmp["GlwinH"].toInt();
} }
if (JConfig["OpenGlConfig"].isObject()) if (JConfig["OpenGlConfig"].isObject())
{ {
QJsonObject tmp1, tmp2; QJsonObject tmp1, tmp2;
tmp1 = JConfig["OpenGlConfig"].toObject(); tmp1 = JConfig["OpenGlConfig"].toObject();
Shininess = tmp1["GL_SHININESS"].toInt(); Shininess = tmp1["GL_SHININESS"].toInt();
if (tmp1["GL_FrontFacingSupport"].isBool())
glFrontFacingSupport = tmp1["GL_FrontFacingSupport"].toBool();
tmp2 = JConfig["OpenGlConfig"].toObject(); tmp2 = JConfig["OpenGlConfig"].toObject();
if (tmp2["GL_SPECULAR"].isArray()) if (tmp2["GL_SPECULAR"].isArray())
{ {
Specular[0] = Specular[0] =
(tmp2["GL_SPECULAR"].toArray())[0].toInt(); (tmp2["GL_SPECULAR"].toArray())[0].toInt();
Specular[1]=(tmp2["GL_SPECULAR"].toArray())[1].toInt(); Specular[1]=(tmp2["GL_SPECULAR"].toArray())[1].toInt();
Specular[2]=(tmp2["GL_SPECULAR"].toArray())[2].toInt(); Specular[2]=(tmp2["GL_SPECULAR"].toArray())[2].toInt();
Specular[3]=(tmp2["GL_SPECULAR"].toArray())[3].toInt(); Specular[3]=(tmp2["GL_SPECULAR"].toArray())[3].toInt();
} }
 End of changes. 6 change blocks. 
12 lines changed or deleted 47 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)