Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://astro.uni-altai.ru/~aw/stellarium/api/classLabelMgr.html
Дата изменения: Unknown Дата индексирования: Fri Feb 28 07:20:56 2014 Кодировка: Поисковые слова: р п р п р п р п р п р р п п р п п р п п р п п р п п р п п р п п р п п р п |
Stellarium 0.12.3
|
Allows for creation of custom labels on objects or coordinates. More...
#include <LabelMgr.hpp>
Public Slots | |
int | labelObject (const QString &text, const QString &objectName, bool visible=true, float fontSize=14, const QString &fontColor="#999999", const QString &side="E", double labelDistance=-1.0, const QString &style="TextOnly") |
Create a label which is attached to a StelObject. More... | |
int | labelScreen (const QString &text, int x, int y, bool visible=true, float fontSize=14, const QString &fontColor="#999999") |
Create a label at fixed screen coordinates. More... | |
bool | getLabelShow (int id) |
find out if a label identified by id is presently shown More... | |
void | setLabelShow (int id, bool show) |
set a label identified by id to be shown or not More... | |
void | setLabelText (int id, const QString &newText) |
set text of label identified by id to be newText More... | |
bool | deleteLabel (int id) |
Delete a label by the ID which was returned from addLabel... More... | |
int | deleteAllLabels (void) |
Delete all labels. More... | |
Public Member Functions | |
LabelMgr () | |
Construct a LabelMgr object. More... | |
virtual void | init () |
Initialize the LabelMgr object. More... | |
virtual void | draw (StelCore *core, class StelRenderer *renderer) |
Draw user labels. 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... | |
Allows for creation of custom labels on objects or coordinates.
Because this class is intended for use in scripting (although other uses are also fine), all label types and so on are specified by QString descriptions. TODO: when QT4.5 is out, change implementation to use QGraphicsTextItem. (QT4.5 should allow for opacity changes for fades, but it is not currently implemented.
Definition at line 43 of file LabelMgr.hpp.
LabelMgr::LabelMgr | ( | ) |
Construct a LabelMgr object.
|
slot |
Delete all labels.
|
slot |
Delete a label by the ID which was returned from addLabel...
|
virtual |
Draw user labels.
Reimplemented from StelModule.
|
virtual |
Defines the order in which the various modules are drawn.
Reimplemented from StelModule.
|
slot |
find out if a label identified by id is presently shown
|
virtual |
Initialize the LabelMgr object.
Implements StelModule.
|
slot |
Create a label which is attached to a StelObject.
text | the text to display |
objectName | the English name of the object to attach to |
visible | if true, the label starts displayed, else it starts hidden |
fontSize | size of the font to use |
fontColor | HTML-like color spec, e.g. "#ffff00" for yellow |
side | where the label appears in relation to object:
|
labelDistance | Distance of the label from the object |
style | Label style |
|
slot |
Create a label at fixed screen coordinates.
text | the text to display |
x | the horizontal position on the screen, in pixels, from the left of the screen |
y | the vertical position on the screen, in pixels, from the top of the screen |
visible | if true, the label starts displayed, else it starts hidden |
fontSize | size of the font to use |
fontColor | HTML-like color spec, e.g. "#ffff00" for yellow |
|
slot |
set a label identified by id to be shown or not
|
slot |
set text of label identified by id to be newText
|
virtual |
Update time-dependent parts of the module.
Implements StelModule.