LabelMgr.hpp   LabelMgr.hpp 
/* /*
* Stellarium * Stellarium
* This file Copyright (C) 2008 Matthew Gates * This file Copyright (C) 2008 Matthew Gates
* Horizon system labels (c) 2015 Georg Zotti
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
skipping to change at line 40 skipping to change at line 41
#include <QString> #include <QString>
class StelCore; class StelCore;
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.
//! The labels are painted very late, i.e. also sky object labels will be w ritten over the landscape.
//! 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.
class LabelMgr : public StelModule class LabelMgr : public StelModule
{ {
Q_OBJECT Q_OBJECT
public: public:
//! Construct a LabelMgr object. //! Construct a LabelMgr object.
LabelMgr(); LabelMgr();
skipping to change at line 90 skipping to change at line 92
//! returns -1 if the label could not be created (e.g. object not fo und) //! returns -1 if the label could not be created (e.g. object not fo und)
int labelObject(const QString& text, int labelObject(const QString& text,
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 in azimuthal coordinate system. Can be used e.g.
to show landscape features
//! @param text the text to display
//! @param az azimuth, degrees
//! @param alt altitude, degrees
//! @param visible if true, the label starts displayed, else it star
ts hidden
//! @param fontSize size of the font to use
//! @param fontColor HTML-like color spec, e.g. "#ffff00" for yellow
int labelHorizon(const QString& text,
float az,
float alt,
bool visible=true,
float fontSize=14,
const QString& fontColor="#999999");
//! 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, from the left of the screen //! @param x the horizontal position on the screen, in pixels, from the left of the screen
//! @param y the vertical position on the screen, in pixels, from th e top 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,
 End of changes. 3 change blocks. 
0 lines changed or deleted 18 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/