OcularsGuiPanel.cpp   OcularsGuiPanel.cpp 
skipping to change at line 20 skipping to change at line 20
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, US A. Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, US A.
*/ */
#include "config.h"
#include "Oculars.hpp" #include "Oculars.hpp"
#include "OcularsGuiPanel.hpp" #include "OcularsGuiPanel.hpp"
#include "StelApp.hpp" #include "StelApp.hpp"
#include "StelGui.hpp" #include "StelGui.hpp"
#include "StelGuiItems.hpp" #include "StelGuiItems.hpp"
#include "StelTranslator.hpp" #include "StelTranslator.hpp"
#include "StelActionMgr.hpp" #include "StelActionMgr.hpp"
#include <QGridLayout> #include <QGridLayout>
#include <QGraphicsLinearLayout> #include <QGraphicsLinearLayout>
skipping to change at line 514 skipping to change at line 513
} }
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.;
prevOcularButton->setPos(posX, round(posY + heightAdjustment)); prevOcularButton->setPos(posX, qRound(posY + heightAdjustment));
posX += prevOcularButton->boundingRect().width(); posX += prevOcularButton->boundingRect().width();
widgetWidth += prevOcularButton->boundingRect().width(); widgetWidth += prevOcularButton->boundingRect().width();
//Name field //Name field
fieldOcularName->setPos(posX, posY); fieldOcularName->setPos(posX, posY);
posX += fieldOcularName->boundingRect().width(); posX += fieldOcularName->boundingRect().width();
widgetWidth += fieldOcularName->boundingRect().width(); widgetWidth += fieldOcularName->boundingRect().width();
//Next button //Next button
nextOcularButton->setPos(posX, posY + heightAdjustment); nextOcularButton->setPos(posX, posY + heightAdjustment);
skipping to change at line 604 skipping to change at line 603
fieldLensMultipler->setPlainText(multiplerString); fieldLensMultipler->setPlainText(multiplerString);
fieldOcularFl->setToolTip(q_("Focal length of eyepiece")); 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, qRound(posY + heightAdjustment));
posX += prevLensButton->boundingRect().width(); posX += prevLensButton->boundingRect().width();
widgetWidth += prevLensButton->boundingRect().width(); widgetWidth += prevLensButton->boundingRect().width();
//Name field //Name field
fieldLensName->setPos(posX, posY); fieldLensName->setPos(posX, posY);
posX += fieldLensName->boundingRect().width(); posX += fieldLensName->boundingRect().width();
widgetWidth += fieldLensName->boundingRect().width(); widgetWidth += fieldLensName->boundingRect().width();
widgetHeight += fieldLensName->boundingRect().height(); widgetHeight += fieldLensName->boundingRect().height();
//Next button //Next button
skipping to change at line 965 skipping to change at line 964
qreal spacing = 0.; qreal spacing = 0.;
if (prevTelescopeButton) if (prevTelescopeButton)
{ {
width += 2 * prevTelescopeButton->getButtonPixmapWidth(); width += 2 * prevTelescopeButton->getButtonPixmapWidth();
posX = prevTelescopeButton->getButtonPixmapWidth(); posX = prevTelescopeButton->getButtonPixmapWidth();
} }
if (buttonOcular->parentItem()) if (buttonOcular->parentItem())
{ {
qreal parentWidth = buttonOcular->parentItem()->boundingRect ().width(); qreal parentWidth = buttonOcular->parentItem()->boundingRect ().width();
int nGaps = n - 1;//n buttons have n-1 gaps int nGaps = n - 1;//n buttons have n-1 gaps
spacing = round((parentWidth-width)/nGaps); spacing = qRound((parentWidth-width)/nGaps);
} }
buttonOcular->setPos(posX, posY); buttonOcular->setPos(posX, posY);
posX += buttonOcular->getButtonPixmapWidth() + spacing; posX += buttonOcular->getButtonPixmapWidth() + spacing;
if (buttonCrosshairs->isVisible()) if (buttonCrosshairs->isVisible())
{ {
buttonCrosshairs->setPos(posX, posY); buttonCrosshairs->setPos(posX, posY);
posX += buttonCrosshairs->getButtonPixmapWidth() + spacing; posX += buttonCrosshairs->getButtonPixmapWidth() + spacing;
} }
buttonCcd->setPos(posX, posY); buttonCcd->setPos(posX, posY);
posX += buttonCcd->getButtonPixmapWidth() + spacing; posX += buttonCcd->getButtonPixmapWidth() + spacing;
 End of changes. 4 change blocks. 
4 lines changed or deleted 3 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/