StelGuiItems.hpp   StelGuiItems.hpp 
skipping to change at line 82 skipping to change at line 82
//! @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=NULL, bool noBackground= false);
//! Constructor
//! @param parent the parent item
//! @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 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 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,
const QString& actionId=QString(), bool noBackgro const QString& actionId, bool noBackground=false)
und=false); ;
//! 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 pixNoChange the pixmap to display when the button state o f a tristate is not changed //! @param pixNoChange the pixmap to display when the button state o f a tristate is not changed
//! @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 associated action. Connections are automatic ally done with the signals if relevant. //! @param actionId the associated action. Connections are automatic ally 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
//! @param isTristate define whether the button is a tristate or an on/off button //! @param isTristate define whether the button is a tristate or an on/off button
StelButton(QGraphicsItem* parent, const QPixmap& pixOn, const QPixma p& pixOff, const QPixmap& pixNoChange, StelButton(QGraphicsItem* parent, const QPixmap& pixOn, const QPixma p& pixOff, const QPixmap& pixNoChange,
const QPixmap& pixHover=QPixmap(), const QPixmap& pixHover,
const QString& actionId=QString(), bool noBackgro und=false, bool isTristate=true); const QString& actionId=QString(), bool noBackgro und=false, bool isTristate=true);
//! Button states //! Button states
enum {ButtonStateOff = 0, ButtonStateOn = 1, ButtonStateNoChange = 2 }; enum {ButtonStateOff = 0, ButtonStateOn = 1, ButtonStateNoChange = 2 };
//! Get whether the button is checked //! Get whether the button is checked
int isChecked() const {return checked;} int isChecked() const {return checked;}
//! Get the width of the button image. //! Get the width of the button image.
//! The width is based on pixOn. //! The width is based on pixOn.
int getButtonPixmapWidth() const {return pixOn.width();} int getButtonPixmapWidth() const {return pixOn.width();}
//! Set the button opacity //! Set the button opacity
void setOpacity(double v) {opacity=v; updateIcon();} void setOpacity(double v) {opacity=v; updateIcon();}
//! Set the background pixmap of the button. //! Set the background pixmap of the button.
void setBackgroundPixmap(const QPixmap& newBackground); void setBackgroundPixmap(const QPixmap& newBackground);
void setFocusOnSky(bool b) { flagChangeFocus=b; }
signals: signals:
//! Triggered when the button state changes //! Triggered when the button state changes
void toggled(bool); void toggled(bool);
//! Triggered when the button state changes //! Triggered when the button state changes
void triggered(); void triggered();
//! Emitted when the hover state change //! Emitted when the hover state change
//! @param b true if the mouse entered the button //! @param b true if the mouse entered the button
void hoverChanged(bool b); void hoverChanged(bool b);
public slots: public slots:
skipping to change at line 153 skipping to change at line 162
void updateIcon(); 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;
QTimeLine* timeLine; QTimeLine* timeLine;
class StelAction* action; class StelAction* action;
bool noBckground; bool noBckground;
bool isTristate_; bool isTristate_;
double opacity; double opacity;
double hoverOpacity; double hoverOpacity;
}; };
// The button bar on the left containing windows toggle buttons // The button bar on the left containing windows toggle buttons
skipping to change at line 182 skipping to change at line 192
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;
QGraphicsSimpleTextItem* helpLabel; QGraphicsSimpleTextItem* helpLabel;
QGraphicsPixmapItem* helpLabelPixmap; // bad-graphics replacement.
}; };
// 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();
skipping to change at line 248 skipping to change at line 259
void sizeChanged(); void sizeChanged();
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:
void updateText(bool forceUpdatePos=false); void updateText(bool forceUpdatePos=false);
void updateButtonsGroups(); void updateButtonsGroups();
QRectF getButtonsBoundingRect() const; QRectF getButtonsBoundingRect() const;
// Elements which get displayed above the buttons:
QGraphicsSimpleTextItem* location; QGraphicsSimpleTextItem* location;
QGraphicsSimpleTextItem* datetime; QGraphicsSimpleTextItem* datetime;
QGraphicsSimpleTextItem* fov; QGraphicsSimpleTextItem* fov;
QGraphicsSimpleTextItem* fps; QGraphicsSimpleTextItem* fps;
// 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.
QGraphicsPixmapItem* locationPixmap;
QGraphicsPixmapItem* datetimePixmap;
QGraphicsPixmapItem* fovPixmap;
QGraphicsPixmapItem* fpsPixmap;
struct ButtonGroup struct ButtonGroup
{ {
ButtonGroup() : leftMargin(0), rightMargin(0), ButtonGroup() : leftMargin(0), rightMargin(0),
pixBackgroundLeft(NULL), pix BackgroundRight(NULL), pixBackgroundLeft(NULL), pix BackgroundRight(NULL),
pixBackgroundMiddle(NULL), p ixBackgroundSingle(NULL) {;} pixBackgroundMiddle(NULL), p ixBackgroundSingle(NULL) {;}
//! 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;
skipping to change at line 286 skipping to change at line 304
bool flagShowTime; bool flagShowTime;
bool flagShowLocation; bool flagShowLocation;
bool flagShowFps; bool flagShowFps;
bool flagShowFov; bool flagShowFov;
bool flagFovDms; bool flagFovDms;
bool flagTimeJd; bool flagTimeJd;
bool flagShowTZ; bool flagShowTZ;
QGraphicsSimpleTextItem* helpLabel; QGraphicsSimpleTextItem* helpLabel;
QGraphicsPixmapItem* helpLabelPixmap; // bad-graphics replacement.
}; };
// 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;}
void setBackgroundOpacity(double opacity); void setBackgroundOpacity(double opacity);
 End of changes. 9 change blocks. 
4 lines changed or deleted 29 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/