StelApp.cpp   StelApp.cpp 
skipping to change at line 78 skipping to change at line 78
#include <QOpenGLContext> #include <QOpenGLContext>
#include <QOpenGLFramebufferObject> #include <QOpenGLFramebufferObject>
#include <QString> #include <QString>
#include <QStringList> #include <QStringList>
#include <QSysInfo> #include <QSysInfo>
#include <QTextStream> #include <QTextStream>
#include <QTimer> #include <QTimer>
#include <QDir> #include <QDir>
#include <QCoreApplication> #include <QCoreApplication>
#include <QScreen> #include <QScreen>
#include <QDateTime>
Q_IMPORT_PLUGIN(StelStandardGuiPluginInterface)
#ifdef USE_STATIC_PLUGIN_VIRGO
Q_IMPORT_PLUGIN(VirGOStelPluginInterface)
#endif
#ifdef USE_STATIC_PLUGIN_SVMT
Q_IMPORT_PLUGIN(SVMTStelPluginInterface)
#endif
#ifdef USE_STATIC_PLUGIN_HELLOSTELMODULE #ifdef USE_STATIC_PLUGIN_HELLOSTELMODULE
Q_IMPORT_PLUGIN(HelloStelModuleStelPluginInterface) Q_IMPORT_PLUGIN(HelloStelModuleStelPluginInterface)
#endif #endif
#ifdef USE_STATIC_PLUGIN_SIMPLEDRAWLINE #ifdef USE_STATIC_PLUGIN_SIMPLEDRAWLINE
Q_IMPORT_PLUGIN(SimpleDrawLineStelPluginInterface) Q_IMPORT_PLUGIN(SimpleDrawLineStelPluginInterface)
#endif #endif
#ifdef USE_STATIC_PLUGIN_ANGLEMEASURE #ifdef USE_STATIC_PLUGIN_ANGLEMEASURE
Q_IMPORT_PLUGIN(AngleMeasureStelPluginInterface) Q_IMPORT_PLUGIN(AngleMeasureStelPluginInterface)
#endif #endif
#ifdef USE_STATIC_PLUGIN_ARCHAEOLINES
Q_IMPORT_PLUGIN(ArchaeoLinesStelPluginInterface)
#endif
#ifdef USE_STATIC_PLUGIN_COMPASSMARKS #ifdef USE_STATIC_PLUGIN_COMPASSMARKS
Q_IMPORT_PLUGIN(CompassMarksStelPluginInterface) Q_IMPORT_PLUGIN(CompassMarksStelPluginInterface)
#endif #endif
#ifdef USE_STATIC_PLUGIN_SATELLITES #ifdef USE_STATIC_PLUGIN_SATELLITES
Q_IMPORT_PLUGIN(SatellitesStelPluginInterface) Q_IMPORT_PLUGIN(SatellitesStelPluginInterface)
#endif #endif
#ifdef USE_STATIC_PLUGIN_TEXTUSERINTERFACE #ifdef USE_STATIC_PLUGIN_TEXTUSERINTERFACE
Q_IMPORT_PLUGIN(TextUserInterfaceStelPluginInterface) Q_IMPORT_PLUGIN(TextUserInterfaceStelPluginInterface)
skipping to change at line 177 skipping to change at line 172
#endif #endif
#ifdef USE_STATIC_PLUGIN_POINTERCOORDINATES #ifdef USE_STATIC_PLUGIN_POINTERCOORDINATES
Q_IMPORT_PLUGIN(PointerCoordinatesStelPluginInterface) Q_IMPORT_PLUGIN(PointerCoordinatesStelPluginInterface)
#endif #endif
#ifdef USE_STATIC_PLUGIN_OBSERVABILITY #ifdef USE_STATIC_PLUGIN_OBSERVABILITY
Q_IMPORT_PLUGIN(ObservabilityStelPluginInterface) Q_IMPORT_PLUGIN(ObservabilityStelPluginInterface)
#endif #endif
#ifdef USE_STATIC_PLUGIN_SCENERY3D
Q_IMPORT_PLUGIN(Scenery3dStelPluginInterface)
#endif
// Initialize static variables // Initialize static variables
StelApp* StelApp::singleton = NULL; StelApp* StelApp::singleton = NULL;
QTime* StelApp::qtime = NULL; qint64 StelApp::startMSecs = 0;
void StelApp::initStatic() void StelApp::initStatic()
{ {
StelApp::qtime = new QTime(); StelApp::startMSecs = QDateTime::currentMSecsSinceEpoch();
StelApp::qtime->start();
} }
void StelApp::deinitStatic() void StelApp::deinitStatic()
{ {
delete StelApp::qtime; StelApp::startMSecs = 0;
StelApp::qtime = NULL;
} }
/************************************************************************* /*************************************************************************
Create and initialize the main Stellarium application. Create and initialize the main Stellarium application.
*************************************************************************/ *************************************************************************/
StelApp::StelApp(QObject* parent) StelApp::StelApp(QObject* parent)
: QObject(parent) : QObject(parent)
, core(NULL) , core(NULL)
, planetLocationMgr(NULL) , planetLocationMgr(NULL)
, audioMgr(NULL) , audioMgr(NULL)
skipping to change at line 222 skipping to change at line 219
, timefr(0.) , timefr(0.)
, timeBase(0.) , timeBase(0.)
, flagNightVision(false) , flagNightVision(false)
, confSettings(NULL) , confSettings(NULL)
, initialized(false) , initialized(false)
, saveProjW(-1) , saveProjW(-1)
, saveProjH(-1) , saveProjH(-1)
, baseFontSize(13) , baseFontSize(13)
, renderBuffer(NULL) , renderBuffer(NULL)
, viewportEffect(NULL) , viewportEffect(NULL)
, flagShowDecimalDegrees(false)
{ {
// Stat variables // Stat variables
nbDownloadedFiles=0; nbDownloadedFiles=0;
totalDownloadedSize=0; totalDownloadedSize=0;
nbUsedCache=0; nbUsedCache=0;
totalUsedCacheSize=0; totalUsedCacheSize=0;
setObjectName("StelApp"); setObjectName("StelApp");
skyCultureMgr=NULL; skyCultureMgr=NULL;
skipping to change at line 488 skipping to change at line 486
// Enable viewport effect at startup if he set // Enable viewport effect at startup if he set
setViewportEffect(confSettings->value("video/viewport_effect", "none ").toString()); setViewportEffect(confSettings->value("video/viewport_effect", "none ").toString());
// Proxy Initialisation // Proxy Initialisation
setupHttpProxy(); setupHttpProxy();
updateI18n(); updateI18n();
// Init actions. // Init actions.
actionMgr->addAction("actionShow_Night_Mode", N_("Display Options"), N_("Night mode"), this, "nightMode"); actionMgr->addAction("actionShow_Night_Mode", N_("Display Options"), N_("Night mode"), this, "nightMode");
setFlagShowDecimalDegrees(confSettings->value("gui/flag_show_decimal
_degrees", false).toBool());
initialized = true; initialized = true;
} }
// Load and initialize external modules (plugins) // Load and initialize external modules (plugins)
void StelApp::initPlugIns() void StelApp::initPlugIns()
{ {
// Load dynamically all the modules found in the modules/ directorie s // Load dynamically all the modules found in the modules/ directorie s
// which are configured to be loaded at startup // which are configured to be loaded at startup
foreach (StelModuleMgr::PluginDescriptor i, moduleMgr->getPluginsLis t()) foreach (StelModuleMgr::PluginDescriptor i, moduleMgr->getPluginsLis t())
{ {
skipping to change at line 739 skipping to change at line 739
//! Set flag for activating night vision mode //! Set flag for activating night vision mode
void StelApp::setVisionModeNight(bool b) void StelApp::setVisionModeNight(bool b)
{ {
if (flagNightVision!=b) if (flagNightVision!=b)
{ {
flagNightVision=b; flagNightVision=b;
emit(visionNightModeChanged(b)); emit(visionNightModeChanged(b));
} }
} }
void StelApp::setFlagShowDecimalDegrees(bool b)
{
flagShowDecimalDegrees = b;
}
// Update translations and font for sky everywhere in the program // Update translations and font for sky everywhere in the program
void StelApp::updateI18n() void StelApp::updateI18n()
{ {
#ifdef ENABLE_NLS #ifdef ENABLE_NLS
emit(languageChanged()); emit(languageChanged());
#endif #endif
} }
// Update and reload sky culture informations everywhere in the program // Update and reload sky culture informations everywhere in the program
void StelApp::updateSkyCulture() void StelApp::updateSkyCulture()
{ {
QString skyCultureDir = getSkyCultureMgr().getCurrentSkyCultureID(); QString skyCultureDir = getSkyCultureMgr().getCurrentSkyCultureID();
emit(skyCultureChanged(skyCultureDir)); emit(skyCultureChanged(skyCultureDir));
} }
// Return the time since when stellarium is running in second. // Return the time since when stellarium is running in second.
double StelApp::getTotalRunTime() double StelApp::getTotalRunTime()
{ {
return (double)(StelApp::qtime->elapsed())/1000.; return (double)(QDateTime::currentMSecsSinceEpoch() - StelApp::start MSecs)/1000.;
} }
void StelApp::reportFileDownloadFinished(QNetworkReply* reply) void StelApp::reportFileDownloadFinished(QNetworkReply* reply)
{ {
bool fromCache = reply->attribute(QNetworkRequest::SourceIsFromCache Attribute).toBool(); bool fromCache = reply->attribute(QNetworkRequest::SourceIsFromCache Attribute).toBool();
if (fromCache) if (fromCache)
{ {
++nbUsedCache; ++nbUsedCache;
totalUsedCacheSize+=reply->bytesAvailable(); totalUsedCacheSize+=reply->bytesAvailable();
} }
 End of changes. 10 change blocks. 
16 lines changed or deleted 22 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/