ScreenImageMgr.hpp   ScreenImageMgr.hpp 
skipping to change at line 24 skipping to change at line 24
* *
* 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., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA. * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
*/ */
#ifndef _SCREENIMAGEMGR_HPP_ #ifndef _SCREENIMAGEMGR_HPP_
#define _SCREENIMAGEMGR_HPP_ #define _SCREENIMAGEMGR_HPP_
#include "StelModule.hpp" #include "StelModule.hpp"
#include "StelTextureTypes.hpp"
#include "VecMath.hpp" #include "VecMath.hpp"
#include <QMap> #include <QMap>
#include <QString> #include <QString>
#include <QStringList> #include <QStringList>
#include <QSize> #include <QSize>
class StelCore; class StelCore;
class QGraphicsPixmapItem; class QGraphicsPixmapItem;
class QTimeLine; class QTimeLine;
skipping to change at line 50 skipping to change at line 49
Q_OBJECT Q_OBJECT
public: public:
//! Load an image //! Load an image
//! @param filename the partial path of the file to load. This will be searched for in the //! @param filename the partial path of the file to load. This will be searched for in the
//! scripts directory using StelFileMgr. //! scripts directory using StelFileMgr.
//! @param x the screen x-position for the texture (in pixels), meas ured from the left side of the screen. //! @param x the screen x-position for the texture (in pixels), meas ured from the left side of the screen.
//! @param y the screen x-position for the texture (in pixels), meas ured from the bottom of the screen. //! @param y the screen x-position for the texture (in pixels), meas ured from the bottom of the screen.
//! @param show the initial displayed status of the image (false == hidden). //! @param show the initial displayed status of the image (false == hidden).
//! @param scale scale factor for the image. 1 = original size, 0.5 = 50% size etc. //! @param scale scale factor for the image. 1 = original size, 0.5 = 50% size etc.
//! @param alpha Alpha (opaqueness) of the image.
//! @param fadeDuration the time it takes for screen images to fade in/out/change alpha in seconds. //! @param fadeDuration the time it takes for screen images to fade in/out/change alpha in seconds.
ScreenImage(const QString& filename, float x, float y, bool show=fal se, float scale=1., float alpha=1., float fadeDuration=1.); ScreenImage(const QString& filename, float x, float y, bool show=fal se, float scale=1., float alpha=1., float fadeDuration=1.);
virtual ~ScreenImage(); virtual ~ScreenImage();
//! Draw the image. //! Draw the image.
//! @param core the StelCore object //! @param core the StelCore object
virtual bool draw(const StelCore* core); virtual bool draw(const StelCore* core);
//! update fade for on/off action //! update fade for on/off action
virtual void update(double deltaTime); virtual void update(double deltaTime);
//! Set the duration used for the fade in / fade out of the image //! Set the duration used for the fade in / fade out of the image
virtual void setFadeDuration(float duration); virtual void setFadeDuration(float duration);
//! Show or hide the image (it will fade in/out) //! Show or hide the image (it will fade in/out)
//! @param b if true, the image will be shown, else it will be hidde n //! @param b if true, the image will be shown, else it will be hidde n
virtual void setFlagShow(bool b); virtual void setFlagShow(bool b);
//! Get the displayed status of the image //! Get the displayed status of the image
virtual bool getFlagShow(void); virtual bool getFlagShow(void);
//! Set the image alpha for when it is in full "on" (after fade in). //! Set the image alpha for when it is in full "on" (after fade in).
//! @param a the new alpha (transparency) for the image. 1.0 = tota lly transparent, 0.0 = fully opaque. //! @param a the new alpha (transparency) for the image. 1.0 = tota lly transparent, 0.0 = fully opaque.
//! @param duration the time for the change in alpha to take effect.
virtual void setAlpha(float a); virtual void setAlpha(float a);
//! Set the x, y position of the image. //! Set the x, y position of the image.
//! @param x new x position //! @param x new x position
//! @param y new y position //! @param y new y position
//! @param duration how long for the movement to take in seconds //! @param duration how long for the movement to take in seconds
virtual void setXY(float x, float y, float duration=0.); virtual void setXY(float x, float y, float duration=0.);
//! Set the x, y position of the image relative to the current posit ion //! Set the x, y position of the image relative to the current posit ion
//! @param x the offset in the x-axis //! @param x the offset in the x-axis
//! @param y the offset in the y-axis //! @param y the offset in the y-axis
//! @param duration how long for the movement to take in seconds //! @param duration how long for the movement to take in seconds
skipping to change at line 115 skipping to change at line 114
Q_OBJECT Q_OBJECT
public: public:
//! Construct a LabelMgr object. //! Construct a LabelMgr object.
ScreenImageMgr(); ScreenImageMgr();
virtual ~ScreenImageMgr(); virtual ~ScreenImageMgr();
//////////////////////////////////////////////////////////////////// /////// //////////////////////////////////////////////////////////////////// ///////
// Methods defined in the StelModule class // Methods defined in the StelModule class
virtual void init(); virtual void init();
virtual void draw(StelCore* core); virtual void draw(StelCore* core, class StelRenderer* renderer);
//! Update time-dependent parts of the module. //! Update time-dependent parts of the module.
virtual void update(double deltaTime); virtual void update(double deltaTime);
//! Defines the order in which the various modules are drawn. //! Defines the order in which the various modules are drawn.
virtual double getCallOrder(StelModuleActionName actionName) const; virtual double getCallOrder(StelModuleActionName actionName) const;
public slots: public slots:
//! Create an image from a file and display on the screen at x,y coo rdinates. //! Create an image from a file and display on the screen at x,y coo rdinates.
//! @param id the ID to use when referring to this image (an arbitra ry string). //! @param id the ID to use when referring to this image (an arbitra ry string).
//! @param filename the partial path of the file to load. This will be searched //! @param filename the partial path of the file to load. This will be searched
//! for using StelFileMgr, with "scripts/" prefixed to the filename. //! for using StelFileMgr, with "scripts/" prefixed to the filename.
//! @param x The x-coordinate for the image (0 = left of screen) //! @param x The x-coordinate for the image (0 = left of screen)
//! @param y The y-coordinate for the image (0 = bottom of screen) //! @param y The y-coordinate for the image (0 = bottom of screen)
//! @param scale Image scale multiplier.
//! @param visible The initial visible state of the image //! @param visible The initial visible state of the image
//! @param alpha The initial alpha (transparancy) value for the imag e (range 0.0 to 1.0) //! @param alpha The initial alpha (transparancy) value for the imag e (range 0.0 to 1.0)
//! @param fadeDuration the time it takes for screen images to fade in/out/change alpha in seconds. //! @param fadeDuration the time it takes for screen images to fade in/out/change alpha in seconds.
void createScreenImage(const QString& id, void createScreenImage(const QString& id,
const QString& filename, const QString& filename,
float x, float x,
float y, float y,
float scale=1., float scale=1.,
bool visible=true, bool visible=true,
float alpha=1., float alpha=1.,
float fadeDuration=1.); float fadeDuration=1.);
//! Find out if an image is currently visible. //! Find out if an image is currently visible.
//! @param id the ID for the desired image. //! @param id the ID for the desired image.
bool getShowImage(const QString& id); bool getShowImage(const QString& id);
//! Set an image's visible status. //! Set an image's visible status.
//! @param id the ID for the desired image. //! @param id the ID for the desired image.
//! @param show the new visible state to set.
int getImageWidth(const QString& id); int getImageWidth(const QString& id);
int getImageHeight(const QString& id); int getImageHeight(const QString& id);
void showImage(const QString& id, bool show); void showImage(const QString& id, bool show);
//! Set an image's alpha value when visible //! Set an image's alpha value when visible
//! @param id the ID for the desired image. //! @param id the ID for the desired image.
//! @param alpha the new alpha value to set. //! @param alpha the new alpha value to set.
void setImageAlpha(const QString& id, float alpha); void setImageAlpha(const QString& id, float alpha);
//! Set the x and y coordinates for the specified image //! Set the x and y coordinates for the specified image
//! @param id the ID for the desired image. //! @param id the ID for the desired image.
//! @param x The new x-coordinate for the image. //! @param x The new x-coordinate for the image.
 End of changes. 7 change blocks. 
5 lines changed or deleted 4 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/