SkyGui.cpp   SkyGui.cpp 
skipping to change at line 118 skipping to change at line 118
} }
SkyGui::SkyGui(QGraphicsItem * parent): QGraphicsWidget(parent), stelGui(NU LL) SkyGui::SkyGui(QGraphicsItem * parent): QGraphicsWidget(parent), stelGui(NU LL)
{ {
setObjectName("StelSkyGui"); setObjectName("StelSkyGui");
// Construct the Windows buttons bar // Construct the Windows buttons bar
winBar = new LeftStelBar(this); winBar = new LeftStelBar(this);
// Construct the bottom buttons bar // Construct the bottom buttons bar
buttonBar = new BottomStelBar(this, QPixmap(":/graphicGui/btbg-left. png"), QPixmap(":/graphicGui/btbg-right.png"), buttonBar = new BottomStelBar(this, QPixmap(":/graphicGui/btbg-left. png"), QPixmap(":/graphicGui/btbg-right.png"),
QPixmap(": /graphicGui/btbg-middle.png"), QPixmap(":/graphicGui/btbg-single.png")); QPixmap(":/graphicGui/b tbg-middle.png"), QPixmap(":/graphicGui/btbg-single.png"));
infoPanel = new InfoPanel(this); infoPanel = new InfoPanel(this);
// Used to display some progress bar in the lower right corner, e.g. when loading a file // Used to display some progress bar in the lower right corner, e.g. when loading a file
progressBarMgr = new StelProgressBarMgr(this); progressBarMgr = new StelProgressBarMgr(this);
// The path drawn around the button bars // The path drawn around the button bars
buttonBarPath = new StelBarsPath(this); buttonBarPath = new StelBarsPath(this);
lastButtonbarWidth = 0; lastButtonbarWidth = 0;
autoHidebts = NULL; autoHidebts = NULL;
skipping to change at line 158 skipping to change at line 158
winBar->setParentItem(this); winBar->setParentItem(this);
buttonBar->setParentItem(this); buttonBar->setParentItem(this);
buttonBarPath->setParentItem(this); buttonBarPath->setParentItem(this);
infoPanel->setParentItem(this); infoPanel->setParentItem(this);
progressBarMgr->setParentItem(this); progressBarMgr->setParentItem(this);
// Create the 2 auto hide buttons in the bottom left corner // Create the 2 auto hide buttons in the bottom left corner
autoHidebts = new CornerButtons(); autoHidebts = new CornerButtons();
QPixmap pxmapOn = QPixmap(":/graphicGui/HorizontalAutoHideOn.png"); QPixmap pxmapOn = QPixmap(":/graphicGui/HorizontalAutoHideOn.png");
QPixmap pxmapOff = QPixmap(":/graphicGui/HorizontalAutoHideOff.png") ; QPixmap pxmapOff = QPixmap(":/graphicGui/HorizontalAutoHideOff.png") ;
btHorizAutoHide = new StelButton(autoHidebts, pxmapOn, pxmapOff, QPi xmap(), stelGui->getGuiActions("actionAutoHideHorizontalButtonBar"), true); btHorizAutoHide = new StelButton(autoHidebts, pxmapOn, pxmapOff, QPi xmap(), stelGui->getGuiAction("actionAutoHideHorizontalButtonBar"), true);
btHorizAutoHide->setChecked(autoHideHorizontalButtonBar); btHorizAutoHide->setChecked(autoHideHorizontalButtonBar);
pxmapOn = QPixmap(":/graphicGui/VerticalAutoHideOn.png"); pxmapOn = QPixmap(":/graphicGui/VerticalAutoHideOn.png");
pxmapOff = QPixmap(":/graphicGui/VerticalAutoHideOff.png"); pxmapOff = QPixmap(":/graphicGui/VerticalAutoHideOff.png");
btVertAutoHide = new StelButton(autoHidebts, pxmapOn, pxmapOff, QPix map(), stelGui->getGuiActions("actionAutoHideVerticalButtonBar"), true); btVertAutoHide = new StelButton(autoHidebts, pxmapOn, pxmapOff, QPix map(), stelGui->getGuiAction("actionAutoHideVerticalButtonBar"), true);
btVertAutoHide->setChecked(autoHideVerticalButtonBar); btVertAutoHide->setChecked(autoHideVerticalButtonBar);
btHorizAutoHide->setPos(1,btVertAutoHide->pixmap().height()-btHorizA utoHide->pixmap().height()+1); btHorizAutoHide->setPos(1,btVertAutoHide->pixmap().height()-btHorizA utoHide->pixmap().height()+1);
btVertAutoHide->setPos(0,0); btVertAutoHide->setPos(0,0);
btVertAutoHide->setZValue(1000); btVertAutoHide->setZValue(1000);
autoHidebts->setParentItem(this); autoHidebts->setParentItem(this);
infoPanel->setPos(8,8); infoPanel->setPos(8,8);
// If auto hide is off, show the relevant toolbars // If auto hide is off, show the relevant toolbars
skipping to change at line 193 skipping to change at line 193
} }
buttonBarPath->setZValue(-0.1); buttonBarPath->setZValue(-0.1);
updateBarsPos(); updateBarsPos();
connect(&StelApp::getInstance(), SIGNAL(colorSchemeChanged(const QSt ring&)), this, SLOT(setStelStyle(const QString&))); connect(&StelApp::getInstance(), SIGNAL(colorSchemeChanged(const QSt ring&)), this, SLOT(setStelStyle(const QString&)));
} }
void SkyGui::resizeEvent(QGraphicsSceneResizeEvent* event) void SkyGui::resizeEvent(QGraphicsSceneResizeEvent* event)
{ {
QGraphicsWidget::resizeEvent(event); QGraphicsWidget::resizeEvent(event);
updateBarsPos(); updateBarsPos();
} }
void SkyGui::hoverMoveEvent(QGraphicsSceneHoverEvent* event) void SkyGui::hoverMoveEvent(QGraphicsSceneHoverEvent* event)
{ {
const int hh = geometry().height(); const int hh = geometry().height();
double x = event->pos().x(); double x = event->pos().x();
double y = event->pos().y(); double y = event->pos().y();
double maxX = winBar->boundingRect().width()+2.*buttonBarPath->getRo undSize(); double maxX = winBar->boundingRect().width()+2.*buttonBarPath->getRo undSize();
double maxY = hh-(winBar->boundingRect().height()+buttonBar->boundin gRect().height()+2.*buttonBarPath->getRoundSize()); double maxY = hh-(winBar->boundingRect().height()+buttonBar->boundin gRect().height()+2.*buttonBarPath->getRoundSize());
skipping to change at line 254 skipping to change at line 254
winBar->setPos(round(newWinBarX), round(newWinBarY)); winBar->setPos(round(newWinBarX), round(newWinBarY));
updatePath = true; updatePath = true;
} }
double rangeY = buttonBar->boundingRectNoHelpLabel().height()+0.5-7. -buttonBarPath->getRoundSize(); double rangeY = buttonBar->boundingRectNoHelpLabel().height()+0.5-7. -buttonBarPath->getRoundSize();
const qreal newButtonBarX = winBar->boundingRectNoHelpLabel().right( )+buttonBarPath->getRoundSize(); const qreal newButtonBarX = winBar->boundingRectNoHelpLabel().right( )+buttonBarPath->getRoundSize();
const qreal newButtonBarY = hh-buttonBar->boundingRectNoHelpLabel(). height()-buttonBarPath->getRoundSize()+0.5+(1.-animBottomBarTimeLine->curre ntValue())*rangeY; const qreal newButtonBarY = hh-buttonBar->boundingRectNoHelpLabel(). height()-buttonBarPath->getRoundSize()+0.5+(1.-animBottomBarTimeLine->curre ntValue())*rangeY;
if (buttonBar->pos().x()!=newButtonBarX || buttonBar->pos().y()!=new ButtonBarY) if (buttonBar->pos().x()!=newButtonBarX || buttonBar->pos().y()!=new ButtonBarY)
{ {
buttonBar->setPos(round(newButtonBarX), round(newButtonBarY) ); buttonBar->setPos(round(newButtonBarX), round(newButtonBarY) );
updatePath = true; updatePath = true;
} }
if (lastButtonbarWidth != buttonBar->boundingRectNoHelpLabel().width ()) if (lastButtonbarWidth != buttonBar->boundingRectNoHelpLabel().width ())
{ {
updatePath = true; updatePath = true;
lastButtonbarWidth = (int)(buttonBar->boundi lastButtonbarWidth = (int)(buttonBar->boundingRectNoHelpLabe
ngRectNoHelpLabel().width()); l().width());
} }
if (updatePath) if (updatePath)
buttonBarPath->updatePath(buttonBar, winBar); buttonBarPath->updatePath(buttonBar, winBar);
const qreal newProgressBarX = ww-progressBarMgr->boundingRect().widt h()-20; const qreal newProgressBarX = ww-progressBarMgr->boundingRect().widt h()-20;
const qreal newProgressBarY = hh-progressBarMgr->boundingRect().heig ht()+7; const qreal newProgressBarY = hh-progressBarMgr->boundingRect().heig ht()+7;
progressBarMgr->setPos(newProgressBarX, newProgressBarY); progressBarMgr->setPos(newProgressBarX, newProgressBarY);
progressBarMgr->setZValue(400); progressBarMgr->setZValue(400);
 End of changes. 6 change blocks. 
8 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/