LabelMgr.hpp   LabelMgr.hpp 
skipping to change at line 33 skipping to change at line 33
#include "StelFader.hpp" #include "StelFader.hpp"
#include "StelModule.hpp" #include "StelModule.hpp"
#include "StelObject.hpp" #include "StelObject.hpp"
#include "StelObjectType.hpp" #include "StelObjectType.hpp"
#include "VecMath.hpp" #include "VecMath.hpp"
#include <QVector> #include <QVector>
#include <QString> #include <QString>
class StelCore; class StelCore;
class StelFont;
class StelPainter; class StelPainter;
//! @class LabelMgr //! @class LabelMgr
//! Allows for creation of custom labels on objects or coordinates. //! Allows for creation of custom labels on objects or coordinates.
//! Because this class is intended for use in scripting (although //! Because this class is intended for use in scripting (although
//! other uses are also fine), all label types and so on are specified //! other uses are also fine), all label types and so on are specified
//! by QString descriptions. //! by QString descriptions.
//! TODO: when QT4.5 is out, change implementation to use QGraphicsTextItem . //! TODO: when QT4.5 is out, change implementation to use QGraphicsTextItem .
//! (QT4.5 should allow for opacity changes for fades, but it is not curren tly //! (QT4.5 should allow for opacity changes for fades, but it is not curren tly
//! implemented. //! implemented.
skipping to change at line 93 skipping to change at line 92
const QString& objectName, const QString& objectName,
bool visible=true, bool visible=true,
float fontSize=14, float fontSize=14,
const QString& fontColor="#999999", const QString& fontColor="#999999",
const QString& side="E", const QString& side="E",
double labelDistance=-1.0, double labelDistance=-1.0,
const QString& style="TextOnly"); const QString& style="TextOnly");
//! Create a label at fixed screen coordinates //! Create a label at fixed screen coordinates
//! @param text the text to display //! @param text the text to display
//! @param x the horizontal position on the screen, in pixels. //! @param x the horizontal position on the screen, in pixels, from
//! @param y the vertical position on the screen, in pixels. the left of the screen
//! @param y the vertical position on the screen, in pixels, from th
e top of the screen
//! @param visible if true, the label starts displayed, else it star ts hidden //! @param visible if true, the label starts displayed, else it star ts hidden
//! @param fontSize size of the font to use //! @param fontSize size of the font to use
//! @param fontColor HTML-like color spec, e.g. "#ffff00" for yellow //! @param fontColor HTML-like color spec, e.g. "#ffff00" for yellow
int labelScreen(const QString& text, int labelScreen(const QString& text,
int x, int x,
int y, int y,
bool visible=true, bool visible=true,
float fontSize=14, float fontSize=14,
const QString& fontColor="#999999"); const QString& fontColor="#999999");
//! find out if a label identified by id is presently shown //! find out if a label identified by id is presently shown
bool getLabelShow(int id); bool getLabelShow(int id);
//! set a label identified by id to be shown or not //! set a label identified by id to be shown or not
void setLabelShow(int id, bool show); void setLabelShow(int id, bool show);
//! set text of label identified by id to be newText
void setLabelText(int id, const QString& newText);
//! Delete a label by the ID which was returned from addLabel... //! Delete a label by the ID which was returned from addLabel...
//! @return true if the id existed and was deleted, else false //! @return true if the id existed and was deleted, else false
bool deleteLabel(int id); bool deleteLabel(int id);
//! Delete all labels. //! Delete all labels.
//! @return the number of labels deleted //! @return the number of labels deleted
int deleteAllLabels(void); int deleteAllLabels(void);
private: private:
QVector<class StelLabel*> allLabels; QVector<class StelLabel*> allLabels;
}; };
 End of changes. 3 change blocks. 
3 lines changed or deleted 6 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/