StelGuiItems.cpp   StelGuiItems.cpp 
skipping to change at line 17 skipping to change at line 17
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, U SA. * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
*/ */
#include "StelApp.hpp" #include "StelApp.hpp"
#include "StelCore.hpp" #include "StelCore.hpp"
#include "StelProjector.hpp" #include "StelProjector.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"
skipping to change at line 48 skipping to change at line 48
#include <QMouseEvent> #include <QMouseEvent>
#include <QAction> #include <QAction>
#include <QRegExp> #include <QRegExp>
#include <QPixmapCache> #include <QPixmapCache>
#include <QProgressBar> #include <QProgressBar>
#include <QGraphicsWidget> #include <QGraphicsWidget>
#include <QGraphicsProxyWidget> #include <QGraphicsProxyWidget>
#include <QGraphicsLinearLayout> #include <QGraphicsLinearLayout>
#include <QSettings> #include <QSettings>
StelButton::StelButton(QGraphicsItem* parent, const QPixmap& apixOn, const StelButton::StelButton(QGraphicsItem* parent,
QPixmap& apixOff, const QPixmap& apixOn,
const QPixmap& apixHover, QAction* aaction, bool noBackgroun const QPixmap& apixOff,
d) : const QPixmap& apixHover,
QGraphicsPixmapItem(apixOff, parent), pixOn(apixOn), QAction* aaction,
pixOff(apixOff), pixHover(apixHover), bool noBackground) :
checked(ButtonStateOff), action(aaction), noBckgroun QGraphicsPixmapItem(apixOff, parent),
d(noBackground), isTristate_(false), pixOn(apixOn),
opacity(1.), hoverOpacity(0.) pixOff(apixOff),
pixHover(apixHover),
checked(ButtonStateOff),
action(aaction),
noBckground(noBackground),
isTristate_(false),
opacity(1.),
hoverOpacity(0.)
{ {
Q_ASSERT(!pixOn.isNull()); Q_ASSERT(!pixOn.isNull());
Q_ASSERT(!pixOff.isNull()); Q_ASSERT(!pixOff.isNull());
redMode = StelApp::getInstance().getVisionModeNight(); redMode = StelApp::getInstance().getVisionModeNight();
pixOnRed = StelButton::makeRed(pixOn); pixOnRed = StelButton::makeRed(pixOn);
pixOffRed = StelButton::makeRed(pixOff); pixOffRed = StelButton::makeRed(pixOff);
if (!pixHover.isNull()) if (!pixHover.isNull())
pixHoverRed = StelButton::makeRed(pixHover); pixHoverRed = StelButton::makeRed(pixHover);
if (!pixBackground.isNull()) if (!pixBackground.isNull())
pixBackgroundRed = StelButton::makeRed(pixBackground); pixBackgroundRed = StelButton::makeRed(pixBackground);
setShapeMode(QGraphicsPixmapItem::BoundingRectShape); setShapeMode(QGraphicsPixmapItem::BoundingRectShape);
setAcceptsHoverEvents(true); setAcceptsHoverEvents(true);
timeLine = new QTimeLine(250, this); timeLine = new QTimeLine(250, this);
timeLine->setCurveShape(QTimeLine::EaseOutCurve); timeLine->setCurveShape(QTimeLine::EaseOutCurve);
connect(timeLine, SIGNAL(valueChanged(qreal)), this, SLOT(animValueC hanged(qreal))); connect(timeLine, SIGNAL(valueChanged(qreal)), this, SLOT(animValueC hanged(qreal)));
if (action!=NULL) if (action!=NULL)
{ {
QObject::connect(action, SIGNAL(toggled(bool)), this, SLOT(s QObject::connect(action, SIGNAL(toggled(bool)),
etChecked(bool))); this, SLOT(setChecked(bool)));
if (action->isCheckable()) if (action->isCheckable())
{ {
setChecked(action->isChecked()); setChecked(action->isChecked());
QObject::connect(this, SIGNAL(toggled(bool)), action QObject::connect(this, SIGNAL(toggled(bool)),
, SLOT(setChecked(bool))); action, SLOT(setChecked(bool)));
} }
else else
{ {
QObject::connect(this, SIGNAL(triggered()), action, QObject::connect(this, SIGNAL(triggered()),
SLOT(trigger())); action, SLOT(trigger()));
} }
} }
} }
StelButton::StelButton(QGraphicsItem* parent, const QPixmap& apixOn, const StelButton::StelButton(QGraphicsItem* parent,
QPixmap& apixOff, const QPixmap& apixNoChange, const QPixmap& apixOn,
const QPixmap& apixHover, QAction* aaction, bool noBackgroun const QPixmap& apixOff,
d, bool isTristate) : const QPixmap& apixNoChange,
QGraphicsPixmapItem(apixOff, parent), pixOn(apixOn), const QPixmap& apixHover,
pixOff(apixOff), pixNoChange(apixNoChange), pixHover(apixHover), QAction* aaction,
checked(ButtonStateOff), action(aaction), noBckgroun bool noBackground,
d(noBackground), isTristate_(isTristate), bool isTristate) :
opacity(1.), hoverOpacity(0.) QGraphicsPixmapItem(apixOff, parent),
pixOn(apixOn),
pixOff(apixOff),
pixNoChange(apixNoChange),
pixHover(apixHover),
checked(ButtonStateOff),
action(aaction),
noBckground(noBackground),
isTristate_(isTristate),
opacity(1.),
hoverOpacity(0.)
{ {
Q_ASSERT(!pixOn.isNull()); Q_ASSERT(!pixOn.isNull());
Q_ASSERT(!pixOff.isNull()); Q_ASSERT(!pixOff.isNull());
redMode = StelApp::getInstance().getVisionModeNight(); redMode = StelApp::getInstance().getVisionModeNight();
pixOnRed = StelButton::makeRed(pixOn); pixOnRed = StelButton::makeRed(pixOn);
pixOffRed = StelButton::makeRed(pixOff); pixOffRed = StelButton::makeRed(pixOff);
if (isTristate_) { if (isTristate_)
{
Q_ASSERT(!pixNoChange.isNull()); Q_ASSERT(!pixNoChange.isNull());
pixNoChangeRed = StelButton::makeRed(pixNoChange); pixNoChangeRed = StelButton::makeRed(pixNoChange);
} }
if (!pixHover.isNull()) if (!pixHover.isNull())
pixHoverRed = StelButton::makeRed(pixHover); pixHoverRed = StelButton::makeRed(pixHover);
if (!pixBackground.isNull()) if (!pixBackground.isNull())
pixBackgroundRed = StelButton::makeRed(pixBackground); pixBackgroundRed = StelButton::makeRed(pixBackground);
setShapeMode(QGraphicsPixmapItem::BoundingRectShape); setShapeMode(QGraphicsPixmapItem::BoundingRectShape);
setAcceptsHoverEvents(true); setAcceptsHoverEvents(true);
timeLine = new QTimeLine(250, this); timeLine = new QTimeLine(250, this);
timeLine->setCurveShape(QTimeLine::EaseOutCurve); timeLine->setCurveShape(QTimeLine::EaseOutCurve);
connect(timeLine, SIGNAL(valueChanged(qreal)), this, SLOT(animValueC connect(timeLine, SIGNAL(valueChanged(qreal)),
hanged(qreal))); this, SLOT(animValueChanged(qreal)));
if (action!=NULL) if (action!=NULL)
{ {
QObject::connect(action, SIGNAL(toggled(bool)), this, SLOT(s QObject::connect(action, SIGNAL(toggled(bool)),
etChecked(bool))); this, SLOT(setChecked(bool)));
if (action->isCheckable()) if (action->isCheckable())
{ {
setChecked(action->isChecked()); setChecked(action->isChecked());
QObject::connect(this, SIGNAL(toggled(bool)), action QObject::connect(this, SIGNAL(toggled(bool)),
, SLOT(setChecked(bool))); action, SLOT(setChecked(bool)));
} }
else else
{ {
QObject::connect(this, SIGNAL(triggered()), action, QObject::connect(this, SIGNAL(triggered()),
SLOT(trigger())); action, SLOT(trigger()));
} }
} }
} }
int StelButton::toggleChecked(int checked) { int StelButton::toggleChecked(int checked)
{
if (!isTristate_) if (!isTristate_)
checked = !!!checked; checked = !!!checked;
else { else
{
if (++checked > ButtonStateNoChange) if (++checked > ButtonStateNoChange)
checked = ButtonStateOff; checked = ButtonStateOff;
} }
return checked; return checked;
} }
void StelButton::mousePressEvent(QGraphicsSceneMouseEvent* event) void StelButton::mousePressEvent(QGraphicsSceneMouseEvent* event)
{ {
QGraphicsItem::mousePressEvent(event); QGraphicsItem::mousePressEvent(event);
event->accept(); event->accept();
setChecked(toggleChecked(checked)); setChecked(toggleChecked(checked));
skipping to change at line 171 skipping to change at line 206
} }
void StelButton::mouseReleaseEvent(QGraphicsSceneMouseEvent*) void StelButton::mouseReleaseEvent(QGraphicsSceneMouseEvent*)
{ {
if (action!=NULL && !action->isCheckable()) if (action!=NULL && !action->isCheckable())
setChecked(toggleChecked(checked)); setChecked(toggleChecked(checked));
} }
void StelButton::updateIcon() void StelButton::updateIcon()
{ {
if (opacity<0.) if (opacity < 0.)
opacity=0; opacity = 0;
QPixmap pix(pixOn.size()); QPixmap pix(pixOn.size());
pix.fill(QColor(0,0,0,0)); pix.fill(QColor(0,0,0,0));
QPainter painter(&pix); QPainter painter(&pix);
painter.setOpacity(opacity); painter.setOpacity(opacity);
if (!pixBackground.isNull() && noBckground==false) if (!pixBackground.isNull() && noBckground==false)
painter.drawPixmap(0,0, redMode ? pixBackgroundRed : pixBack ground); painter.drawPixmap(0, 0, redMode ? pixBackgroundRed : pixBac kground);
painter.drawPixmap(0, 0, painter.drawPixmap(0, 0,
(isTristate_ && checked == ButtonStateNoChange) ? (redMode ? pixNoChangeRed : pixNoChange) : (isTristate_ && checked == ButtonStateNoChange) ? (redMode ? pixNoChangeRed : pixNoChange) :
(checked == ButtonStateOn) ? (redMode ? pixOnRed : pixOn) : (checked == ButtonStateOn) ? (redMode ? pixOnRed : pixOn) :
/* (checked == ButtonStateOff) ? */ (redMode ? pixOffRed : p ixOff)); /* (checked == ButtonStateOff) ? */ (redMode ? pixOffRed : p ixOff));
if (hoverOpacity>0) if (hoverOpacity > 0)
{ {
painter.setOpacity(hoverOpacity*opacity); painter.setOpacity(hoverOpacity * opacity);
painter.drawPixmap(0,0, redMode ? pixHoverRed : pixHover); painter.drawPixmap(0, 0, redMode ? pixHoverRed : pixHover);
} }
setPixmap(pix); setPixmap(pix);
} }
void StelButton::animValueChanged(qreal value) void StelButton::animValueChanged(qreal value)
{ {
hoverOpacity = value; hoverOpacity = value;
updateIcon(); updateIcon();
} }
void StelButton::setChecked(int b) void StelButton::setChecked(int b)
{ {
checked=b; checked=b;
updateIcon(); updateIcon();
} }
void StelButton::setBackgroundPixmap(const QPixmap &newBackground)
{
pixBackground = newBackground;
pixBackgroundRed = makeRed(newBackground);
updateIcon();
}
QPixmap StelButton::makeRed(const QPixmap& p) QPixmap StelButton::makeRed(const QPixmap& p)
{ {
QImage im = p.toImage().convertToFormat(QImage::Format_ARGB32); QImage im = p.toImage().convertToFormat(QImage::Format_ARGB32);
Q_ASSERT(im.format()==QImage::Format_ARGB32); Q_ASSERT(im.format()==QImage::Format_ARGB32);
QRgb* bits = (QRgb*)im.bits(); QRgb* bits = (QRgb*)im.bits();
const QRgb* stop = bits+im.width()*im.height(); const QRgb* stop = bits+im.width()*im.height();
do do
{ {
*bits = qRgba(qRed(*bits), (int)(0.2*qGreen(*bits)), (int)(0 .2*qBlue(*bits)), qAlpha(*bits)); *bits = qRgba(qRed(*bits), (int)(0.2*qGreen(*bits)), (int)(0 .2*qBlue(*bits)), qAlpha(*bits));
++bits; ++bits;
skipping to change at line 314 skipping to change at line 356
{ {
foreach (QGraphicsItem *child, QGraphicsItem::children()) foreach (QGraphicsItem *child, QGraphicsItem::children())
{ {
StelButton* bt = qgraphicsitem_cast<StelButton*>(child); StelButton* bt = qgraphicsitem_cast<StelButton*>(child);
if (bt==0) if (bt==0)
continue; continue;
bt->setRedMode(b); bt->setRedMode(b);
} }
} }
BottomStelBar::BottomStelBar(QGraphicsItem* parent, const QPixmap& pixLeft, BottomStelBar::BottomStelBar(QGraphicsItem* parent,
const QPixmap& pixRight, const QPixmap& pixLeft,
const QPixmap& pixMiddle, const QPixmap& pixSingle) : QGraph const QPixmap& pixRight,
icsItem(parent), pixBackgroundLeft(pixLeft), pixBackgroundRight(pixRight), const QPixmap& pixMiddle,
pixBackgroundMiddle(pixMiddle), pixBackgroundSingle(pixSingl const QPixmap& pixSingle) :
e) QGraphicsItem(parent),
pixBackgroundLeft(pixLeft),
pixBackgroundRight(pixRight),
pixBackgroundMiddle(pixMiddle),
pixBackgroundSingle(pixSingle)
{ {
// The text is dummy just for testing // The text is dummy just for testing
datetime = new QGraphicsSimpleTextItem("2008-02-06 17:33", this); datetime = new QGraphicsSimpleTextItem("2008-02-06 17:33", this);
location = new QGraphicsSimpleTextItem("Munich, Earth, 500m", this); location = new QGraphicsSimpleTextItem("Munich, Earth, 500m", this);
fov = new QGraphicsSimpleTextItem("FOV 43.45", this); fov = new QGraphicsSimpleTextItem("FOV 43.45", this);
fps = new QGraphicsSimpleTextItem("43.2 FPS", this); fps = new QGraphicsSimpleTextItem("43.2 FPS", this);
// Create the help label // Create the help label
helpLabel = new QGraphicsSimpleTextItem("", this); helpLabel = new QGraphicsSimpleTextItem("", this);
helpLabel->setBrush(QBrush(QColor::fromRgbF(1,1,1,1))); helpLabel->setBrush(QBrush(QColor::fromRgbF(1,1,1,1)));
skipping to change at line 359 skipping to change at line 408
delete b; delete b;
b=NULL; b=NULL;
} }
} }
} }
} }
void BottomStelBar::addButton(StelButton* button, const QString& groupName, const QString& beforeActionName) void BottomStelBar::addButton(StelButton* button, const QString& groupName, const QString& beforeActionName)
{ {
QList<StelButton*>& g = buttonGroups[groupName].elems; QList<StelButton*>& g = buttonGroups[groupName].elems;
bool done=false; bool done = false;
for (int i=0;i<g.size();++i) for (int i=0; i<g.size(); ++i)
{ {
if (g[i]->action && g[i]->action->objectName()==beforeAction Name) if (g[i]->action && g[i]->action->objectName()==beforeAction Name)
{ {
g.insert(i, button); g.insert(i, button);
done=true; done = true;
break; break;
} }
} }
if (done==false) if (done == false)
g.append(button); g.append(button);
button->setVisible(true); button->setVisible(true);
button->setParentItem(this); button->setParentItem(this);
updateButtonsGroups(); updateButtonsGroups();
connect(button, SIGNAL(hoverChanged(bool)), this, SLOT(buttonHoverCh anged(bool))); connect(button, SIGNAL(hoverChanged(bool)), this, SLOT(buttonHoverCh anged(bool)));
} }
StelButton* BottomStelBar::hideButton(const QString& actionName) StelButton* BottomStelBar::hideButton(const QString& actionName)
{ {
QString gName; QString gName;
StelButton* bToRemove=NULL; StelButton* bToRemove = NULL;
for (QMap<QString, ButtonGroup>::iterator iter=buttonGroups.begin(); iter!=buttonGroups.end();++iter) for (QMap<QString, ButtonGroup>::iterator iter=buttonGroups.begin(); iter!=buttonGroups.end();++iter)
{ {
int i=0; int i=0;
foreach (StelButton* b, iter.value().elems) foreach (StelButton* b, iter.value().elems)
{ {
if (b->action && b->action->objectName()==actionName ) if (b->action && b->action->objectName()==actionName )
{ {
gName=iter.key(); gName = iter.key();
bToRemove = b; bToRemove = b;
iter.value().elems.removeAt(i); iter.value().elems.removeAt(i);
break; break;
} }
++i; ++i;
} }
} }
if (bToRemove==NULL) if (bToRemove == NULL)
return NULL; return NULL;
if (buttonGroups[gName].elems.size()==0) if (buttonGroups[gName].elems.size() == 0)
{ {
buttonGroups.remove(gName); buttonGroups.remove(gName);
} }
// Cannot really delete because some part of the GUI depend on the p resence of some buttons // Cannot really delete because some part of the GUI depend on the p resence of some buttons
// so just make invisible // so just make invisible
bToRemove->setParentItem(NULL); bToRemove->setParentItem(NULL);
bToRemove->setVisible(false); bToRemove->setVisible(false);
updateButtonsGroups(); updateButtonsGroups();
return bToRemove; return bToRemove;
} }
// Set the margin at the left and right of a button group in pixels // Set the margin at the left and right of a button group in pixels
void BottomStelBar::setGroupMargin(const QString& groupName, int left, int right) void BottomStelBar::setGroupMargin(const QString& groupName, int left, int right)
{ {
if (!buttonGroups.contains(groupName)) if (!buttonGroups.contains(groupName))
return; return;
buttonGroups[groupName].leftMargin=left; buttonGroups[groupName].leftMargin = left;
buttonGroups[groupName].rightMargin=right; buttonGroups[groupName].rightMargin = right;
updateButtonsGroups(); updateButtonsGroups();
} }
//! Change the background of a group //! Change the background of a group
void BottomStelBar::setGroupBackground(const QString& groupName, const QPix void BottomStelBar::setGroupBackground(const QString& groupName,
map& pixLeft, const QPixmap& pixLeft,
const QPixmap& pixRight, co const QPixmap& pixRight,
nst QPixmap& pixMiddle, const QPixmap& pixMiddle,
const QPixmap& pixSingle){ const QPixmap& pixSingle)
{
if (!buttonGroups.contains(groupName)) if (!buttonGroups.contains(groupName))
return; return;
buttonGroups[groupName].pixBackgroundLeft = new QPixmap(pixLeft); buttonGroups[groupName].pixBackgroundLeft = new QPixmap(pixLeft);
buttonGroups[groupName].pixBackgroundRight = new QPixmap(pixRight); buttonGroups[groupName].pixBackgroundRight = new QPixmap(pixRight);
buttonGroups[groupName].pixBackgroundMiddle = new QPixmap(pixMiddle) ; buttonGroups[groupName].pixBackgroundMiddle = new QPixmap(pixMiddle) ;
buttonGroups[groupName].pixBackgroundSingle = new QPixmap(pixSingle) ; buttonGroups[groupName].pixBackgroundSingle = new QPixmap(pixSingle) ;
updateButtonsGroups(); updateButtonsGroups();
} }
QRectF BottomStelBar::getButtonsBoundingRect() const QRectF BottomStelBar::getButtonsBoundingRect() const
{ {
// Re-use original Qt code, just remove the help label // Re-use original Qt code, just remove the help label
QRectF childRect; QRectF childRect;
bool hasBtn = false; bool hasBtn = false;
foreach (QGraphicsItem *child, QGraphicsItem::children()) foreach (QGraphicsItem *child, QGraphicsItem::children())
{ {
if (qgraphicsitem_cast<StelButton*>(child)==0) if (qgraphicsitem_cast<StelButton*>(child)==0)
skipping to change at line 461 skipping to change at line 512
} }
if (hasBtn) if (hasBtn)
return QRectF(0, 0, childRect.width()-1, childRect.height()- 1); return QRectF(0, 0, childRect.width()-1, childRect.height()- 1);
else else
return QRectF(); return QRectF();
} }
void BottomStelBar::updateButtonsGroups() void BottomStelBar::updateButtonsGroups()
{ {
double x=0; double x = 0;
double y = datetime->boundingRect().height()+3; double y = datetime->boundingRect().height() + 3;
for (QMap<QString, ButtonGroup >::iterator iter=buttonGroups.begin() ;iter!=buttonGroups.end();++iter) for (QMap<QString, ButtonGroup >::iterator iter=buttonGroups.begin() ;iter!=buttonGroups.end();++iter)
{ {
if (iter.value().elems.empty()) ButtonGroup& group = iter.value();
QList<StelButton*>& buttons = group.elems;
if (buttons.empty())
continue; continue;
x+=iter.value().leftMargin; x += group.leftMargin;
int n=0; int n = 0;
foreach (StelButton* b, iter.value().elems) foreach (StelButton* b, buttons)
{ {
// We check if the group has its own background if n ot the case // We check if the group has its own background if n ot the case
// We apply a default background. // We apply a default background.
if (n==0) if (n == 0)
{ {
if (iter.value().elems.size()==1) if (buttons.size() == 1)
{ {
if (iter.value().pixBackgroundSingle if (group.pixBackgroundSingle == NUL
== NULL) L)
b->pixBackground = pixBackgr b->setBackgroundPixmap(pixBa
oundSingle; ckgroundSingle);
else else
b->pixBackground = *(iter.va lue().pixBackgroundSingle); b->setBackgroundPixmap(*grou p.pixBackgroundSingle);
} }
else else
{ {
if (iter.value().pixBackgroundLeft = if (group.pixBackgroundLeft == NULL)
= NULL) b->setBackgroundPixmap(pixBa
b->pixBackground = pixBackgr ckgroundLeft);
oundLeft;
else else
b->pixBackground = *(iter.va lue().pixBackgroundLeft); b->setBackgroundPixmap(*grou p.pixBackgroundLeft);
} }
} }
else if (n==iter.value().elems.size()-1) else if (n == buttons.size()-1)
{ {
if (iter.value().elems.size()!=1) if (buttons.size() != 1)
{ {
if (iter.value().pixBackgroundSingle if (group.pixBackgroundSingle == NUL
== NULL) L)
b->pixBackground = pixBackgr b->setBackgroundPixmap(pixBa
oundSingle; ckgroundSingle);
else else
b->pixBackground = *(iter.va lue().pixBackgroundSingle); b->setBackgroundPixmap(*grou p.pixBackgroundSingle);
} }
if (iter.value().pixBackgroundRight == NULL) if (group.pixBackgroundRight == NULL)
b->pixBackground = pixBackgroundRigh b->setBackgroundPixmap(pixBackground
t; Right);
else else
b->pixBackground = *(iter.value().pi xBackgroundRight); b->setBackgroundPixmap(*group.pixBac kgroundRight);
} }
else else
{ {
if (iter.value().pixBackgroundMiddle == NULL if (group.pixBackgroundMiddle == NULL)
) b->setBackgroundPixmap(pixBackground
b->pixBackground = pixBackgroundMidd Middle);
le;
else else
b->pixBackground = *(iter.value().pi xBackgroundMiddle); b->setBackgroundPixmap(*group.pixBac kgroundMiddle);
} }
// Update the button pixmap // Update the button pixmap
b->animValueChanged(0.); b->animValueChanged(0.);
b->setPos(x, y); b->setPos(x, y);
x+=b->pixOn.width(); x += b->getButtonPixmapWidth();
++n; ++n;
} }
x+=iter.value().rightMargin; x+=group.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->getJDay(); double jd = core->getJDay();
 End of changes. 48 change blocks. 
100 lines changed or deleted 131 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/