Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 317465
Collapse All | Expand All

(-)plugins/Oculars/src/Oculars.cpp.old (-14 / +14 lines)
Lines 227-234 double Oculars::getCallOrder(StelModuleA Link Here
227
227
228
void Oculars::handleMouseClicks(class QMouseEvent* event)
228
void Oculars::handleMouseClicks(class QMouseEvent* event)
229
{
229
{
230
	StelCore::StelCore *core = StelApp::getInstance().getCore();
230
	StelCore *core = StelApp::getInstance().getCore();
231
	StelMovementMgr::StelMovementMgr *movementManager = core->getMovementMgr();
231
	StelMovementMgr *movementManager = core->getMovementMgr();
232
	if (StelApp::getInstance().getStelObjectMgr().getWasSelected()){
232
	if (StelApp::getInstance().getStelObjectMgr().getWasSelected()){
233
		LabelMgr *labelManager = GETSTELMODULE(LabelMgr);
233
		LabelMgr *labelManager = GETSTELMODULE(LabelMgr);
234
234
Lines 384-390 void Oculars::enableOcular(bool b) Link Here
384
		loadDatabaseObjects();
384
		loadDatabaseObjects();
385
	}
385
	}
386
386
387
	StelCore::StelCore *core = StelApp::getInstance().getCore();
387
	StelCore *core = StelApp::getInstance().getCore();
388
	LabelMgr* labelManager = GETSTELMODULE(LabelMgr);
388
	LabelMgr* labelManager = GETSTELMODULE(LabelMgr);
389
	// Toggle the plugin on & off.  To toggle on, we want to ensure there is a selected object.
389
	// Toggle the plugin on & off.  To toggle on, we want to ensure there is a selected object.
390
	if (!flagShowOculars && !StelApp::getInstance().getStelObjectMgr().getWasSelected()) {
390
	if (!flagShowOculars && !StelApp::getInstance().getStelObjectMgr().getWasSelected()) {
Lines 466-472 void Oculars::toggleCrosshair() Link Here
466
void Oculars::drawCrosshairs()
466
void Oculars::drawCrosshairs()
467
{
467
{
468
	const StelProjectorP projector = StelApp::getInstance().getCore()->getProjection(StelCore::FrameEquinoxEqu);
468
	const StelProjectorP projector = StelApp::getInstance().getCore()->getProjection(StelCore::FrameEquinoxEqu);
469
	StelCore::StelCore *core = StelApp::getInstance().getCore();
469
	StelCore *core = StelApp::getInstance().getCore();
470
	StelProjector::StelProjectorParams params = core->getCurrentStelProjectorParams();
470
	StelProjector::StelProjectorParams params = core->getCurrentStelProjectorParams();
471
	// Center of screen
471
	// Center of screen
472
	Vec2i centerScreen(projector->getViewportPosX()+projector->getViewportWidth()/2,
472
	Vec2i centerScreen(projector->getViewportPosX()+projector->getViewportWidth()/2,
Lines 588-595 void Oculars::interceptMovementKey(QKeyE Link Here
588
	// We onle care about the arrow keys.  This flag tracks that.
588
	// We onle care about the arrow keys.  This flag tracks that.
589
	bool consumeEvent = false;
589
	bool consumeEvent = false;
590
590
591
	StelCore::StelCore *core = StelApp::getInstance().getCore();
591
	StelCore *core = StelApp::getInstance().getCore();
592
	StelMovementMgr::StelMovementMgr *movementManager = core->getMovementMgr();
592
	StelMovementMgr *movementManager = core->getMovementMgr();
593
593
594
	if (event->type() == QEvent::KeyPress)
594
	if (event->type() == QEvent::KeyPress)
595
	{
595
	{
Lines 693-699 void Oculars::loadDatabaseObjects() Link Here
693
693
694
void Oculars::paintMask()
694
void Oculars::paintMask()
695
{
695
{
696
	StelCore::StelCore *core = StelApp::getInstance().getCore();
696
	StelCore *core = StelApp::getInstance().getCore();
697
	StelProjector::StelProjectorParams params = core->getCurrentStelProjectorParams();
697
	StelProjector::StelProjectorParams params = core->getCurrentStelProjectorParams();
698
698
699
	glDisable(GL_BLEND);
699
	glDisable(GL_BLEND);
Lines 774-782 void Oculars::validateIniFile() Link Here
774
774
775
void Oculars::unzoomOcular()
775
void Oculars::unzoomOcular()
776
{
776
{
777
	StelCore::StelCore *core = StelApp::getInstance().getCore();
777
	StelCore *core = StelApp::getInstance().getCore();
778
	StelMovementMgr::StelMovementMgr *movementManager = core->getMovementMgr();
778
	StelMovementMgr *movementManager = core->getMovementMgr();
779
	GridLinesMgr::GridLinesMgr *gridManager = (GridLinesMgr *)StelApp::getInstance().getModuleMgr().getModule("GridLinesMgr");
779
	GridLinesMgr *gridManager = (GridLinesMgr *)StelApp::getInstance().getModuleMgr().getModule("GridLinesMgr");
780
780
781
	gridManager->setFlagAzimuthalGrid(flagAzimuthalGrid);
781
	gridManager->setFlagAzimuthalGrid(flagAzimuthalGrid);
782
	gridManager->setFlagEquatorGrid(flagEquatorGrid);
782
	gridManager->setFlagEquatorGrid(flagEquatorGrid);
Lines 801-807 void Oculars::zoom(bool rezoom) Link Here
801
801
802
	if (flagShowOculars)  {
802
	if (flagShowOculars)  {
803
		if (!rezoom)  {
803
		if (!rezoom)  {
804
			GridLinesMgr::GridLinesMgr *gridManager = (GridLinesMgr *)StelApp::getInstance().getModuleMgr().getModule("GridLinesMgr");
804
			GridLinesMgr *gridManager = (GridLinesMgr *)StelApp::getInstance().getModuleMgr().getModule("GridLinesMgr");
805
			// Current state
805
			// Current state
806
			flagAzimuthalGrid = gridManager->getFlagAzimuthalGrid();
806
			flagAzimuthalGrid = gridManager->getFlagAzimuthalGrid();
807
			flagEquatorGrid = gridManager->getFlagEquatorGrid();
807
			flagEquatorGrid = gridManager->getFlagEquatorGrid();
Lines 821-829 void Oculars::zoom(bool rezoom) Link Here
821
821
822
void Oculars::zoomOcular()
822
void Oculars::zoomOcular()
823
{
823
{
824
	StelCore::StelCore *core = StelApp::getInstance().getCore();
824
	StelCore *core = StelApp::getInstance().getCore();
825
	StelMovementMgr::StelMovementMgr *movementManager = core->getMovementMgr();
825
	StelMovementMgr *movementManager = core->getMovementMgr();
826
	GridLinesMgr::GridLinesMgr *gridManager =
826
	GridLinesMgr *gridManager =
827
		(GridLinesMgr *)StelApp::getInstance().getModuleMgr().getModule("GridLinesMgr");
827
		(GridLinesMgr *)StelApp::getInstance().getModuleMgr().getModule("GridLinesMgr");
828
828
829
	gridManager->setFlagAzimuthalGrid(false);
829
	gridManager->setFlagAzimuthalGrid(false);

Return to bug 317465