StelGuiItems.cpp   StelGuiItems.cpp 
skipping to change at line 22 skipping to change at line 22
* 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., 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 "Projector.hpp" #include "StelProjector.hpp"
#include "Navigator.hpp" #include "StelNavigator.hpp"
#include "StelGuiItems.hpp" #include "StelGuiItems.hpp"
#include "StelLocaleMgr.hpp" #include "StelLocaleMgr.hpp"
#include "StelMainGraphicsView.hpp" #include "StelMainGraphicsView.hpp"
#include "Location.hpp" #include "StelLocation.hpp"
#include "StelGui.hpp" #include "StelGui.hpp"
#include "StelMovementMgr.hpp"
#include <QPainter> #include <QPainter>
#include <QGraphicsScene> #include <QGraphicsScene>
#include <QGraphicsView> #include <QGraphicsView>
#include <QGraphicsLineItem> #include <QGraphicsLineItem>
#include <QRectF> #include <QRectF>
#include <QDebug> #include <QDebug>
#include <QGraphicsSceneMouseEvent> #include <QGraphicsSceneMouseEvent>
#include <QGraphicsTextItem> #include <QGraphicsTextItem>
#include <QTimeLine> #include <QTimeLine>
skipping to change at line 52 skipping to change at line 53
#include <QPixmapCache> #include <QPixmapCache>
#include <QProgressBar> #include <QProgressBar>
#include <QGraphicsWidget> #include <QGraphicsWidget>
#include <QGraphicsProxyWidget> #include <QGraphicsProxyWidget>
StelButton::StelButton(QGraphicsItem* parent, const QPixmap& apixOn, const QPixmap& apixOff, StelButton::StelButton(QGraphicsItem* parent, const QPixmap& apixOn, const QPixmap& apixOff,
const QPixmap& apixHover, QAction* aaction, bool noBackgroun d) : const QPixmap& apixHover, QAction* aaction, bool noBackgroun d) :
QGraphicsPixmapItem(apixOff, parent), pixOn(apixOn), pixOff(apixOff), pixHover(apixHover), QGraphicsPixmapItem(apixOff, parent), pixOn(apixOn), pixOff(apixOff), pixHover(apixHover),
checked(false), action(aaction), noBckground(noBackg round), opacity(1.), hoverOpacity(0.), redMode(false) checked(false), action(aaction), noBckground(noBackg round), opacity(1.), hoverOpacity(0.), redMode(false)
{ {
assert(!pixOn.isNull()); Q_ASSERT(!pixOn.isNull());
assert(!pixOff.isNull()); Q_ASSERT(!pixOff.isNull());
pixOnRed = StelGui::makeRed(pixOn); pixOnRed = StelGui::makeRed(pixOn);
pixOffRed = StelGui::makeRed(pixOff); pixOffRed = StelGui::makeRed(pixOff);
if (!pixHover.isNull()) if (!pixHover.isNull())
pixHoverRed = StelGui::makeRed(pixHover); pixHoverRed = StelGui::makeRed(pixHover);
if (!pixBackground.isNull()) if (!pixBackground.isNull())
pixBackgroundRed = StelGui::makeRed(pixBackground); pixBackgroundRed = StelGui::makeRed(pixBackground);
setShapeMode(QGraphicsPixmapItem::BoundingRectShape); setShapeMode(QGraphicsPixmapItem::BoundingRectShape);
setAcceptsHoverEvents(true); setAcceptsHoverEvents(true);
skipping to change at line 417 skipping to change at line 418
x+=iter.value().rightMargin; x+=iter.value().rightMargin;
} }
updateText(); updateText();
} }
// 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() void BottomStelBar::updateText()
{ {
bool updatePos = false; bool updatePos = false;
StelCore* core = StelApp::getInstance().getCore(); StelCore* core = StelApp::getInstance().getCore();
double jd = core->getNavigation()->getJDay(); double jd = core->getNavigator()->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->getNavigation()->g QString newLocation = flagShowLocation ? q_(core->getNavigator()->ge
etCurrentLocation().planetName) +", " tCurrentLocation().planetName) +", "
+core->getNavigation()->getCurrentLocation().name + +core->getNavigator()->getCurrentLocation().name + "
", " , "
// xgettext:no-c-format // xgettext:no-c-format
+q_("%1m").arg(core->getNavigation()->getCurrentLoca tion().altitude) : " "; +q_("%1m").arg(core->getNavigator()->getCurrentLocat ion().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->getProjection() ->getFov() << QChar(0x00B0); wos << "FOV " << qSetRealNumberPrecision(3) << core->getMovementMgr( )->getCurrentFov() << QChar(0x00B0);
if (fov->text()!=str) if (fov->text()!=str)
{ {
updatePos = true; updatePos = true;
fov->setText(str); fov->setText(str);
} }
str=""; str="";
QTextStream wos2(&str); QTextStream wos2(&str);
wos2 << qSetRealNumberPrecision(3) << StelApp::getInstance().getFps( ) << " FPS"; wos2 << qSetRealNumberPrecision(3) << StelApp::getInstance().getFps( ) << " FPS";
if (fps->text()!=str) if (fps->text()!=str)
 End of changes. 8 change blocks. 
12 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/