Select Git revision
Settings.cpp
Settings.cpp 7.27 KiB
/**
* @file Settings.cpp
* @author Ulrich Kemloh <kemlohulrich@gmail.com>
* @version 0.1
* Copyright (C) <2009-2010>
*
* @section LICENSE
* This file is part of OpenPedSim.
*
* OpenPedSim is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* OpenPedSim is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with OpenPedSim. If not, see <http://www.gnu.org/licenses/>.
*
* @section DESCRIPTION
*
* @brief
*
*
* Created on: 05.05.2009
*
*/
#include <iostream>
#include <QFileDialog>
#include <QMessageBox>
#include <QColorDialog>
#include "Settings.h"
#include "./src/geometry/LinePlotter.h"
using namespace std;
QColor Settings::tmpCaptionColor=QColor();
Settings::Settings(QWidget *parent)
: QWidget(parent)
{
ui.setupUi(this);
// initialize the output directory
QString dir;
SystemSettings::getOutputDirectory(dir);
ui.LEditOutputDir->setText(dir);
//restore the caption color parameter
char bgcolor[50];
sprintf(bgcolor,"background-color: rgb(%d, %d, %d);",tmpCaptionColor.red(),tmpCaptionColor.green(),tmpCaptionColor.blue());
ui.frameCaptionColorPreview->setStyleSheet(bgcolor);
}
Settings::~Settings()
{
}
void Settings::slotChangePedestrianShape()
{
int resolution=ui.CbEllipseResolution->currentText().toInt();
SystemSettings::setEllipseResolution(resolution);
extern_force_system_update=true;