StelGuiItems.cpp   StelGuiItems.cpp 
skipping to change at line 23 skipping to change at line 23
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, U SA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, U SA.
*/ */
#include "StelApp.hpp" #include "StelApp.hpp"
#include "StelCore.hpp" #include "StelCore.hpp"
#include "StelProjector.hpp" #include "StelProjector.hpp"
#include "StelNavigator.hpp"
#include "StelGuiItems.hpp" #include "StelGuiItems.hpp"
#include "StelLocaleMgr.hpp" #include "StelLocaleMgr.hpp"
#include "StelLocation.hpp" #include "StelLocation.hpp"
#include "StelMovementMgr.hpp" #include "StelMovementMgr.hpp"
#include <QPainter> #include <QPainter>
#include <QGraphicsScene> #include <QGraphicsScene>
#include <QGraphicsView> #include <QGraphicsView>
#include <QGraphicsLineItem> #include <QGraphicsLineItem>
#include <QRectF> #include <QRectF>
skipping to change at line 525 skipping to change at line 525
} }
x+=iter.value().rightMargin; x+=iter.value().rightMargin;
} }
updateText(true); updateText(true);
} }
// Make sure to avoid any change if not necessary to avoid triggering usele ss redraw // Make sure to avoid any change if not necessary to avoid triggering usele ss redraw
void BottomStelBar::updateText(bool updatePos) void BottomStelBar::updateText(bool updatePos)
{ {
StelCore* core = StelApp::getInstance().getCore(); StelCore* core = StelApp::getInstance().getCore();
double jd = core->getNavigator()->getJDay(); double jd = core->getJDay();
QString newDate = flagShowTime ? StelApp::getInstance().getLocaleMgr ().getPrintableDateLocal(jd) +" " QString newDate = flagShowTime ? StelApp::getInstance().getLocaleMgr ().getPrintableDateLocal(jd) +" "
+StelApp::getInstance().getLocaleMgr().getPrintableT imeLocal(jd) : " "; +StelApp::getInstance().getLocaleMgr().getPrintableT imeLocal(jd) : " ";
if (datetime->text()!=newDate) if (datetime->text()!=newDate)
{ {
updatePos = true; updatePos = true;
datetime->setText(newDate); datetime->setText(newDate);
} }
QString newLocation = flagShowLocation ? q_(core->getNavigator()->ge QString newLocation = flagShowLocation ? q_(core->getCurrentLocation
tCurrentLocation().planetName) +", " ().planetName) +", "
+core->getNavigator()->getCurrentLocation().name + " +core->getCurrentLocation().name + ", "
, "
// xgettext:no-c-format // xgettext:no-c-format
+q_("%1m").arg(core->getNavigator()->getCurrentLocat ion().altitude) : " "; +q_("%1m").arg(core->getCurrentLocation().altitude) : " ";
if (location->text()!=newLocation) if (location->text()!=newLocation)
{ {
updatePos = true; updatePos = true;
location->setText(newLocation); location->setText(newLocation);
} }
QString str; QString str;
QTextStream wos(&str); QTextStream wos(&str);
wos << "FOV " << qSetRealNumberPrecision(3) << core->getMovementMgr( )->getCurrentFov() << QChar(0x00B0); wos << "FOV " << qSetRealNumberPrecision(3) << core->getMovementMgr( )->getCurrentFov() << QChar(0x00B0);
if (fov->text()!=str) if (fov->text()!=str)
skipping to change at line 568 skipping to change at line 568
{ {
updatePos = true; updatePos = true;
fps->setText(str); fps->setText(str);
} }
if (updatePos) if (updatePos)
{ {
QRectF rectCh = getButtonsBoundingRect(); QRectF rectCh = getButtonsBoundingRect();
location->setPos(0, 0); location->setPos(0, 0);
datetime->setPos(rectCh.right()-datetime->boundingRect().wid th()-5,0); datetime->setPos(rectCh.right()-datetime->boundingRect().wid th()-5,0);
fov->setPos(datetime->x()-230, 0); fov->setPos(datetime->x()-200, 0);
fps->setPos(datetime->x()-140, 0); fps->setPos(datetime->x()-95, 0);
} }
} }
void BottomStelBar::paint(QPainter*, const QStyleOptionGraphicsItem*, QWidg et*) void BottomStelBar::paint(QPainter*, const QStyleOptionGraphicsItem*, QWidg et*)
{ {
updateText(); updateText();
} }
QRectF BottomStelBar::boundingRect() const QRectF BottomStelBar::boundingRect() const
{ {
 End of changes. 5 change blocks. 
9 lines changed or deleted 8 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/