2014-08-28 13:09:47 +00:00
|
|
|
#include "AtmosphereModeler.h"
|
|
|
|
|
|
|
|
#include "MainModelerWindow.h"
|
|
|
|
#include "Scenery.h"
|
|
|
|
#include "AtmosphereDefinition.h"
|
|
|
|
#include "OpenGLRenderer.h"
|
|
|
|
#include "OpenGLSkybox.h"
|
2015-07-26 16:30:30 +00:00
|
|
|
#include "OpenGLTerrain.h"
|
2015-08-18 18:31:11 +00:00
|
|
|
#include "FloatNode.h"
|
2014-08-28 13:09:47 +00:00
|
|
|
|
|
|
|
AtmosphereModeler::AtmosphereModeler(MainModelerWindow *main):
|
|
|
|
main(main)
|
|
|
|
{
|
|
|
|
QObject *item = main->findQmlObject("atmosphere_daytime");
|
|
|
|
if (item)
|
|
|
|
{
|
2015-08-18 18:31:11 +00:00
|
|
|
item->setProperty("value", propDayTime()->getValue());
|
2014-08-28 13:09:47 +00:00
|
|
|
connect(item, SIGNAL(changed(double)), this, SLOT(daytimeChanged(double)));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void AtmosphereModeler::daytimeChanged(double value)
|
|
|
|
{
|
2015-08-18 18:31:11 +00:00
|
|
|
propDayTime()->setValue(value);
|
|
|
|
}
|
2015-07-26 16:30:30 +00:00
|
|
|
|
2015-08-18 18:31:11 +00:00
|
|
|
FloatNode *AtmosphereModeler::propDayTime() const
|
|
|
|
{
|
|
|
|
return main->getScenery()->getAtmosphere()->propDayTime();
|
2014-08-28 13:09:47 +00:00
|
|
|
}
|