StelGuiItems.hpp   StelGuiItems.hpp 
skipping to change at line 32 skipping to change at line 32
#include <QGraphicsPixmapItem> #include <QGraphicsPixmapItem>
#include <QDebug> #include <QDebug>
class QGraphicsSceneMouseEvent; class QGraphicsSceneMouseEvent;
class QTimeLine; class QTimeLine;
class QAction; class QAction;
class QGraphicsTextItem; class QGraphicsTextItem;
class QTimer; class QTimer;
//! Progess bars in the lower right corner // Progess bars in the lower right corner
class StelProgressBarMgr : public QObject, public QGraphicsItem class StelProgressBarMgr : public QObject, public QGraphicsItem
{ {
Q_OBJECT; Q_OBJECT
public: public:
StelProgressBarMgr(QGraphicsItem* parent); StelProgressBarMgr(QGraphicsItem* parent);
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0); virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
virtual QRectF boundingRect() const; virtual QRectF boundingRect() const;
class QProgressBar* addProgressBar(); class QProgressBar* addProgressBar();
private slots: private slots:
void oneDestroyed(QObject* obj); void oneDestroyed(QObject* obj);
private: private:
void updateBarsPositions(); void updateBarsPositions();
}; };
//! 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
public: public:
CornerButtons(QGraphicsItem* parent=NULL); CornerButtons(QGraphicsItem* parent=NULL);
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0); virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
virtual QRectF boundingRect() const; virtual QRectF boundingRect() const;
void setOpacity(double opacity); void setOpacity(double opacity);
private: private:
mutable double lastOpacity; mutable double lastOpacity;
}; };
//! Implement a button 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;
friend class LeftStelBar; friend class LeftStelBar;
Q_OBJECT; Q_OBJECT
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 groupName the name of a button group in which to add the button. If the group doesn't exist, create a new group.
//! @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 helpLabel the label in which the button will display it's help when hovered //! @param noBackground define whether the button background image h ave to be used
StelButton(QGraphicsItem* parent, const QPixmap& pixOn, const QPixma p& pixOff, const QPixmap& pixHover=QPixmap(), StelButton(QGraphicsItem* parent, const QPixmap& pixOn, const QPixma p& pixOff, const QPixmap& pixHover=QPixmap(),
QAction* action=NULL, bool noBackground=false); QAction* action=NULL, bool noBackground=false);
//! Get whether the button is checked //! Get whether the button is checked
bool isChecked() const {return checked;} bool isChecked() const {return checked;}
//! Set the button opacity //! Set the button opacity
void setOpacity(double v) {opacity=v; updateIcon();} void setOpacity(double v) {opacity=v; updateIcon();}
//! Activate red mode for this button, i.e. will reduce the non red color component of the icon //! Activate red mode for this button, i.e. will reduce the non red color component of the icon
skipping to change at line 129 skipping to change at line 128
bool checked; bool checked;
QTimeLine* timeLine; QTimeLine* timeLine;
QAction* action; QAction* action;
bool noBckground; bool noBckground;
double opacity; double opacity;
double hoverOpacity; double hoverOpacity;
bool redMode; bool redMode;
}; };
//! 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
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 = 0);
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);
//! Activate red mode for the buttons, i.e. will reduce the non red color component of the icon //! Activate red mode for the buttons, i.e. will reduce the non red color component of the icon
void setRedMode(bool b); void setRedMode(bool b);
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;
QGraphicsSimpleTextItem* helpLabel; QGraphicsSimpleTextItem* helpLabel;
}; };
//! 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
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 = 0);
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 b the button to add //! @param b 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.
skipping to change at line 221 skipping to change at line 220
QPixmap pixBackgroundRight; QPixmap pixBackgroundRight;
QPixmap pixBackgroundMiddle; QPixmap pixBackgroundMiddle;
QPixmap pixBackgroundSingle; QPixmap pixBackgroundSingle;
bool flagShowTime; bool flagShowTime;
bool flagShowLocation; bool flagShowLocation;
QGraphicsSimpleTextItem* helpLabel; QGraphicsSimpleTextItem* helpLabel;
}; };
//! The path around the bottom left button bars // The path around the bottom left button bars
class StelBarsPath : public QGraphicsPathItem class StelBarsPath : public QGraphicsPathItem
{ {
public: public:
StelBarsPath(QGraphicsItem* parent); StelBarsPath(QGraphicsItem* parent);
void updatePath(BottomStelBar* bot, LeftStelBar* lef); void updatePath(BottomStelBar* bot, LeftStelBar* lef);
double getRoundSize() const {return roundSize;} double getRoundSize() const {return roundSize;}
private: private:
double roundSize; double roundSize;
}; };
 End of changes. 13 change blocks. 
13 lines changed or deleted 12 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/