当前位置: 首页>>代码示例>>C++>>正文


C++ SolarSystem::getFlagLabels方法代码示例

本文整理汇总了C++中SolarSystem::getFlagLabels方法的典型用法代码示例。如果您正苦于以下问题:C++ SolarSystem::getFlagLabels方法的具体用法?C++ SolarSystem::getFlagLabels怎么用?C++ SolarSystem::getFlagLabels使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SolarSystem的用法示例。


在下文中一共展示了SolarSystem::getFlagLabels方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: update

void StelGui::update()
{
	StelCore* core = StelApp::getInstance().getCore();
	if (core->getTimeRate()<-0.99*StelCore::JD_SECOND) {
		if (buttonTimeRewind->isChecked()==false)
			buttonTimeRewind->setChecked(true);
	} else {
		if (buttonTimeRewind->isChecked()==true)
			buttonTimeRewind->setChecked(false);
	}
	if (core->getTimeRate()>1.01*StelCore::JD_SECOND) {
		if (buttonTimeForward->isChecked()==false) {
			buttonTimeForward->setChecked(true);
		}
	} else {
		if (buttonTimeForward->isChecked()==true)
			buttonTimeForward->setChecked(false);
	}
	if (core->getTimeRate() == 0) {
		if (buttonTimeRealTimeSpeed->isChecked() != StelButton::ButtonStateNoChange)
			buttonTimeRealTimeSpeed->setChecked(StelButton::ButtonStateNoChange);
	} else if (core->getRealTimeSpeed()) {
		if (buttonTimeRealTimeSpeed->isChecked() != StelButton::ButtonStateOn)
			buttonTimeRealTimeSpeed->setChecked(StelButton::ButtonStateOn);
	} else if (buttonTimeRealTimeSpeed->isChecked() != StelButton::ButtonStateOff) {
		buttonTimeRealTimeSpeed->setChecked(StelButton::ButtonStateOff);
	}
	const bool isTimeNow=core->getIsTimeNow();
	if (buttonTimeCurrent->isChecked()!=isTimeNow) {
		buttonTimeCurrent->setChecked(isTimeNow);
	}
	StelMovementMgr* mmgr = GETSTELMODULE(StelMovementMgr);
	const bool b = mmgr->getFlagTracking();
	if (buttonGotoSelectedObject->isChecked()!=b) {
		buttonGotoSelectedObject->setChecked(b);
	}

	bool flag = GETSTELMODULE(StarMgr)->getFlagStars();
	if (getGuiAction("actionShow_Stars")->isChecked() != flag) {
		getGuiAction("actionShow_Stars")->setChecked(flag);
	}

	flag = GETSTELMODULE(NebulaMgr)->getFlagHints();
	if (getGuiAction("actionShow_Nebulas")->isChecked() != flag)
		getGuiAction("actionShow_Nebulas")->setChecked(flag);

	flag = GETSTELMODULE(StelSkyLayerMgr)->getFlagShow();
	if (getGuiAction("actionShow_DSS")->isChecked() != flag)
		getGuiAction("actionShow_DSS")->setChecked(flag);

	flag = mmgr->getMountMode() != StelMovementMgr::MountAltAzimuthal;
	if (getGuiAction("actionSwitch_Equatorial_Mount")->isChecked() != flag)
		getGuiAction("actionSwitch_Equatorial_Mount")->setChecked(flag);

	SolarSystem* ssmgr = GETSTELMODULE(SolarSystem);
	flag = ssmgr->getFlagLabels();
	if (getGuiAction("actionShow_Planets_Labels")->isChecked() != flag)
		getGuiAction("actionShow_Planets_Labels")->setChecked(flag);
	flag = ssmgr->getFlagOrbits();
	if (getGuiAction("actionShow_Planets_Orbits")->isChecked() != flag)
		getGuiAction("actionShow_Planets_Orbits")->setChecked(flag);
	flag = ssmgr->getFlagTrails();
	if (getGuiAction("actionShow_Planets_Trails")->isChecked() != flag)
		getGuiAction("actionShow_Planets_Trails")->setChecked(flag);
	flag = StelApp::getInstance().getVisionModeNight();
	if (getGuiAction("actionShow_Night_Mode")->isChecked() != flag)
		getGuiAction("actionShow_Night_Mode")->setChecked(flag);
	flag = StelMainWindow::getInstance().isFullScreen();
	if (getGuiAction("actionSet_Full_Screen_Global")->isChecked() != flag)
		getGuiAction("actionSet_Full_Screen_Global")->setChecked(flag);

	skyGui->infoPanel->setTextFromObjects(GETSTELMODULE(StelObjectMgr)->getSelectedObject());

	// Check if the progressbar window changed, if yes update the whole view
	if (savedProgressBarSize!=skyGui->progressBarMgr->boundingRect().size())
	{
		savedProgressBarSize=skyGui->progressBarMgr->boundingRect().size();
		skyGui->updateBarsPos();
	}

	dateTimeDialog->setDateTime(core->getJDay());
}
开发者ID:EvilTosha,项目名称:Stellarium-GSoC12,代码行数:82,代码来源:StelGui.cpp

示例2: init


//.........这里部分代码省略.........
	connect(tempAction, SIGNAL(toggled(bool)),
	        dateTimeDialog, SLOT(setVisible(bool)));
	connect(dateTimeDialog, SIGNAL(visibleChanged(bool)),
	        tempAction, SLOT(setChecked(bool)));

	tempAction = getGuiAction("actionShow_Search_Window_Global");
	connect(tempAction, SIGNAL(toggled(bool)),
	        searchDialog, SLOT(setVisible(bool)));
	connect(searchDialog, SIGNAL(visibleChanged(bool)),
	        tempAction, SLOT(setChecked(bool)));

	tempAction = getGuiAction("actionShow_Shortcuts_Window_Global");
	connect(tempAction, SIGNAL(toggled(bool)),
					shortcutsDialog, SLOT(setVisible(bool)));
	connect(shortcutsDialog, SIGNAL(visibleChanged(bool)),
					tempAction, SLOT(setChecked(bool)));

	connect(getGuiAction("actionSave_Screenshot_Global"), SIGNAL(triggered()), &StelMainGraphicsView::getInstance(), SLOT(saveScreenShot()));
	connect(getGuiAction("actionSave_Copy_Object_Information_Global"), SIGNAL(triggered()), this, SLOT(copySelectedObjectInfo()));

	getGuiAction("actionToggle_GuiHidden_Global")->setChecked(true);
	connect(getGuiAction("actionToggle_GuiHidden_Global"), SIGNAL(toggled(bool)), this, SLOT(setGuiVisible(bool)));

	connect(getGuiAction("actionHorizontal_Flip"), SIGNAL(toggled(bool)), StelApp::getInstance().getCore(), SLOT(setFlipHorz(bool)));
	getGuiAction("actionHorizontal_Flip")->setChecked(StelApp::getInstance().getCore()->getFlipHorz());
	connect(getGuiAction("actionVertical_Flip"), SIGNAL(toggled(bool)), StelApp::getInstance().getCore(), SLOT(setFlipVert(bool)));
	getGuiAction("actionVertical_Flip")->setChecked(StelApp::getInstance().getCore()->getFlipVert());

	StarMgr* smgr = GETSTELMODULE(StarMgr);
	connect(getGuiAction("actionShow_Stars"), SIGNAL(toggled(bool)), smgr, SLOT(setFlagStars(bool)));
	getGuiAction("actionShow_Stars")->setChecked(smgr->getFlagStars());

	connect(getGuiAction("actionShow_Stars_Labels"), SIGNAL(toggled(bool)), smgr, SLOT(setFlagLabels(bool)));
	getGuiAction("actionShow_Stars_Labels")->setChecked(smgr->getFlagLabels());

	SolarSystem* ssmgr = GETSTELMODULE(SolarSystem);
	connect(getGuiAction("actionShow_Planets_Labels"), SIGNAL(toggled(bool)), ssmgr, SLOT(setFlagLabels(bool)));
	getGuiAction("actionShow_Planets_Labels")->setChecked(ssmgr->getFlagLabels());

	connect(getGuiAction("actionShow_Planets_Orbits"), SIGNAL(toggled(bool)), ssmgr, SLOT(setFlagOrbits(bool)));
	getGuiAction("actionShow_Planets_Orbits")->setChecked(ssmgr->getFlagOrbits());

	connect(getGuiAction("actionShow_Planets_Trails"), SIGNAL(toggled(bool)), ssmgr, SLOT(setFlagTrails(bool)));
	getGuiAction("actionShow_Planets_Trails")->setChecked(ssmgr->getFlagTrails());

	QSettings* conf = StelApp::getInstance().getSettings();
	Q_ASSERT(conf);
	setAutoHideHorizontalButtonBar(conf->value("gui/auto_hide_horizontal_toolbar", true).toBool());
	setAutoHideVerticalButtonBar(conf->value("gui/auto_hide_vertical_toolbar", true).toBool());
	connect(getGuiAction("actionAutoHideHorizontalButtonBar"), SIGNAL(toggled(bool)), this, SLOT(setAutoHideHorizontalButtonBar(bool)));
	getGuiAction("actionAutoHideHorizontalButtonBar")->setChecked(getAutoHideHorizontalButtonBar());
	connect(getGuiAction("actionAutoHideVerticalButtonBar"), SIGNAL(toggled(bool)), this, SLOT(setAutoHideVerticalButtonBar(bool)));
	getGuiAction("actionAutoHideVerticalButtonBar")->setChecked(getAutoHideVerticalButtonBar());

#ifndef DISABLE_SCRIPTING
	StelScriptMgr& scriptMgr = StelMainGraphicsView::getInstance().getScriptMgr();
	connect(&scriptMgr, SIGNAL(scriptRunning()), this, SLOT(scriptStarted()));
	connect(&scriptMgr, SIGNAL(scriptStopped()), this, SLOT(scriptStopped()));
#endif

	///////////////////////////////////////////////////////////////////////////
	//// QGraphicsView based GUI
	///////////////////////////////////////////////////////////////////////////

	// Add everything
	QPixmap pxmapDefault;
开发者ID:EvilTosha,项目名称:Stellarium-GSoC12,代码行数:67,代码来源:StelGui.cpp


注:本文中的SolarSystem::getFlagLabels方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。