OcularsGuiPanel.cpp   OcularsGuiPanel.cpp 
skipping to change at line 138 skipping to change at line 138
fieldOcularAfov = new QGraphicsTextItem(ocularControls); fieldOcularAfov = new QGraphicsTextItem(ocularControls);
fieldCcdName = new QGraphicsTextItem(ccdControls); fieldCcdName = new QGraphicsTextItem(ccdControls);
fieldCcdDimensions = new QGraphicsTextItem(ccdControls); fieldCcdDimensions = new QGraphicsTextItem(ccdControls);
fieldCcdHScale = new QGraphicsTextItem(ccdControls); fieldCcdHScale = new QGraphicsTextItem(ccdControls);
fieldCcdVScale = new QGraphicsTextItem(ccdControls); fieldCcdVScale = new QGraphicsTextItem(ccdControls);
fieldCcdRotation = new QGraphicsTextItem(ccdControls); fieldCcdRotation = new QGraphicsTextItem(ccdControls);
fieldTelescopeName = new QGraphicsTextItem(telescopeControls); fieldTelescopeName = new QGraphicsTextItem(telescopeControls);
fieldMagnification = new QGraphicsTextItem(telescopeControls); fieldMagnification = new QGraphicsTextItem(telescopeControls);
fieldExitPupil = new QGraphicsTextItem(telescopeControls); fieldExitPupil = new QGraphicsTextItem(telescopeControls);
fieldFov = new QGraphicsTextItem(telescopeControls); fieldFov = new QGraphicsTextItem(telescopeControls);
fieldRayleighCriterion = new QGraphicsTextItem(telescopeControls);
fieldDawesCriterion = new QGraphicsTextItem(telescopeControls);
fieldAbbeyCriterion = new QGraphicsTextItem(telescopeControls);
fieldSparrowCriterion = new QGraphicsTextItem(telescopeControls);
fieldLensName = new QGraphicsTextItem(lensControls); fieldLensName = new QGraphicsTextItem(lensControls);
fieldLensMultipler = new QGraphicsTextItem(lensControls); fieldLensMultipler = new QGraphicsTextItem(lensControls);
QFont newFont = font(); QFont newFont = font();
// Font size is 12 // Font size is 12
newFont.setPixelSize(StelApp::getInstance().getBaseFontSize()-1); newFont.setPixelSize(StelApp::getInstance().getBaseFontSize()-1);
setControlsFont(newFont); setControlsFont(newFont);
//setControlsColor(QColor::fromRgbF(0.9, 0.91, 0.95, 0.9)); //setControlsColor(QColor::fromRgbF(0.9, 0.91, 0.95, 0.9));
skipping to change at line 165 skipping to change at line 169
fieldOcularAfov->setTextWidth(maxWidth); fieldOcularAfov->setTextWidth(maxWidth);
fieldCcdName->setTextWidth(maxWidth); fieldCcdName->setTextWidth(maxWidth);
fieldCcdDimensions->setTextWidth(maxWidth); fieldCcdDimensions->setTextWidth(maxWidth);
fieldCcdHScale->setTextWidth(maxWidth); fieldCcdHScale->setTextWidth(maxWidth);
fieldCcdVScale->setTextWidth(maxWidth); fieldCcdVScale->setTextWidth(maxWidth);
fieldCcdRotation->setTextWidth(maxWidth); fieldCcdRotation->setTextWidth(maxWidth);
fieldTelescopeName->setTextWidth(maxWidth); fieldTelescopeName->setTextWidth(maxWidth);
fieldMagnification->setTextWidth(maxWidth); fieldMagnification->setTextWidth(maxWidth);
fieldExitPupil->setTextWidth(maxWidth); fieldExitPupil->setTextWidth(maxWidth);
fieldFov->setTextWidth(maxWidth); fieldFov->setTextWidth(maxWidth);
fieldRayleighCriterion->setTextWidth(maxWidth);
fieldDawesCriterion->setTextWidth(maxWidth);
fieldAbbeyCriterion->setTextWidth(maxWidth);
fieldSparrowCriterion->setTextWidth(maxWidth);
fieldLensName->setTextWidth(maxWidth); fieldLensName->setTextWidth(maxWidth);
fieldLensMultipler->setTextWidth(maxWidth); fieldLensMultipler->setTextWidth(maxWidth);
float scale = lineHeight*1.5; // TODO: change hardcoded 1.5 to edita ble value of scaling coefficient float scale = lineHeight*1.5; // TODO: change hardcoded 1.5 to edita ble value of scaling coefficient
QPixmap pa(":/graphicGui/btTimeRewind-on.png"); QPixmap pa(":/graphicGui/btTimeRewind-on.png");
QPixmap prevArrow = pa.scaledToHeight(scale, Qt::SmoothTransformatio n); QPixmap prevArrow = pa.scaledToHeight(scale, Qt::SmoothTransformatio n);
QPixmap paOff(":/graphicGui/btTimeRewind-off.png"); QPixmap paOff(":/graphicGui/btTimeRewind-off.png");
QPixmap prevArrowOff = paOff.scaledToHeight(scale, Qt::SmoothTransfo rmation); QPixmap prevArrowOff = paOff.scaledToHeight(scale, Qt::SmoothTransfo rmation);
QPixmap na(":/graphicGui/btTimeForward-on.png"); QPixmap na(":/graphicGui/btTimeForward-on.png");
skipping to change at line 513 skipping to change at line 521
void OcularsGuiPanel::updateOcularControls() void OcularsGuiPanel::updateOcularControls()
{ {
setCcdControlsVisible(false); setCcdControlsVisible(false);
//Get the name //Get the name
int index = ocularsPlugin->selectedOcularIndex; int index = ocularsPlugin->selectedOcularIndex;
Ocular* ocular = ocularsPlugin->oculars[index]; Ocular* ocular = ocularsPlugin->oculars[index];
Q_ASSERT(ocular); Q_ASSERT(ocular);
QString name = ocular->name(); QString name = ocular->name();
QString fullName; QString fullName;
QString ocularI18n = q_("Ocular");
if (ocular->isBinoculars())
ocularI18n = q_("Binocular");
if (name.isEmpty()) if (name.isEmpty())
{ {
fullName = QString(q_("Ocular #%1")).arg(index); fullName = QString("%1 #%2").arg(ocularI18n).arg(index);
} }
else else
{ {
fullName = QString(q_("Ocular #%1: %2")).arg(index).arg(name ); fullName = QString("%1 #%2: %3").arg(ocularI18n).arg(index). arg(name);
} }
fieldOcularName->setPlainText(fullName); fieldOcularName->setPlainText(fullName);
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 = (fieldOcularName->boundingRect().height() - prevOcularButton->boundingRect().height()) / 2.; qreal heightAdjustment = (fieldOcularName->boundingRect().height() - prevOcularButton->boundingRect().height()) / 2.;
skipping to change at line 877 skipping to change at line 888
double exitPupil = telescope->diameter()/mag; double exitPupil = telescope->diameter()/mag;
if (ocular->isBinoculars()) if (ocular->isBinoculars())
exitPupil = ocular->fieldStop()/mag; exitPupil = ocular->fieldStop()/mag;
QString exitPupilLabel = QString(q_("Exit pupil: %1 mm")).arg(QString::number(exitPupil, 'f', 2)); QString exitPupilLabel = QString(q_("Exit pupil: %1 mm")).arg(QString::number(exitPupil, 'f', 2));
fieldExitPupil->setPlainText(exitPupilLabel); fieldExitPupil->setPlainText(exitPupilLabel);
fieldExitPupil->setPos(posX, posY); fieldExitPupil->setPos(posX, posY);
posY += fieldExitPupil->boundingRect().height(); posY += fieldExitPupil->boundingRect().height();
widgetHeight += fieldExitPupil->boundingRect().heigh t(); widgetHeight += fieldExitPupil->boundingRect().heigh t();
} }
QString fovString = QString::number(ocular->actualFOV(telesc ope, lens), 'f', 1) + QChar(0x00B0); QString fovString = QString::number(ocular->actualFOV(telesc ope, lens), 'f', 4) + QChar(0x00B0);
QString fovLabel = QString(q_("FOV: %1")).arg(fovString); QString fovLabel = QString(q_("FOV: %1")).arg(fovString);
fieldFov->setPlainText(fovLabel); fieldFov->setPlainText(fovLabel);
fieldFov->setPos(posX, posY); fieldFov->setPos(posX, posY);
posY += fieldFov->boundingRect().height();
widgetHeight += fieldFov->boundingRect().height(); widgetHeight += fieldFov->boundingRect().height();
fieldMagnification->setVisible(true); fieldMagnification->setVisible(true);
fieldFov->setVisible(true); fieldFov->setVisible(true);
if (mag>0) if (mag>0)
fieldExitPupil->setVisible(true); fieldExitPupil->setVisible(true);
else else
fieldExitPupil->setVisible(false); fieldExitPupil->setVisible(false);
} }
else else
{ {
prevTelescopeButton->setVisible(true); prevTelescopeButton->setVisible(true);
nextTelescopeButton->setVisible(true); nextTelescopeButton->setVisible(true);
fieldTelescopeName->setVisible(true); fieldTelescopeName->setVisible(true);
fieldMagnification->setVisible(false); fieldMagnification->setVisible(false);
fieldFov->setVisible(false); fieldFov->setVisible(false);
fieldExitPupil->setVisible(false); fieldExitPupil->setVisible(false);
} }
double diameter = telescope->diameter();
if (diameter>0.0 && ocularsPlugin->getFlagShowResolutionCriterions()
)
{
QString rayleighLabel = QString("%1: %2\"").arg(q_("Rayleigh
criterion")).arg(QString::number(138/diameter, 'f', 2));
fieldRayleighCriterion->setPlainText(rayleighLabel);
fieldRayleighCriterion->setToolTip(q_("The Rayleigh resoluti
on criterion"));
fieldRayleighCriterion->setPos(posX, posY);
posY += fieldRayleighCriterion->boundingRect().height();
widgetHeight += fieldRayleighCriterion->boundingRect().heigh
t();
QString dawesLabel = QString("%1: %2\"").arg(q_("Dawes' limi
t")).arg(QString::number(116/diameter, 'f', 2));
fieldDawesCriterion->setPlainText(dawesLabel);
fieldDawesCriterion->setToolTip(q_("Dawes' resolution criter
ion"));
fieldDawesCriterion->setPos(posX, posY);
posY += fieldDawesCriterion->boundingRect().height();
widgetHeight += fieldDawesCriterion->boundingRect().height()
;
QString abbeyLabel = QString("%1: %2\"").arg(q_("Abbe's limi
t")).arg(QString::number(113/diameter, 'f', 2));
fieldAbbeyCriterion->setPlainText(abbeyLabel);
fieldAbbeyCriterion->setToolTip(q_("Abbe’s diffraction resol
ution limit"));
fieldAbbeyCriterion->setPos(posX, posY);
posY += fieldAbbeyCriterion->boundingRect().height();
widgetHeight += fieldAbbeyCriterion->boundingRect().height()
;
QString sparrowLabel = QString("%1: %2\"").arg(q_("Sparrow's
limit")).arg(QString::number(108/diameter, 'f', 2));
fieldSparrowCriterion->setPlainText(sparrowLabel);
fieldSparrowCriterion->setToolTip(q_("Sparrow's resolution l
imit"));
fieldSparrowCriterion->setPos(posX, posY);
posY += fieldSparrowCriterion->boundingRect().height();
widgetHeight += fieldSparrowCriterion->boundingRect().height
();
fieldRayleighCriterion->setVisible(true);
fieldDawesCriterion->setVisible(true);
fieldAbbeyCriterion->setVisible(true);
fieldSparrowCriterion->setVisible(true);
}
else
{
fieldRayleighCriterion->setVisible(false);
fieldDawesCriterion->setVisible(false);
fieldAbbeyCriterion->setVisible(false);
fieldSparrowCriterion->setVisible(false);
}
telescopeControls->setMinimumSize(widgetWidth, widgetHeight); telescopeControls->setMinimumSize(widgetWidth, widgetHeight);
telescopeControls->resize(widgetWidth, widgetHeight); telescopeControls->resize(widgetWidth, widgetHeight);
setTelescopeControlsVisible(true); setTelescopeControlsVisible(true);
updateLensControls(); updateLensControls();
updatePosition(); updatePosition();
} }
void OcularsGuiPanel::setLensControlsVisible(bool show) void OcularsGuiPanel::setLensControlsVisible(bool show)
{ {
skipping to change at line 1053 skipping to change at line 1109
Q_ASSERT(fieldOcularAfov); Q_ASSERT(fieldOcularAfov);
Q_ASSERT(fieldCcdName); Q_ASSERT(fieldCcdName);
Q_ASSERT(fieldCcdDimensions); Q_ASSERT(fieldCcdDimensions);
Q_ASSERT(fieldCcdHScale); Q_ASSERT(fieldCcdHScale);
Q_ASSERT(fieldCcdVScale); Q_ASSERT(fieldCcdVScale);
Q_ASSERT(fieldCcdRotation); Q_ASSERT(fieldCcdRotation);
Q_ASSERT(fieldTelescopeName); Q_ASSERT(fieldTelescopeName);
Q_ASSERT(fieldMagnification); Q_ASSERT(fieldMagnification);
Q_ASSERT(fieldExitPupil); Q_ASSERT(fieldExitPupil);
Q_ASSERT(fieldFov); Q_ASSERT(fieldFov);
Q_ASSERT(fieldRayleighCriterion);
Q_ASSERT(fieldDawesCriterion);
Q_ASSERT(fieldAbbeyCriterion);
Q_ASSERT(fieldSparrowCriterion);
Q_ASSERT(fieldLensName); Q_ASSERT(fieldLensName);
Q_ASSERT(fieldLensMultipler); Q_ASSERT(fieldLensMultipler);
fieldOcularName->setDefaultTextColor(color); fieldOcularName->setDefaultTextColor(color);
fieldOcularFl->setDefaultTextColor(color); fieldOcularFl->setDefaultTextColor(color);
fieldOcularAfov->setDefaultTextColor(color); fieldOcularAfov->setDefaultTextColor(color);
fieldCcdName->setDefaultTextColor(color); fieldCcdName->setDefaultTextColor(color);
fieldCcdDimensions->setDefaultTextColor(color); fieldCcdDimensions->setDefaultTextColor(color);
fieldCcdHScale->setDefaultTextColor(color); fieldCcdHScale->setDefaultTextColor(color);
fieldCcdVScale->setDefaultTextColor(color); fieldCcdVScale->setDefaultTextColor(color);
fieldCcdRotation->setDefaultTextColor(color); fieldCcdRotation->setDefaultTextColor(color);
fieldTelescopeName->setDefaultTextColor(color); fieldTelescopeName->setDefaultTextColor(color);
fieldMagnification->setDefaultTextColor(color); fieldMagnification->setDefaultTextColor(color);
fieldFov->setDefaultTextColor(color); fieldFov->setDefaultTextColor(color);
fieldExitPupil->setDefaultTextColor(color); fieldExitPupil->setDefaultTextColor(color);
fieldRayleighCriterion->setDefaultTextColor(color);
fieldDawesCriterion->setDefaultTextColor(color);
fieldAbbeyCriterion->setDefaultTextColor(color);
fieldSparrowCriterion->setDefaultTextColor(color);
fieldLensName->setDefaultTextColor(color); fieldLensName->setDefaultTextColor(color);
fieldLensMultipler->setDefaultTextColor(color); fieldLensMultipler->setDefaultTextColor(color);
} }
void OcularsGuiPanel::setControlsFont(const QFont& font) void OcularsGuiPanel::setControlsFont(const QFont& font)
{ {
Q_ASSERT(fieldOcularName); Q_ASSERT(fieldOcularName);
Q_ASSERT(fieldOcularFl); Q_ASSERT(fieldOcularFl);
Q_ASSERT(fieldOcularAfov); Q_ASSERT(fieldOcularAfov);
Q_ASSERT(fieldCcdName); Q_ASSERT(fieldCcdName);
Q_ASSERT(fieldCcdDimensions); Q_ASSERT(fieldCcdDimensions);
Q_ASSERT(fieldCcdHScale); Q_ASSERT(fieldCcdHScale);
Q_ASSERT(fieldCcdVScale); Q_ASSERT(fieldCcdVScale);
Q_ASSERT(fieldCcdRotation); Q_ASSERT(fieldCcdRotation);
Q_ASSERT(fieldTelescopeName); Q_ASSERT(fieldTelescopeName);
Q_ASSERT(fieldMagnification); Q_ASSERT(fieldMagnification);
Q_ASSERT(fieldExitPupil); Q_ASSERT(fieldExitPupil);
Q_ASSERT(fieldFov); Q_ASSERT(fieldFov);
Q_ASSERT(fieldRayleighCriterion);
Q_ASSERT(fieldDawesCriterion);
Q_ASSERT(fieldAbbeyCriterion);
Q_ASSERT(fieldSparrowCriterion);
Q_ASSERT(fieldLensName); Q_ASSERT(fieldLensName);
Q_ASSERT(fieldLensMultipler); Q_ASSERT(fieldLensMultipler);
fieldOcularName->setFont(font); fieldOcularName->setFont(font);
fieldOcularFl->setFont(font); fieldOcularFl->setFont(font);
fieldOcularAfov->setFont(font); fieldOcularAfov->setFont(font);
fieldCcdName->setFont(font); fieldCcdName->setFont(font);
fieldCcdDimensions->setFont(font); fieldCcdDimensions->setFont(font);
fieldCcdHScale->setFont(font); fieldCcdHScale->setFont(font);
fieldCcdVScale->setFont(font); fieldCcdVScale->setFont(font);
fieldCcdRotation->setFont(font); fieldCcdRotation->setFont(font);
fieldTelescopeName->setFont(font); fieldTelescopeName->setFont(font);
fieldMagnification->setFont(font); fieldMagnification->setFont(font);
fieldFov->setFont(font); fieldFov->setFont(font);
fieldExitPupil->setFont(font); fieldExitPupil->setFont(font);
fieldRayleighCriterion->setFont(font);
fieldDawesCriterion->setFont(font);
fieldAbbeyCriterion->setFont(font);
fieldSparrowCriterion->setFont(font);
fieldLensName->setFont(font); fieldLensName->setFont(font);
fieldLensMultipler->setFont(font); fieldLensMultipler->setFont(font);
} }
void OcularsGuiPanel::setColorScheme(const QString &schemeName) void OcularsGuiPanel::setColorScheme(const QString &schemeName)
{ {
Q_UNUSED(schemeName); Q_UNUSED(schemeName);
borderPath->setPen(QColor::fromRgbF(0.7,0.7,0.7,0.5)); borderPath->setPen(QColor::fromRgbF(0.7,0.7,0.7,0.5));
borderPath->setBrush(QColor::fromRgbF(0.15, 0.16, 0.19, 0.2)); borderPath->setBrush(QColor::fromRgbF(0.15, 0.16, 0.19, 0.2));
setControlsColor(QColor::fromRgbF(0.9, 0.91, 0.95, 0.9)); setControlsColor(QColor::fromRgbF(0.9, 0.91, 0.95, 0.9));
 End of changes. 12 change blocks. 
3 lines changed or deleted 88 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/