OcularsGuiPanel.cpp   OcularsGuiPanel.cpp 
skipping to change at line 577 skipping to change at line 577
ocularControls->setMinimumSize(widgetWidth, widgetHeight); ocularControls->setMinimumSize(widgetWidth, widgetHeight);
ocularControls->resize(widgetWidth, widgetHeight); ocularControls->resize(widgetWidth, widgetHeight);
setOcularControlsVisible(true); setOcularControlsVisible(true);
updateTelescopeControls();//Contains a call to updatePosition() updateTelescopeControls();//Contains a call to updatePosition()
} }
void OcularsGuiPanel::updateLensControls() void OcularsGuiPanel::updateLensControls()
{ {
if (ocularsPlugin->flagShowCCD)
{
setLensControlsVisible(false);
return;
}
int index = ocularsPlugin->selectedOcularIndex; int index = ocularsPlugin->selectedOcularIndex;
//Ocular* ocular = ocularsPlugin->oculars[index]; //Ocular* ocular = ocularsPlugin->oculars[index];
Lens* lens = ocularsPlugin->selectedLens(); Lens* lens = ocularsPlugin->selectedLens();
index = ocularsPlugin->selectedLensIndex; index = ocularsPlugin->selectedLensIndex;
QString fullName; QString fullName;
QString multiplerString; QString multiplerString;
if (lens != NULL) if (lens != NULL)
{ {
skipping to change at line 611 skipping to change at line 606
multiplerString = QString(q_("Multiplicity: %1")).arg(lens-> multipler()); multiplerString = QString(q_("Multiplicity: %1")).arg(lens-> multipler());
multiplerString.append(QChar(0x00D7)); multiplerString.append(QChar(0x00D7));
} }
else else
{ {
fullName = QString(q_("Lens: None")); fullName = QString(q_("Lens: None"));
multiplerString = QString(q_("Multiplicity: N/A")); multiplerString = QString(q_("Multiplicity: N/A"));
} }
fieldLensName->setPlainText(fullName); fieldLensName->setPlainText(fullName);
fieldLensMultipler->setPlainText(multiplerString); fieldLensMultipler->setPlainText(multiplerString);
fieldOcularFl->setToolTip(q_("Multiplicity of lens")); fieldOcularFl->setToolTip(q_("Focal length of eyepiece"));
qreal posX = 0.; qreal posX = 0.;
qreal posY = 0.; qreal posY = 0.;
qreal widgetWidth = 0.; qreal widgetWidth = 0.;
qreal widgetHeight = 0.; qreal widgetHeight = 0.;
//Prev button //Prev button
qreal heightAdjustment = (fieldLensName->boundingRect().height() - p revLensButton->boundingRect().height()) / 2.; qreal heightAdjustment = (fieldLensName->boundingRect().height() - p revLensButton->boundingRect().height()) / 2.;
prevLensButton->setPos(posX, round(posY + heightAdjustment)); prevLensButton->setPos(posX, round(posY + heightAdjustment));
posX += prevLensButton->boundingRect().width(); posX += prevLensButton->boundingRect().width();
skipping to change at line 665 skipping to change at line 660
if (name.isEmpty()) if (name.isEmpty())
{ {
fullName = QString(q_("Sensor #%1")).arg(index); fullName = QString(q_("Sensor #%1")).arg(index);
} }
else else
{ {
fullName = QString(q_("Sensor #%1: %2")).arg(index).arg(name ); fullName = QString(q_("Sensor #%1: %2")).arg(index).arg(name );
} }
fieldCcdName->setPlainText(fullName); fieldCcdName->setPlainText(fullName);
Lens *lens = ocularsPlugin->selectedLens();
qreal posX = 0.; qreal posX = 0.;
qreal posY = 0.; qreal posY = 0.;
qreal widgetWidth = 0.; qreal widgetWidth = 0.;
qreal widgetHeight = 0.; qreal widgetHeight = 0.;
//Prev button //Prev button
qreal heightAdjustment = (fieldCcdName->boundingRect().height() - pr evCcdButton->boundingRect().height()) / 2.; qreal heightAdjustment = (fieldCcdName->boundingRect().height() - pr evCcdButton->boundingRect().height()) / 2.;
prevCcdButton->setPos(posX, posY + heightAdjustment); prevCcdButton->setPos(posX, posY + heightAdjustment);
posX += prevCcdButton->boundingRect().width(); posX += prevCcdButton->boundingRect().width();
widgetWidth += prevCcdButton->boundingRect().width(); widgetWidth += prevCcdButton->boundingRect().width();
skipping to change at line 693 skipping to change at line 690
widgetWidth += nextCcdButton->boundingRect().width(); widgetWidth += nextCcdButton->boundingRect().width();
posX = prevCcdButton->boundingRect().width(); posX = prevCcdButton->boundingRect().width();
posY = fieldCcdName->boundingRect().height(); posY = fieldCcdName->boundingRect().height();
widgetHeight += fieldCcdName->boundingRect().height(); widgetHeight += fieldCcdName->boundingRect().height();
//We need the current telescope //We need the current telescope
index = ocularsPlugin->selectedTelescopeIndex; index = ocularsPlugin->selectedTelescopeIndex;
Telescope* telescope = ocularsPlugin->telescopes[index]; Telescope* telescope = ocularsPlugin->telescopes[index];
Q_ASSERT(telescope); Q_ASSERT(telescope);
double fovX = ((int)(ccd->getActualFOVx(telescope) * 1000.0)) / 1000 double fovX = ((int)(ccd->getActualFOVx(telescope, lens) * 1000.0))
.0; / 1000.0;
double fovY = ((int)(ccd->getActualFOVy(telescope) * 1000.0)) / 1000 double fovY = ((int)(ccd->getActualFOVy(telescope, lens) * 1000.0))
.0; / 1000.0;
QString dimensionsLabel = QString(q_("Dimensions: %1")).arg(ocularsP lugin->getDimensionsString(fovX, fovY)); QString dimensionsLabel = QString(q_("Dimensions: %1")).arg(ocularsP lugin->getDimensionsString(fovX, fovY));
fieldCcdDimensions->setPlainText(dimensionsLabel); fieldCcdDimensions->setPlainText(dimensionsLabel);
fieldCcdDimensions->setPos(posX, posY); fieldCcdDimensions->setPos(posX, posY);
posY += fieldCcdDimensions->boundingRect().height(); posY += fieldCcdDimensions->boundingRect().height();
widgetHeight += fieldCcdDimensions->boundingRect().height(); widgetHeight += fieldCcdDimensions->boundingRect().height();
QString rotation = QString::number(ocularsPlugin->ccdRotationAngle, 'f', 2); QString rotation = QString::number(ocularsPlugin->ccdRotationAngle, 'f', 2);
rotation.append(QChar(0x00B0)); rotation.append(QChar(0x00B0));
QString rotationLabel = QString(q_("Rotation: %1")).arg(rotation); QString rotationLabel = QString(q_("Rotation: %1")).arg(rotation);
fieldCcdRotation->setPlainText(rotationLabel); fieldCcdRotation->setPlainText(rotationLabel);
skipping to change at line 782 skipping to change at line 779
widgetWidth += fieldTelescopeName->boundingRect().height(); widgetWidth += fieldTelescopeName->boundingRect().height();
//Next button //Next button
nextTelescopeButton->setPos(posX, posY + heightAdjustment); nextTelescopeButton->setPos(posX, posY + heightAdjustment);
widgetWidth += nextTelescopeButton->boundingRect().width(); widgetWidth += nextTelescopeButton->boundingRect().width();
posX = prevTelescopeButton->boundingRect().width(); posX = prevTelescopeButton->boundingRect().width();
posY += fieldTelescopeName->boundingRect().height(); posY += fieldTelescopeName->boundingRect().height();
widgetHeight += fieldTelescopeName->boundingRect().height(); widgetHeight += fieldTelescopeName->boundingRect().height();
Lens *lens = ocularsPlugin->selectedLens();
if (ocularsPlugin->flagShowCCD) if (ocularsPlugin->flagShowCCD)
{ {
int index = ocularsPlugin->selectedCCDIndex; int index = ocularsPlugin->selectedCCDIndex;
CCD* ccd = ocularsPlugin->ccds[index]; CCD* ccd = ocularsPlugin->ccds[index];
Q_ASSERT(ccd); Q_ASSERT(ccd);
double fovX = ((int)(ccd->getActualFOVx(telescope) * 1000.0) double fovX = ((int)(ccd->getActualFOVx(telescope, lens) * 1
) / 1000.0; 000.0)) / 1000.0;
double fovY = ((int)(ccd->getActualFOVy(telescope) * 1000.0) double fovY = ((int)(ccd->getActualFOVy(telescope, lens) * 1
) / 1000.0; 000.0)) / 1000.0;
QString dimensionsLabel = QString(q_("Dimensions: %1")).arg( ocularsPlugin->getDimensionsString(fovX, fovY)); QString dimensionsLabel = QString(q_("Dimensions: %1")).arg( ocularsPlugin->getDimensionsString(fovX, fovY));
fieldCcdDimensions->setPlainText(dimensionsLabel); fieldCcdDimensions->setPlainText(dimensionsLabel);
fieldMagnification->setVisible(false); fieldMagnification->setVisible(false);
fieldFov->setVisible(false); fieldFov->setVisible(false);
} }
else if (ocularsPlugin->flagShowOculars) else if (ocularsPlugin->flagShowOculars)
{ {
//We need the current ocular //We need the current ocular
int index = ocularsPlugin->selectedOcularIndex; int index = ocularsPlugin->selectedOcularIndex;
Ocular* ocular = ocularsPlugin->oculars[index]; Ocular* ocular = ocularsPlugin->oculars[index];
Q_ASSERT(ocular); Q_ASSERT(ocular);
Lens *lens = ocularsPlugin->selectedLens();
if (ocular->isBinoculars()) if (ocular->isBinoculars())
{ {
prevTelescopeButton->setVisible(false); prevTelescopeButton->setVisible(false);
nextTelescopeButton->setVisible(false); nextTelescopeButton->setVisible(false);
fieldTelescopeName->setVisible(false); fieldTelescopeName->setVisible(false);
posY = 0.; posY = 0.;
widgetHeight = 0.; widgetHeight = 0.;
fieldMagnification->setToolTip(q_("Magnification pro vided by these binoculars")); fieldMagnification->setToolTip(q_("Magnification pro vided by these binoculars"));
fieldFov->setToolTip(q_("Actual field of view provid ed by these binoculars")); fieldFov->setToolTip(q_("Actual field of view provid ed by these binoculars"));
 End of changes. 7 change blocks. 
16 lines changed or deleted 13 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/