示例#1
0
void StelGui::initConstellationMgr()
{
	ConstellationMgr* constellationMgr = GETSTELMODULE(ConstellationMgr);
	getGuiAction("actionShow_Constellation_Lines")->setChecked(constellationMgr->getFlagLines());
	connect(getGuiAction("actionShow_Constellation_Lines"),
					SIGNAL(toggled(bool)),
					constellationMgr,
					SLOT(setFlagLines(bool)));
	connect(constellationMgr,
					SIGNAL(linesDisplayedChanged(const bool)),
					this,
					SLOT(linesDisplayedUpdated(const bool)));

	getGuiAction("actionShow_Constellation_Art")->setChecked(constellationMgr->getFlagArt());
	connect(getGuiAction("actionShow_Constellation_Art"),
					SIGNAL(toggled(bool)),
					constellationMgr,
					SLOT(setFlagArt(bool)));
	connect(constellationMgr,
					SIGNAL(artDisplayedChanged(const bool)),
					this,
					SLOT(artDisplayedUpdated(const bool)));

	getGuiAction("actionShow_Constellation_Labels")->setChecked(constellationMgr->getFlagLabels());
	connect(getGuiAction("actionShow_Constellation_Labels"),
					SIGNAL(toggled(bool)),
					constellationMgr,
					SLOT(setFlagLabels(bool)));
	connect(constellationMgr,
					SIGNAL(namesDisplayedChanged(const bool)),
					this,
					SLOT(namesDisplayedUpdated(const bool)));

	getGuiAction("actionShow_Constellation_Boundaries")->setChecked(constellationMgr->getFlagBoundaries());
	connect(getGuiAction("actionShow_Constellation_Boundaries"),
					SIGNAL(toggled(bool)),
					constellationMgr,
					SLOT(setFlagBoundaries(bool)));
	connect(constellationMgr,
					SIGNAL(boundariesDisplayedChanged(const bool)),
					this,
					SLOT(boundariesDisplayedUpdated(const bool)));
}