Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://astro.uni-altai.ru/~aw/stellarium/api/classScreenImageMgr.html
Дата изменения: Unknown Дата индексирования: Fri Feb 28 07:30:53 2014 Кодировка: Поисковые слова: п п п п п п п п п п п п п п п |
Stellarium 0.12.3
|
Module for managing images for scripting. More...
#include <ScreenImageMgr.hpp>
Public Slots | |
void | createScreenImage (const QString &id, const QString &filename, float x, float y, float scale=1., bool visible=true, float alpha=1., float fadeDuration=1.) |
Create an image from a file and display on the screen at x,y coordinates. More... | |
bool | getShowImage (const QString &id) |
Find out if an image is currently visible. More... | |
int | getImageWidth (const QString &id) |
Set an image's visible status. More... | |
int | getImageHeight (const QString &id) |
void | showImage (const QString &id, bool show) |
void | setImageAlpha (const QString &id, float alpha) |
Set an image's alpha value when visible. More... | |
void | setImageXY (const QString &id, float x, float y, float duration=0.) |
Set the x and y coordinates for the specified image. More... | |
void | deleteImage (const QString &id) |
Delete an image. More... | |
void | deleteAllImages (void) |
Delete all images currently managed by ScreenImageMgr. More... | |
QStringList | getAllImageIDs (void) |
Get a list of currently loaded image IDs. More... | |
Public Member Functions | |
ScreenImageMgr () | |
Construct a LabelMgr object. More... | |
virtual void | init () |
Initialize itself. More... | |
virtual void | draw (StelCore *core, class StelRenderer *renderer) |
Execute all the drawing functions for this module. More... | |
virtual void | update (double deltaTime) |
Update time-dependent parts of the module. More... | |
virtual double | getCallOrder (StelModuleActionName actionName) const |
Defines the order in which the various modules are drawn. More... | |
Public Member Functions inherited from StelModule | |
virtual void | deinit () |
Called before the module will be deleted, and before the renderer is destroyed. More... | |
virtual bool | drawPartial (StelCore *core, class StelRenderer *renderer) |
Iterate through the drawing sequence. More... | |
virtual QString | getModuleVersion () const |
Get the version of the module, default is stellarium main version. More... | |
virtual QString | getAuthorName () const |
Get the name of the module author. More... | |
virtual QString | getAuthorEmail () const |
Get the email adress of the module author. More... | |
virtual void | handleMouseClicks (class QMouseEvent *) |
Handle mouse clicks. More... | |
virtual void | handleMouseWheel (class QWheelEvent *) |
Handle mouse wheel. More... | |
virtual bool | handleMouseMoves (int x, int y, Qt::MouseButtons b) |
Handle mouse moves. More... | |
virtual void | handleKeys (class QKeyEvent *e) |
Handle key events. More... | |
virtual bool | configureGui (bool show=true) |
Detect or show the configuration GUI elements for the module. More... | |
Additional Inherited Members | |
Public Types inherited from StelModule | |
enum | StelModuleSelectAction { AddToSelection, ReplaceSelection, RemoveFromSelection } |
Enum used when selecting objects to define whether to add to, replace, or remove from the existing selection list. More... | |
enum | StelModuleActionName { ActionDraw, ActionUpdate, ActionHandleMouseClicks, ActionHandleMouseMoves, ActionHandleKeys } |
Define the possible action for which an order is defined. More... | |
Module for managing images for scripting.
Images are identified by a string ID which is passed to ScreenImageMgr members when it is necessary to specify an image to work with. Member functions in this class which modify the state of the class are all mediated through the signal/slot mechanism to ensure such operations happen in the main thread where images are drawn, and not in the script thread.
Definition at line 103 of file ScreenImageMgr.hpp.
ScreenImageMgr::ScreenImageMgr | ( | ) |
Construct a LabelMgr object.
|
slot |
Create an image from a file and display on the screen at x,y coordinates.
id | the ID to use when referring to this image (an arbitrary string). |
filename | the partial path of the file to load. This will be searched for using StelFileMgr, with "scripts/" prefixed to the filename. |
x | The x-coordinate for the image (0 = left of screen) |
y | The y-coordinate for the image (0 = bottom of screen) |
scale | Image scale multiplier. |
visible | The initial visible state of the image |
alpha | The initial alpha (transparancy) value for the image (range 0.0 to 1.0) |
fadeDuration | the time it takes for screen images to fade in/out/change alpha in seconds. |
|
slot |
Delete all images currently managed by ScreenImageMgr.
|
slot |
Delete an image.
id | the ID for the desired image. |
|
virtual |
Execute all the drawing functions for this module.
core | the core to use for the drawing |
renderer | Renderer to draw with. |
Reimplemented from StelModule.
|
slot |
Get a list of currently loaded image IDs.
|
virtual |
Defines the order in which the various modules are drawn.
Reimplemented from StelModule.
|
slot |
Set an image's visible status.
id | the ID for the desired image. |
|
slot |
Find out if an image is currently visible.
id | the ID for the desired image. |
|
virtual |
Initialize itself.
If the initialization takes significant time, the progress should be displayed on the loading bar.
Implements StelModule.
|
slot |
Set an image's alpha value when visible.
id | the ID for the desired image. |
alpha | the new alpha value to set. |
|
slot |
Set the x and y coordinates for the specified image.
id | the ID for the desired image. |
x | The new x-coordinate for the image. |
y | The new y-coordinate for the image. |
duration | The time for the change to take place, in seconds. |
|
virtual |
Update time-dependent parts of the module.
Implements StelModule.