SceneInfo.cpp   SceneInfo.cpp 
skipping to change at line 18 skipping to change at line 18
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (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
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, U SA. * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
*/ */
#include "SceneInfo.hpp" #include "SceneInfo.hpp"
#include "Scenery3dMgr.hpp" #include "Scenery3dMgr.hpp"
#include "StelApp.hpp" #include "StelApp.hpp"
#include "StelModuleMgr.hpp" #include "StelModuleMgr.hpp"
#include "StelFileMgr.hpp" #include "StelFileMgr.hpp"
#include "StelIniParser.hpp" #include "StelIniParser.hpp"
#include "StelLocaleMgr.hpp" #include "StelLocaleMgr.hpp"
skipping to change at line 462 skipping to change at line 462
for(int i =0;i<size;++i) for(int i =0;i<size;++i)
{ {
ini.setArrayIndex(i); ini.setArrayIndex(i);
StoredView sv; StoredView sv;
sv.isGlobal = isGlobal; sv.isGlobal = isGlobal;
sv.label = ini.value("label").toString(); sv.label = ini.value("label").toString();
sv.description = ini.value("description").toString(); sv.description = ini.value("description").toString();
sv.position = StelUtils::strToVec4d(ini.value("position").to String()); sv.position = StelUtils::strToVec4d(ini.value("position").to String());
sv.view_fov = StelUtils::strToVec3f(ini.value("view_fov").to String()); sv.view_fov = StelUtils::strToVec3f(ini.value("view_fov").to String());
if (ini.contains("JD"))
{
sv.jdIsRelevant=true;
sv.jd=ini.value("JD").toDouble();
}
else
sv.jdIsRelevant=false;
list.append(sv); list.append(sv);
} }
} }
void StoredView::writeArray(QSettings &ini, const StoredViewList &list) void StoredView::writeArray(QSettings &ini, const StoredViewList &list)
{ {
for(int i =0;i<list.size();++i) for(int i =0;i<list.size();++i)
{ {
const StoredView& view = list.at(i); const StoredView& view = list.at(i);
ini.setArrayIndex(i); ini.setArrayIndex(i);
ini.setValue("label", view.label); ini.setValue("label", view.label);
ini.setValue("description", view.description); ini.setValue("description", view.description);
ini.setValue("position", StelUtils::vec4dToStr(view.position )); ini.setValue("position", StelUtils::vec4dToStr(view.position ));
ini.setValue("view_fov", StelUtils::vec3fToStr(view.view_fov )); ini.setValue("view_fov", StelUtils::vec3fToStr(view.view_fov ));
if (view.jdIsRelevant)
ini.setValue("JD", (view.jd));
} }
} }
QSettings* StoredView::getUserViews() QSettings* StoredView::getUserViews()
{ {
if(userviews) if(userviews)
return userviews; return userviews;
//try to find an writable location //try to find an writable location
QString file = StelFileMgr::findFile(USERVIEWS_FILE, StelFileMgr::Fl ags(StelFileMgr::Writable|StelFileMgr::File)); QString file = StelFileMgr::findFile(USERVIEWS_FILE, StelFileMgr::Fl ags(StelFileMgr::Writable|StelFileMgr::File));
 End of changes. 3 change blocks. 
1 lines changed or deleted 10 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/