Oculars.cpp   Oculars.cpp 
skipping to change at line 112 skipping to change at line 112
usageMessageLabelID(-1), usageMessageLabelID(-1),
flagAzimuthalGrid(false), flagAzimuthalGrid(false),
flagGalacticGrid(false), flagGalacticGrid(false),
flagEquatorGrid(false), flagEquatorGrid(false),
flagEquatorJ2000Grid(false), flagEquatorJ2000Grid(false),
flagEquatorLine(false), flagEquatorLine(false),
flagEclipticLine(false), flagEclipticLine(false),
flagEclipticJ2000Grid(false), flagEclipticJ2000Grid(false),
flagMeridianLine(false), flagMeridianLine(false),
flagHorizonLine(false), flagHorizonLine(false),
flagGalacticPlaneLine(false), flagGalacticEquatorLine(false),
flagAdaptation(false), flagAdaptation(false),
flagLimitStars(false), flagLimitStars(false),
magLimitStars(0.0), magLimitStars(0.0),
flagLimitDSOs(false), flagLimitDSOs(false),
magLimitDSOs(0.0), magLimitDSOs(0.0),
ccdRotationAngle(0.0), ccdRotationAngle(0.0),
maxEyepieceAngle(0.0), maxEyepieceAngle(0.0),
requireSelection(true), requireSelection(true),
flagLimitMagnitude(false), flagLimitMagnitude(false),
useMaxEyepieceAngle(true), useMaxEyepieceAngle(true),
skipping to change at line 152 skipping to change at line 152
actionTelescopeIncrement(0), actionTelescopeIncrement(0),
actionTelescopeDecrement(0), actionTelescopeDecrement(0),
actionOcularIncrement(0), actionOcularIncrement(0),
actionOcularDecrement(0), actionOcularDecrement(0),
guiPanel(0), guiPanel(0),
actualFOV(0), actualFOV(0),
initialFOV(0), initialFOV(0),
flagInitFOVUsage(false), flagInitFOVUsage(false),
reticleRotation(0) reticleRotation(0)
{ {
font.setPixelSize(14); // Font size is 14
font.setPixelSize(StelApp::getInstance().getBaseFontSize()+1);
ccds = QList<CCD *>(); ccds = QList<CCD *>();
oculars = QList<Ocular *>(); oculars = QList<Ocular *>();
telescopes = QList<Telescope *>(); telescopes = QList<Telescope *>();
lense = QList<Lens *> (); lense = QList<Lens *> ();
ccdRotationSignalMapper = new QSignalMapper(this); ccdRotationSignalMapper = new QSignalMapper(this);
ccdsSignalMapper = new QSignalMapper(this); ccdsSignalMapper = new QSignalMapper(this);
ocularsSignalMapper = new QSignalMapper(this); ocularsSignalMapper = new QSignalMapper(this);
telescopesSignalMapper = new QSignalMapper(this); telescopesSignalMapper = new QSignalMapper(this);
skipping to change at line 671 skipping to change at line 672
Lens * lens = selectedLensIndex >=0 ? lense[selectedLensIndex] : NU LL; Lens * lens = selectedLensIndex >=0 ? lense[selectedLensIndex] : NU LL;
if (selectedCCDIndex > -1 && selectedTelescopeIndex > -1) { if (selectedCCDIndex > -1 && selectedTelescopeIndex > -1) {
StelCore *core = StelApp::getInstance().getCore(); StelCore *core = StelApp::getInstance().getCore();
StelMovementMgr *movementManager = core->getMovementMgr(); StelMovementMgr *movementManager = core->getMovementMgr();
double actualFOVx = ccds[selectedCCDIndex]->getActualFOVx(te lescopes[selectedTelescopeIndex], lens); double actualFOVx = ccds[selectedCCDIndex]->getActualFOVx(te lescopes[selectedTelescopeIndex], lens);
double actualFOVy = ccds[selectedCCDIndex]->getActualFOVy(te lescopes[selectedTelescopeIndex], lens); double actualFOVy = ccds[selectedCCDIndex]->getActualFOVy(te lescopes[selectedTelescopeIndex], lens);
if (actualFOVx < actualFOVy) { if (actualFOVx < actualFOVy) {
actualFOVx = actualFOVy; actualFOVx = actualFOVy;
} }
movementManager->setFlagTracking(true); movementManager->setFlagTracking(true);
movementManager->zoomTo(actualFOVx * 3.0, 0.0); movementManager->zoomTo(actualFOVx * 1.75, 0.0);
} }
} }
void Oculars::enableGuiPanel(bool enable) void Oculars::enableGuiPanel(bool enable)
{ {
if (enable) if (enable)
{ {
if (!guiPanel) if (!guiPanel)
{ {
StelApp& app = StelApp::getInstance(); StelApp& app = StelApp::getInstance();
skipping to change at line 1210 skipping to change at line 1211
if (show) if (show)
qWarning() << "Oculars plugin: Unable to display a s ensor boundary: No sensors or telescopes are defined."; qWarning() << "Oculars plugin: Unable to display a s ensor boundary: No sensors or telescopes are defined.";
flagShowCCD = false; flagShowCCD = false;
selectedCCDIndex = -1; selectedCCDIndex = -1;
show = false; show = false;
if (actionShowSensor->isChecked()) { if (actionShowSensor->isChecked()) {
actionShowSensor->setChecked(false); actionShowSensor->setChecked(false);
} }
} }
StelCore *core = StelApp::getInstance().getCore();
StelMovementMgr *movementManager = core->getMovementMgr();
if (show) { if (show) {
//Mutually exclusive with the ocular mode //Mutually exclusive with the ocular mode
hideUsageMessageIfDisplayed(); hideUsageMessageIfDisplayed();
if (flagShowOculars) { if (flagShowOculars) {
if (actionShowOcular->isChecked()) { if (actionShowOcular->isChecked()) {
actionShowOcular->setChecked(false); actionShowOcular->setChecked(false);
} }
} }
if (flagShowTelrad) { if (flagShowTelrad) {
skipping to change at line 1233 skipping to change at line 1236
} }
if (selectedTelescopeIndex < 0) { if (selectedTelescopeIndex < 0) {
selectedTelescopeIndex = 0; selectedTelescopeIndex = 0;
} }
if (selectedCCDIndex < 0) { if (selectedCCDIndex < 0) {
selectedCCDIndex = 0; selectedCCDIndex = 0;
} }
flagShowCCD = true; flagShowCCD = true;
setScreenFOVForCCD(); setScreenFOVForCCD();
movementManager->setFlagEnableZoomKeys(false);
movementManager->setFlagEnableMouseNavigation(false);
if (guiPanel) { if (guiPanel) {
guiPanel->showCcdGui(); guiPanel->showCcdGui();
} }
} else { } else {
flagShowCCD = false; flagShowCCD = false;
//Zoom out //Zoom out
StelCore *core = StelApp::getInstance().getCore();
StelMovementMgr *movementManager = core->getMovementMgr();
movementManager->zoomTo(movementManager->getInitFov()); movementManager->zoomTo(movementManager->getInitFov());
movementManager->setFlagTracking(false); movementManager->setFlagTracking(false);
movementManager->setFlagEnableZoomKeys(true);
movementManager->setFlagEnableMouseNavigation(true);
core->setFlipHorz(false); core->setFlipHorz(false);
core->setFlipVert(false); core->setFlipVert(false);
if (guiPanel) { if (guiPanel) {
guiPanel->foldGui(); guiPanel->foldGui();
} }
} }
} }
void Oculars::toggleCCD() void Oculars::toggleCCD()
skipping to change at line 1503 skipping to change at line 1508
int textureHeight; int textureHeight;
int textureWidth; int textureWidth;
reticleTexture->getDimensions(textureWidth, textureHeight); reticleTexture->getDimensions(textureWidth, textureHeight);
painter.drawSprite2dMode(params.viewportXywh[2] / 2 * params .devicePixelsPerPixel, painter.drawSprite2dMode(params.viewportXywh[2] / 2 * params .devicePixelsPerPixel,
params.viewportXywh[3] / 2 * params.devicePixelsPerPixel, params.viewportXywh[3] / 2 * params.devicePixelsPerPixel,
inner, inner,
reticleRotation); reticleRotation);
} }
// FIXME: Enable usage QML shaders if (oculars[selectedOcularIndex]->hasPermanentCrosshair())
// XXX: for some reason I cannot get to make the glu functions work {
when paintCrosshairs();
// compiling with Qt5!
// XXX: GLU can't work with OpenGL ES --AW
/*
StelCore *core = StelApp::getInstance().getCore();
StelProjector::StelProjectorParams params = core->getCurrentStelProj
ectorParams();
glDisable(GL_BLEND);
glColor3f(0.f,0.f,0.f);
glPushMatrix();
glTranslated(params.viewportCenter[0], params.viewportCenter[1], 0.0
);
GLUquadricObj *quadric = gluNewQuadric();
GLdouble inner = 0.5 * params.viewportFovDiameter;
// See if we need to scale the mask
if (useMaxEyepieceAngle && oculars[selectedOcularIndex]->appearentFO
V() > 0.0 && !oculars[selectedOcularIndex]->isBinoculars()) {
inner = oculars[selectedOcularIndex]->appearentFOV() * inner
/ maxEyepieceAngle;
} }
GLdouble outer = params.viewportXywh[2] + params.viewportXywh[3];
// Draw the mask
gluDisk(quadric, inner, outer, 256, 1);
// the gray circle
glColor3f(0.15f,0.15f,0.15f);
gluDisk(quadric, inner - 1.0, inner, 256, 1);
gluDeleteQuadric(quadric);
glPopMatrix();
*/
} }
void Oculars::paintText(const StelCore* core) void Oculars::paintText(const StelCore* core)
{ {
const StelProjectorP prj = core->getProjection(StelCore::FrameAltAz) ; const StelProjectorP prj = core->getProjection(StelCore::FrameAltAz) ;
StelPainter painter(prj); StelPainter painter(prj);
// Get the current instruments // Get the current instruments
CCD *ccd = NULL; CCD *ccd = NULL;
if(selectedCCDIndex != -1) { if(selectedCCDIndex != -1) {
skipping to change at line 1772 skipping to change at line 1751
gridManager->setFlagAzimuthalGrid(flagAzimuthalGrid); gridManager->setFlagAzimuthalGrid(flagAzimuthalGrid);
gridManager->setFlagGalacticGrid(flagGalacticGrid); gridManager->setFlagGalacticGrid(flagGalacticGrid);
gridManager->setFlagEquatorGrid(flagEquatorGrid); gridManager->setFlagEquatorGrid(flagEquatorGrid);
gridManager->setFlagEquatorJ2000Grid(flagEquatorJ2000Grid); gridManager->setFlagEquatorJ2000Grid(flagEquatorJ2000Grid);
gridManager->setFlagEquatorLine(flagEquatorLine); gridManager->setFlagEquatorLine(flagEquatorLine);
gridManager->setFlagEclipticLine(flagEclipticLine); gridManager->setFlagEclipticLine(flagEclipticLine);
gridManager->setFlagEclipticJ2000Grid(flagEclipticJ2000Grid); gridManager->setFlagEclipticJ2000Grid(flagEclipticJ2000Grid);
gridManager->setFlagMeridianLine(flagMeridianLine); gridManager->setFlagMeridianLine(flagMeridianLine);
gridManager->setFlagHorizonLine(flagHorizonLine); gridManager->setFlagHorizonLine(flagHorizonLine);
gridManager->setFlagGalacticPlaneLine(flagGalacticPlaneLine); gridManager->setFlagGalacticEquatorLine(flagGalacticEquatorLine);
skyManager->setFlagLuminanceAdaptation(flagAdaptation); skyManager->setFlagLuminanceAdaptation(flagAdaptation);
skyManager->setFlagStarMagnitudeLimit(flagLimitStars); skyManager->setFlagStarMagnitudeLimit(flagLimitStars);
skyManager->setFlagNebulaMagnitudeLimit(flagLimitDSOs); skyManager->setFlagNebulaMagnitudeLimit(flagLimitDSOs);
skyManager->setCustomStarMagnitudeLimit(magLimitStars); skyManager->setCustomStarMagnitudeLimit(magLimitStars);
skyManager->setCustomNebulaMagnitudeLimit(magLimitDSOs); skyManager->setCustomNebulaMagnitudeLimit(magLimitDSOs);
movementManager->setFlagTracking(false); movementManager->setFlagTracking(false);
movementManager->setFlagEnableZoomKeys(true); movementManager->setFlagEnableZoomKeys(true);
movementManager->setFlagEnableMouseNavigation(true); movementManager->setFlagEnableMouseNavigation(true);
// Set the screen display // Set the screen display
skipping to change at line 1815 skipping to change at line 1794
// Current state // Current state
flagAzimuthalGrid = gridManager->getFlagAzimuthalGri d(); flagAzimuthalGrid = gridManager->getFlagAzimuthalGri d();
flagGalacticGrid = gridManager->getFlagGalacticGrid( ); flagGalacticGrid = gridManager->getFlagGalacticGrid( );
flagEquatorGrid = gridManager->getFlagEquatorGrid(); flagEquatorGrid = gridManager->getFlagEquatorGrid();
flagEquatorJ2000Grid = gridManager->getFlagEquatorJ2 000Grid(); flagEquatorJ2000Grid = gridManager->getFlagEquatorJ2 000Grid();
flagEquatorLine = gridManager->getFlagEquatorLine(); flagEquatorLine = gridManager->getFlagEquatorLine();
flagEclipticLine = gridManager->getFlagEclipticLine( ); flagEclipticLine = gridManager->getFlagEclipticLine( );
flagEclipticJ2000Grid = gridManager->getFlagEcliptic J2000Grid(); flagEclipticJ2000Grid = gridManager->getFlagEcliptic J2000Grid();
flagMeridianLine = gridManager->getFlagMeridianLine( ); flagMeridianLine = gridManager->getFlagMeridianLine( );
flagHorizonLine = gridManager->getFlagHorizonLine(); flagHorizonLine = gridManager->getFlagHorizonLine();
flagGalacticPlaneLine = gridManager->getFlagGalactic PlaneLine(); flagGalacticEquatorLine = gridManager->getFlagGalact icEquatorLine();
StelSkyDrawer *skyManager = core->getSkyDrawer(); StelSkyDrawer *skyManager = core->getSkyDrawer();
// Current state // Current state
flagAdaptation = skyManager->getFlagLuminanceAdaptat ion(); flagAdaptation = skyManager->getFlagLuminanceAdaptat ion();
flagLimitStars = skyManager->getFlagStarMagnitudeLim it(); flagLimitStars = skyManager->getFlagStarMagnitudeLim it();
flagLimitDSOs = skyManager->getFlagNebulaMagnitudeLi mit(); flagLimitDSOs = skyManager->getFlagNebulaMagnitudeLi mit();
magLimitStars = skyManager->getCustomStarMagnitudeLi mit(); magLimitStars = skyManager->getCustomStarMagnitudeLi mit();
magLimitDSOs = skyManager->getCustomNebulaMagnitudeL imit(); magLimitDSOs = skyManager->getCustomNebulaMagnitudeL imit();
StelMovementMgr *movementManager = core->getMovement Mgr(); StelMovementMgr *movementManager = core->getMovement Mgr();
skipping to change at line 1855 skipping to change at line 1834
gridManager->setFlagAzimuthalGrid(false); gridManager->setFlagAzimuthalGrid(false);
gridManager->setFlagGalacticGrid(false); gridManager->setFlagGalacticGrid(false);
gridManager->setFlagEquatorGrid(false); gridManager->setFlagEquatorGrid(false);
gridManager->setFlagEquatorJ2000Grid(false); gridManager->setFlagEquatorJ2000Grid(false);
gridManager->setFlagEquatorLine(false); gridManager->setFlagEquatorLine(false);
gridManager->setFlagEclipticLine(false); gridManager->setFlagEclipticLine(false);
gridManager->setFlagEclipticJ2000Grid(false); gridManager->setFlagEclipticJ2000Grid(false);
gridManager->setFlagMeridianLine(false); gridManager->setFlagMeridianLine(false);
gridManager->setFlagHorizonLine(false); gridManager->setFlagHorizonLine(false);
gridManager->setFlagGalacticPlaneLine(false); gridManager->setFlagGalacticEquatorLine(false);
skyManager->setFlagLuminanceAdaptation(false); skyManager->setFlagLuminanceAdaptation(false);
movementManager->setFlagTracking(true); movementManager->setFlagTracking(true);
movementManager->setFlagEnableZoomKeys(false); movementManager->setFlagEnableZoomKeys(false);
movementManager->setFlagEnableMouseNavigation(false); movementManager->setFlagEnableMouseNavigation(false);
// We won't always have a selected object // We won't always have a selected object
if (StelApp::getInstance().getStelObjectMgr().getWasSelected()) { if (StelApp::getInstance().getStelObjectMgr().getWasSelected()) {
StelObjectP selectedObject = StelApp::getInstance().getStelO bjectMgr().getSelectedObject()[0]; StelObjectP selectedObject = StelApp::getInstance().getStelO bjectMgr().getSelectedObject()[0];
movementManager->moveToJ2000(selectedObject->getEquinoxEquat orialPos(core), 0.0, 1); movementManager->moveToJ2000(selectedObject->getEquinoxEquat orialPos(core), 0.0, 1);
 End of changes. 12 change blocks. 
42 lines changed or deleted 16 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/