StelGuiItems.hpp   StelGuiItems.hpp 
skipping to change at line 56 skipping to change at line 56
private: private:
QMap<const StelProgressController*, QProgressBar*> allBars; QMap<const StelProgressController*, QProgressBar*> allBars;
}; };
// Buttons in the bottom left corner // Buttons in the bottom left corner
class CornerButtons : public QObject, public QGraphicsItem class CornerButtons : public QObject, public QGraphicsItem
{ {
Q_OBJECT Q_OBJECT
Q_INTERFACES(QGraphicsItem) Q_INTERFACES(QGraphicsItem)
public: public:
CornerButtons(QGraphicsItem* parent=NULL); CornerButtons(QGraphicsItem* parent=Q_NULLPTR);
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem
*option, QWidget *widget = 0); *option, QWidget *widget = Q_NULLPTR);
virtual QRectF boundingRect() const; virtual QRectF boundingRect() const;
void setOpacity(double opacity); void setOpacity(double opacity);
private: private:
mutable double lastOpacity; mutable double lastOpacity;
}; };
//! A Button Graphicsitem for use in Stellarium's graphic widgets //! A Button Graphicsitem for use in Stellarium's graphic widgets
class StelButton : public QObject, public QGraphicsPixmapItem class StelButton : public QObject, public QGraphicsPixmapItem
{ {
friend class BottomStelBar; friend class BottomStelBar;
skipping to change at line 80 skipping to change at line 80
public: public:
//! Constructor //! Constructor
//! @param parent the parent item //! @param parent the parent item
//! @param pixOn the pixmap to display when the button is toggled //! @param pixOn the pixmap to display when the button is toggled
//! @param pixOff the pixmap to display when the button is not toggl ed //! @param pixOff the pixmap to display when the button is not toggl ed
//! @param pixHover a pixmap slowly blended when mouse is over the b utton //! @param pixHover a pixmap slowly blended when mouse is over the b utton
//! @param action the associated action. Connections are automatical ly done with the signals if relevant. //! @param action the associated action. Connections are automatical ly done with the signals if relevant.
//! @param noBackground define whether the button background image h ave to be used //! @param noBackground define whether the button background image h ave to be used
StelButton(QGraphicsItem* parent, const QPixmap& pixOn, const QPixma p& pixOff, StelButton(QGraphicsItem* parent, const QPixmap& pixOn, const QPixma p& pixOff,
const QPixmap& pixHover=QPixmap(), const QPixmap& pixHover=QPixmap(),
class StelAction* action=NULL, bool noBackground=false); class StelAction* action=Q_NULLPTR, bool noBackground=fal se);
//! Constructor //! Constructor
//! @param parent the parent item //! @param parent the parent item
//! @param pixOn the pixmap to display when the button is toggled //! @param pixOn the pixmap to display when the button is toggled
//! @param pixOff the pixmap to display when the button is not toggl ed //! @param pixOff the pixmap to display when the button is not toggl ed
//! @param pixHover a pixmap slowly blended when mouse is over the b utton //! @param pixHover a pixmap slowly blended when mouse is over the b utton
//! @param actionId the id of the associated action. Connections are automatically done with the signals if relevant. //! @param actionId the id of the associated action. Connections are automatically done with the signals if relevant.
//! @param noBackground define whether the button background image h ave to be used //! @param noBackground define whether the button background image h ave to be used
StelButton(QGraphicsItem* parent, const QPixmap& pixOn, const QPixma p& pixOff, StelButton(QGraphicsItem* parent, const QPixmap& pixOn, const QPixma p& pixOff,
const QPixmap& pixHover, const QPixmap& pixHover,
skipping to change at line 147 skipping to change at line 147
void setChecked(int b); void setChecked(int b);
void setChecked(bool b) { setChecked((int)b); } void setChecked(bool b) { setChecked((int)b); }
protected: protected:
virtual void mousePressEvent(QGraphicsSceneMouseEvent* event); virtual void mousePressEvent(QGraphicsSceneMouseEvent* event);
virtual void hoverEnterEvent(QGraphicsSceneHoverEvent* event); virtual void hoverEnterEvent(QGraphicsSceneHoverEvent* event);
virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent* event); virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent* event);
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event); virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
private slots: private slots:
void animValueChanged(qreal value); void animValueChanged(qreal value);
void updateIcon();
private: private:
void initCtor(const QPixmap& apixOn, void initCtor(const QPixmap& apixOn,
const QPixmap& apixOff, const QPixmap& apixOff,
const QPixmap& apixNoChange, const QPixmap& apixNoChange,
const QPixmap& apixHover, const QPixmap& apixHover,
StelAction* aaction, StelAction* aaction,
bool noBackground, bool noBackground,
bool isTristate); bool isTristate);
void updateIcon();
int toggleChecked(int); int toggleChecked(int);
QPixmap pixOn; QPixmap pixOn;
QPixmap pixOff; QPixmap pixOff;
QPixmap pixNoChange; QPixmap pixNoChange;
QPixmap pixHover; QPixmap pixHover;
QPixmap pixBackground; QPixmap pixBackground;
int checked; int checked;
bool flagChangeFocus; bool flagChangeFocus;
skipping to change at line 183 skipping to change at line 183
}; };
// The button bar on the left containing windows toggle buttons // The button bar on the left containing windows toggle buttons
class LeftStelBar : public QObject, public QGraphicsItem class LeftStelBar : public QObject, public QGraphicsItem
{ {
Q_OBJECT Q_OBJECT
Q_INTERFACES(QGraphicsItem) Q_INTERFACES(QGraphicsItem)
public: public:
LeftStelBar(QGraphicsItem* parent); LeftStelBar(QGraphicsItem* parent);
~LeftStelBar(); ~LeftStelBar();
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0); virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = Q_NULLPTR);
virtual QRectF boundingRect() const; virtual QRectF boundingRect() const;
void addButton(StelButton* button); void addButton(StelButton* button);
QRectF boundingRectNoHelpLabel() const; QRectF boundingRectNoHelpLabel() const;
//! Set the color for all the sub elements //! Set the color for all the sub elements
void setColor(const QColor& c); void setColor(const QColor& c);
private slots: private slots:
//! Update the help label when a button is hovered //! Update the help label when a button is hovered
void buttonHoverChanged(bool b); void buttonHoverChanged(bool b);
private: private:
QTimeLine* hideTimeLine; QTimeLine* hideTimeLine;
skipping to change at line 206 skipping to change at line 206
}; };
// The button bar on the bottom containing actions toggle buttons // The button bar on the bottom containing actions toggle buttons
class BottomStelBar : public QObject, public QGraphicsItem class BottomStelBar : public QObject, public QGraphicsItem
{ {
Q_OBJECT Q_OBJECT
Q_INTERFACES(QGraphicsItem) Q_INTERFACES(QGraphicsItem)
public: public:
BottomStelBar(QGraphicsItem* parent, const QPixmap& pixLeft=QPixmap( ), const QPixmap& pixRight=QPixmap(), const QPixmap& pixMiddle=QPixmap(), c onst QPixmap& pixSingle=QPixmap()); BottomStelBar(QGraphicsItem* parent, const QPixmap& pixLeft=QPixmap( ), const QPixmap& pixRight=QPixmap(), const QPixmap& pixMiddle=QPixmap(), c onst QPixmap& pixSingle=QPixmap());
virtual ~BottomStelBar(); virtual ~BottomStelBar();
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0); virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = Q_NULLPTR);
virtual QRectF boundingRect() const; virtual QRectF boundingRect() const;
QRectF boundingRectNoHelpLabel() const; QRectF boundingRectNoHelpLabel() const;
//! Add a button in a group in the button bar. Group are displayed i n alphabetic order. //! Add a button in a group in the button bar. Group are displayed i n alphabetic order.
//! @param button the button to add //! @param button the button to add
//! @param groupName the name of the button group to which the butto n belongs to. If the group doesn't exist yet, a new one is created. //! @param groupName the name of the button group to which the butto n belongs to. If the group doesn't exist yet, a new one is created.
//! @param beforeActionName insert the button before the button asso ciated to the given action. If the action doesn't exist, insert it at the e nd of the group. //! @param beforeActionName insert the button before the button asso ciated to the given action. If the action doesn't exist, insert it at the e nd of the group.
void addButton(StelButton* button, const QString& groupName="default Group", const QString& beforeActionName=""); void addButton(StelButton* button, const QString& groupName="default Group", const QString& beforeActionName="");
//! Hide the button associated with the action of the passed name //! Hide the button associated with the action of the passed name
StelButton* hideButton(const QString& actionName); StelButton* hideButton(const QString& actionName);
skipping to change at line 277 skipping to change at line 277
// For bad graphics, show these instead. We can use location etc for font info. // For bad graphics, show these instead. We can use location etc for font info.
// We use ad-hoc pixmaps instead if command-line arg. -t (--text-fix ) is given. // We use ad-hoc pixmaps instead if command-line arg. -t (--text-fix ) is given.
QGraphicsPixmapItem* locationPixmap; QGraphicsPixmapItem* locationPixmap;
QGraphicsPixmapItem* datetimePixmap; QGraphicsPixmapItem* datetimePixmap;
QGraphicsPixmapItem* fovPixmap; QGraphicsPixmapItem* fovPixmap;
QGraphicsPixmapItem* fpsPixmap; QGraphicsPixmapItem* fpsPixmap;
struct ButtonGroup struct ButtonGroup
{ {
ButtonGroup() : leftMargin(0), rightMargin(0), ButtonGroup() : leftMargin(0), rightMargin(0),
pixBackgroundLeft(NULL), pix pixBackgroundLeft(Q_NULLPTR)
BackgroundRight(NULL), , pixBackgroundRight(Q_NULLPTR),
pixBackgroundMiddle(NULL), p pixBackgroundMiddle(Q_NULLPT
ixBackgroundSingle(NULL) {;} R), pixBackgroundSingle(Q_NULLPTR) {;}
//! Elements of the group //! Elements of the group
QList<StelButton*> elems; QList<StelButton*> elems;
//! Left margin size in pixel //! Left margin size in pixel
int leftMargin; int leftMargin;
//! Right margin size in pixel //! Right margin size in pixel
int rightMargin; int rightMargin;
//! Background Images; //! Background Images;
QPixmap* pixBackgroundLeft; QPixmap* pixBackgroundLeft;
QPixmap* pixBackgroundRight; QPixmap* pixBackgroundRight;
QPixmap* pixBackgroundMiddle; QPixmap* pixBackgroundMiddle;
 End of changes. 7 change blocks. 
13 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/