"Fossies" - the Fresh Open Source Software Archive  

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

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

parametersoptions.cpp  (mathmod-10.1-source):parametersoptions.cpp  (mathmod-11.0-source)
/*************************************************************************** /***************************************************************************
* Copyright (C) 2020 by Abderrahman Taha * * Copyright (C) 2021 by Abderrahman Taha *
* * * *
* * * *
* This program is free software; you can redistribute it and/or modify * * 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 * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
* This program is distributed in the hope that it will be useful, * * This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of * * but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
skipping to change at line 31 skipping to change at line 31
#include "../fparser/fparser.hh" #include "../fparser/fparser.hh"
#include <QtGui> #include <QtGui>
#include <math.h> #include <math.h>
#include <sstream> #include <sstream>
#include <string> #include <string>
static bool MACOS = false; static bool MACOS = false;
Parametersoptions::Parametersoptions(QWidget *parent) : QWidget(parent) Parametersoptions::Parametersoptions(QWidget *parent) : QWidget(parent)
{ {
ControlX = 20;
ControlY = 20;
GlwinX = 575;
GlwinY = 20;
ControlW = 538;
ControlH = 700;
GlwinW = 780;
GlwinH = 700;
IsoMaxGrid = 305;
ParMaxGrid = 505;
InitParGrid = 50;
InitIsoGrid = 40;
dotsymbol = ".";
model = "CloseIso_2";
Shininess = 110;
Specular[0] = Specular[1] = Specular[2] = 0.5;
Specular[3] = 1.0;
Threads[0] = 8;
Threads[1] = 1;
Threads[2] = 64;
CalculFactor[0] = 4;
CalculFactor[1] = 4;
CalculFactor[2] = 4;
filecollection = "mathmodcollection.js";
fileconfig = "mathmodconfig.js";
advancedmodels = "advancedmodels.js";
darkpalette.setColor(QPalette::Window, QColor(53, 53, 53)); darkpalette.setColor(QPalette::Window, QColor(53, 53, 53));
darkpalette.setColor(QPalette::WindowText, QColor(255, 255, 255)); darkpalette.setColor(QPalette::WindowText, QColor(255, 255, 255));
darkpalette.setColor(QPalette::Base, QColor(15, 15, 15)); darkpalette.setColor(QPalette::Base, QColor(15, 15, 15));
darkpalette.setColor(QPalette::AlternateBase, QColor(53, 53, 53)); darkpalette.setColor(QPalette::AlternateBase, QColor(53, 53, 53));
darkpalette.setColor(QPalette::ToolTipBase, QColor(255, 255, 255)); darkpalette.setColor(QPalette::ToolTipBase, QColor(255, 255, 255));
darkpalette.setColor(QPalette::ToolTipText, QColor(255, 255, 255)); darkpalette.setColor(QPalette::ToolTipText, QColor(255, 255, 255));
darkpalette.setColor(QPalette::Text, QColor(255, 255, 255)); darkpalette.setColor(QPalette::Text, QColor(255, 255, 255));
darkpalette.setColor(QPalette::Button, QColor(53, 53, 53)); darkpalette.setColor(QPalette::Button, QColor(53, 53, 53));
darkpalette.setColor(QPalette::ButtonText, QColor(255, 255, 255)); darkpalette.setColor(QPalette::ButtonText, QColor(255, 255, 255));
darkpalette.setColor(QPalette::BrightText, QColor(255, 0, 0)); darkpalette.setColor(QPalette::BrightText, QColor(255, 0, 0));
skipping to change at line 564 skipping to change at line 538
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();
tmp2 = JConfig["OpenGlConfig"].toObject(); tmp2 = JConfig["OpenGlConfig"].toObject();
if (tmp2["GL_SPECULAR"].isArray()) if (tmp2["GL_SPECULAR"].isArray())
{ {
Specular[0] = Specular[0] =
float((tmp2["GL_SPECULAR"].toArray())[0].toDouble() / 100.0) (tmp2["GL_SPECULAR"].toArray())[0].toInt();
; Specular[1]=(tmp2["GL_SPECULAR"].toArray())[1].toInt();
Specular[1] = Specular[2]=(tmp2["GL_SPECULAR"].toArray())[2].toInt();
float((tmp2["GL_SPECULAR"].toArray())[1].toDouble() / 100.0) Specular[3]=(tmp2["GL_SPECULAR"].toArray())[3].toInt();
; }
Specular[2] =
float((tmp2["GL_SPECULAR"].toArray())[2].toDouble() / 100.0) if (tmp2["GL_AMBIENT"].isArray())
; {
Specular[3] = Ambient[0]=(tmp2["GL_AMBIENT"].toArray())[0].toInt();
float((tmp2["GL_SPECULAR"].toArray())[3].toDouble() / 100.0) Ambient[1]=(tmp2["GL_AMBIENT"].toArray())[1].toInt();
; Ambient[2]=(tmp2["GL_AMBIENT"].toArray())[2].toInt();
Ambient[3]=(tmp2["GL_AMBIENT"].toArray())[3].toInt();
}
if (tmp2["GL_DIFFUSE"].isArray())
{
Diffuse[0]=(tmp2["GL_DIFFUSE"].toArray())[0].toInt();
Diffuse[1]=(tmp2["GL_DIFFUSE"].toArray())[1].toInt();
Diffuse[2]=(tmp2["GL_DIFFUSE"].toArray())[2].toInt();
Diffuse[3]=(tmp2["GL_DIFFUSE"].toArray())[3].toInt();
} }
} }
if (JConfig["CalculFactorConfig"].isObject()) if (JConfig["CalculFactorConfig"].isObject())
{ {
QJsonObject tmp = JConfig["CalculFactorConfig"].toObject(); QJsonObject tmp = JConfig["CalculFactorConfig"].toObject();
CalculFactor[0] = tmp["FactX"].toInt(); CalculFactor[0] = tmp["FactX"].toInt();
CalculFactor[1] = tmp["FactY"].toInt(); CalculFactor[1] = tmp["FactY"].toInt();
CalculFactor[2] = tmp["FactZ"].toInt(); CalculFactor[2] = tmp["FactZ"].toInt();
} }
 End of changes. 3 change blocks. 
38 lines changed or deleted 21 lines changed or added

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