本文整理汇总了C++中SolarSystem::init方法的典型用法代码示例。如果您正苦于以下问题:C++ SolarSystem::init方法的具体用法?C++ SolarSystem::init怎么用?C++ SolarSystem::init使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SolarSystem
的用法示例。
在下文中一共展示了SolarSystem::init方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: init
void StelApp::init(QSettings* conf)
{
confSettings = conf;
devicePixelsPerPixel = QOpenGLContext::currentContext()->screen()->devicePixelRatio();
setBaseFontSize(confSettings->value("gui/base_font_size", 13).toInt());
core = new StelCore();
if (saveProjW!=-1 && saveProjH!=-1)
core->windowHasBeenResized(0, 0, saveProjW, saveProjH);
// Initialize AFTER creation of openGL context
textureMgr = new StelTextureMgr();
textureMgr->init();
networkAccessManager = new QNetworkAccessManager(this);
// Activate http cache if Qt version >= 4.5
QNetworkDiskCache* cache = new QNetworkDiskCache(networkAccessManager);
QString cachePath = StelFileMgr::getCacheDir();
qDebug() << "Cache directory is: " << QDir::toNativeSeparators(cachePath);
cache->setCacheDirectory(cachePath);
networkAccessManager->setCache(cache);
connect(networkAccessManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(reportFileDownloadFinished(QNetworkReply*)));
// Stel Object Data Base manager
stelObjectMgr = new StelObjectMgr();
stelObjectMgr->init();
getModuleMgr().registerModule(stelObjectMgr);
localeMgr = new StelLocaleMgr();
skyCultureMgr = new StelSkyCultureMgr();
planetLocationMgr = new StelLocationMgr();
actionMgr = new StelActionMgr();
localeMgr->init();
// Init the solar system first
SolarSystem* ssystem = new SolarSystem();
ssystem->init();
getModuleMgr().registerModule(ssystem);
// Load hipparcos stars & names
StarMgr* hip_stars = new StarMgr();
hip_stars->init();
getModuleMgr().registerModule(hip_stars);
core->init();
// Init nebulas
NebulaMgr* nebulas = new NebulaMgr();
nebulas->init();
getModuleMgr().registerModule(nebulas);
// Init milky way
MilkyWay* milky_way = new MilkyWay();
milky_way->init();
getModuleMgr().registerModule(milky_way);
// Init zodiacal light
ZodiacalLight* zodiacal_light = new ZodiacalLight();
zodiacal_light->init();
getModuleMgr().registerModule(zodiacal_light);
// Init sky image manager
skyImageMgr = new StelSkyLayerMgr();
skyImageMgr->init();
getModuleMgr().registerModule(skyImageMgr);
// Init audio manager
audioMgr = new StelAudioMgr();
// Init video manager
videoMgr = new StelVideoMgr();
// Constellations
ConstellationMgr* asterisms = new ConstellationMgr(hip_stars);
asterisms->init();
getModuleMgr().registerModule(asterisms);
// Landscape, atmosphere & cardinal points section
LandscapeMgr* landscape = new LandscapeMgr();
landscape->init();
getModuleMgr().registerModule(landscape);
GridLinesMgr* gridLines = new GridLinesMgr();
gridLines->init();
getModuleMgr().registerModule(gridLines);
// Sporadic Meteors
SporadicMeteorMgr* meteors = new SporadicMeteorMgr(10, 72);
meteors->init();
getModuleMgr().registerModule(meteors);
// User labels
LabelMgr* skyLabels = new LabelMgr();
skyLabels->init();
getModuleMgr().registerModule(skyLabels);
//.........这里部分代码省略.........