ConstellationMgr.hpp   ConstellationMgr.hpp 
skipping to change at line 94 skipping to change at line 94
WRITE setLabelsColor WRITE setLabelsColor
NOTIFY namesColorChanged) NOTIFY namesColorChanged)
Q_PROPERTY(bool namesDisplayed Q_PROPERTY(bool namesDisplayed
READ getFlagLabels READ getFlagLabels
WRITE setFlagLabels WRITE setFlagLabels
NOTIFY namesDisplayedChanged) NOTIFY namesDisplayedChanged)
Q_PROPERTY(ConstellationDisplayStyle constellationDisplayStyle Q_PROPERTY(ConstellationDisplayStyle constellationDisplayStyle
READ getConstellationDisplayStyle READ getConstellationDisplayStyle
WRITE setConstellationDisplayStyle WRITE setConstellationDisplayStyle
NOTIFY constellationsDisplayStyleChanged) NOTIFY constellationsDisplayStyleChanged)
Q_PROPERTY(float constellationLineThickness
READ getConstellationLineThickness
WRITE setConstellationLineThickness
NOTIFY constellationLineThicknessChanged)
//Register enum with Qt
Q_ENUMS(ConstellationDisplayStyle)
public: public:
//! Constructor //! Constructor
ConstellationMgr(StarMgr *stars); ConstellationMgr(StarMgr *stars);
//! Destructor //! Destructor
virtual ~ConstellationMgr(); virtual ~ConstellationMgr();
//////////////////////////////////////////////////////////////////// /////// //////////////////////////////////////////////////////////////////// ///////
// Methods defined in the StelModule class // Methods defined in the StelModule class
//! Initialize the ConstellationMgr. //! Initialize the ConstellationMgr.
skipping to change at line 133 skipping to change at line 140
//! Return the matching constellation object's pointer if exists or NULL //! Return the matching constellation object's pointer if exists or NULL
//! @param nameI18n The case in-sensistive constellation name //! @param nameI18n The case in-sensistive constellation name
virtual StelObjectP searchByNameI18n(const QString& nameI18n) const; virtual StelObjectP searchByNameI18n(const QString& nameI18n) const;
//! Return the matching constellation if exists or NULL //! Return the matching constellation if exists or NULL
//! @param name The case in-sensitive standard program name (three l etter abbreviation) //! @param name The case in-sensitive standard program name (three l etter abbreviation)
virtual StelObjectP searchByName(const QString& name) const; virtual StelObjectP searchByName(const QString& name) const;
// GZ: I see dubious descriptions and non-fitting var names: objPref ix should just be "string" or "obj", // GZ: I see dubious descriptions and non-fitting var names: objPref ix should just be "string" or "obj",
// and useStartOfWord likely should be described as "decide if start of word is searched" (2x) // and useStartOfWord likely should be described as "decide if start of word is searched" (2x)
//! Find and return the list of at most maxNbItem objects auto-compl eting the passed object I18n name. //! Find and return the list of at most maxNbItem objects auto-compl eting the passed object name.
//! @param objPrefix the case insensitive first letters of the searc hed object //! @param objPrefix the case insensitive first letters of the searc hed object
//! @param maxNbItem the maximum number of returned object names //! @param maxNbItem the maximum number of returned object names
//! @param useStartOfWords the autofill mode for returned objects na mes //! @param useStartOfWords the autofill mode for returned objects na mes
//! @return a vector of matching object name by order of relevance, or an empty vector if nothing matches //! @return a vector of matching object name by order of relevance, or an empty vector if nothing matches
virtual QStringList listMatchingObjectsI18n(const QString& objPrefix virtual QStringList listMatchingObjects(const QString& objPrefix, in
, int maxNbItem=5, bool useStartOfWords=false) const; t maxNbItem=5, bool useStartOfWords=false, bool inEnglish=false) const;
//! Find and return the list of at most maxNbItem objects auto-compl
eting the passed object English name.
//! @param objPrefix the case insensitive first letters of the searc
hed object
//! @param maxNbItem the maximum number of returned object names
//! @param useStartOfWords the autofill mode for returned objects na
mes
//! @return a vector of matching object name by order of relevance,
or an empty vector if nothing matches
virtual QStringList listMatchingObjects(const QString& objPrefix, in
t maxNbItem=5, bool useStartOfWords=false) const;
virtual QStringList listAllObjects(bool inEnglish) const; virtual QStringList listAllObjects(bool inEnglish) const;
virtual QStringList listAllObjectsByType(const QString& objType, boo l inEnglish) const { Q_UNUSED(objType) Q_UNUSED(inEnglish) return QStringLi st(); }
virtual QString getName() const { return "Constellations"; } virtual QString getName() const { return "Constellations"; }
//! Describes how to display constellation labels. The viewDialog GU I has a combobox which corresponds to these values. //! Describes how to display constellation labels. The viewDialog GU I has a combobox which corresponds to these values.
enum ConstellationDisplayStyle enum ConstellationDisplayStyle
{ {
constellationsAbbreviated = 0, constellationsAbbreviated = 0,
constellationsNative = 1, constellationsNative = 1,
constellationsTranslated = 2, constellationsTranslated = 2,
constellationsEnglish = 3 // Maybe this is not useful? constellationsEnglish = 3 // Maybe this is not useful?
}; };
skipping to change at line 171 skipping to change at line 171
void setFlagArt(const bool displayed); void setFlagArt(const bool displayed);
//! Get whether constellation art is displayed //! Get whether constellation art is displayed
bool getFlagArt(void) const; bool getFlagArt(void) const;
//! Set constellation art fade duration in second //! Set constellation art fade duration in second
void setArtFadeDuration(const float duration); void setArtFadeDuration(const float duration);
//! Get constellation art fade duration in second //! Get constellation art fade duration in second
float getArtFadeDuration() const; float getArtFadeDuration() const;
//! Set constellation maximum art intensity (between 0 and 1) //! Set constellation maximum art intensity (between 0 and 1)
void setArtIntensity(const double intensity); //! Note that the art intensity is linearly faded out if the FOV is
//! Set constellation maximum art intensity (between 0 and 1) in a specific interval,
double getArtIntensity() const; //! which can be adjusted using setArtIntensityMinimumFov() and setA
rtIntensityMaximumFov()
void setArtIntensity(const float intensity);
//! Return constellation maximum art intensity (between 0 and 1)
//! Note that the art intensity is linearly faded out if the FOV is
in a specific interval,
//! which can be adjusted using setArtIntensityMinimumFov() and setA
rtIntensityMaximumFov()
float getArtIntensity() const;
//! Sets the lower bound on the FOV at which the art intensity fades
to zero.
//! See LP:#1294483. The default is 1.0.
void setArtIntensityMinimumFov(const double fov);
//! Returns the lower bound on the FOV at which the art intensity fa
des to zero.
//! See LP:#1294483. The default is 1.0.
double getArtIntensityMinimumFov() const;
//! Sets the upper bound on the FOV at which the art intensity becom
es the maximum
//! set by setArtIntensity()
//! See LP:#1294483. The default is 2.0.
void setArtIntensityMaximumFov(const double fov);
//! Returns the upper bound on the FOV at which the art intensity be
comes the maximum
//! set by setArtIntensity()
//! See LP:#1294483. The default is 2.0.
double getArtIntensityMaximumFov() const;
//! Define boundary color //! Define boundary color
//! @param color The color of boundaries //! @param color The color of boundaries
//! @code //! @code
//! // example of usage in scripts //! // example of usage in scripts
//! ConstellationMgr.setBoundariesColor(Vec3f(1.0,0.0,0.0)); //! ConstellationMgr.setBoundariesColor(Vec3f(1.0,0.0,0.0));
//! @endcode //! @endcode
void setBoundariesColor(const Vec3f& color); void setBoundariesColor(const Vec3f& color);
//! Get current boundary color //! Get current boundary color
Vec3f getBoundariesColor() const; Vec3f getBoundariesColor() const;
skipping to change at line 235 skipping to change at line 255
//! Set whether constellation names will be displayed //! Set whether constellation names will be displayed
void setFlagLabels(const bool displayed); void setFlagLabels(const bool displayed);
//! Set whether constellation names are displayed //! Set whether constellation names are displayed
bool getFlagLabels(void) const; bool getFlagLabels(void) const;
//! Set the font size used for constellation names display //! Set the font size used for constellation names display
void setFontSize(const float newFontSize); void setFontSize(const float newFontSize);
//! Get the font size used for constellation names display //! Get the font size used for constellation names display
float getFontSize() const; float getFontSize() const;
//! Set the way how contellation names are displayed: abbbreviated/a //! Set the way how constellation names are displayed: abbbreviated/
s-given/translated as-given/translated
//! @param style acceptable values 0=abbreviated, 1=untranslated, 2= //! @param style the new display style
translated. void setConstellationDisplayStyle(ConstellationMgr::ConstellationDis
//! @note Will be cast to enum'ed value, but usually receives value playStyle style);
from a QComboBox in the GUI. //! get the way how constellation names are displayed: abbbreviated/
void setConstellationDisplayStyle(int style); as-given/translated
//! get the way how contellation names are displayed: abbbreviated/a ConstellationMgr::ConstellationDisplayStyle getConstellationDisplayS
s-given/translated tyle();
ConstellationDisplayStyle getConstellationDisplayStyle(); //! Returns the currently set constellation display style as string,
QString getConstellationDisplayStyleString(); instead of enum
//! @see getConstellationDisplayStyle()
static QString getConstellationDisplayStyleString(ConstellationMgr::
ConstellationDisplayStyle style);
//! Set the thickness of lines of the constellations //! Set the thickness of lines of the constellations
//! @param thickness of line in pixels //! @param thickness of line in pixels
void setConstellationLineThickness(const double thickness); void setConstellationLineThickness(const float thickness);
//! Get the thickness of lines of the constellations //! Get the thickness of lines of the constellations
double getConstellationLineThickness() const { return constellationL ineThickness; } float getConstellationLineThickness() const { return constellationLi neThickness; }
signals: signals:
void artDisplayedChanged(const bool displayed) const; void artDisplayedChanged(const bool displayed) const;
void artFadeDurationChanged(const float duration) const; void artFadeDurationChanged(const float duration) const;
void artIntensityChanged(const double intensity) const; void artIntensityChanged(const double intensity) const;
void boundariesColorChanged(const Vec3f & color) const; void boundariesColorChanged(const Vec3f & color) const;
void boundariesDisplayedChanged(const bool displayed) const; void boundariesDisplayedChanged(const bool displayed) const;
void fontSizeChanged(const float newSize) const; void fontSizeChanged(const float newSize) const;
void isolateSelectedChanged(const bool isolate) const; void isolateSelectedChanged(const bool isolate) const;
void linesColorChanged(const Vec3f & color) const; void linesColorChanged(const Vec3f & color) const;
void linesDisplayedChanged(const bool displayed) const; void linesDisplayedChanged(const bool displayed) const;
void namesColorChanged(const Vec3f & color) const; void namesColorChanged(const Vec3f & color) const;
void namesDisplayedChanged(const bool displayed) const; void namesDisplayedChanged(const bool displayed) const;
void constellationsDisplayStyleChanged(const ConstellationDisplaySty void constellationsDisplayStyleChanged(const ConstellationMgr::Const
le style) const; ellationDisplayStyle style) const;
void constellationLineThicknessChanged(float thickness) const;
private slots: private slots:
//! Limit the number of constellations to draw based on selected sta rs. //! Limit the number of constellations to draw based on selected sta rs.
//! The selected objects changed, check if some stars are selected a nd display the //! The selected objects changed, check if some stars are selected a nd display the
//! matching constellations if isolateSelected mode is activated. //! matching constellations if isolateSelected mode is activated.
//! @param action define whether to add to, replace, or remove from the existing selection //! @param action define whether to add to, replace, or remove from the existing selection
void selectedObjectChange(StelModule::StelModuleSelectAction action) ; void selectedObjectChange(StelModule::StelModuleSelectAction action) ;
//! Load a color scheme
void setStelStyle(const QString& section);
//! Loads new constellation data and art if the SkyCulture has chang ed. //! Loads new constellation data and art if the SkyCulture has chang ed.
//! @param skyCultureDir the name of the directory containing the sk y culture to use. //! @param skyCultureDir the name of the directory containing the sk y culture to use.
void updateSkyCulture(const QString& skyCultureDir); void updateSkyCulture(const QString& skyCultureDir);
//! Update i18n names from English names according to current //! Update i18n names from English names according to current
//! locale, and update font for locale. //! locale, and update font for locale.
//! The translation is done using gettext with translated strings de fined //! The translation is done using gettext with translated strings de fined
//! in translations.h //! in translations.h
void updateI18n(); void updateI18n();
skipping to change at line 351 skipping to change at line 370
void deselectConstellations(void); void deselectConstellations(void);
std::vector<Constellation*> selected; // More than one can be select ed at a time std::vector<Constellation*> selected; // More than one can be select ed at a time
Constellation* isStarIn(const StelObject *s) const; Constellation* isStarIn(const StelObject *s) const;
Constellation* findFromAbbreviation(const QString& abbreviation) con st; Constellation* findFromAbbreviation(const QString& abbreviation) con st;
std::vector<Constellation*> asterisms; std::vector<Constellation*> asterisms;
QFont asterFont; QFont asterFont;
StarMgr* hipStarMgr; StarMgr* hipStarMgr;
bool isolateSelected; bool isolateSelected; // true to pick individual constellations.
bool constellationPickEnabled; bool constellationPickEnabled;
std::vector<std::vector<Vec3f> *> allBoundarySegments; std::vector<std::vector<Vec3f> *> allBoundarySegments;
QString lastLoadedSkyCulture; // Store the last loaded sky culture directory name QString lastLoadedSkyCulture; // Store the last loaded sky culture directory name
//! this controls how constellations (and also star names) are print ed: Abbreviated/as-given/translated //! this controls how constellations (and also star names) are print ed: Abbreviated/as-given/translated
ConstellationDisplayStyle constellationDisplayStyle; ConstellationDisplayStyle constellationDisplayStyle;
// These are THE master settings - individual constellation settings can vary based on selection status // These are THE master settings - individual constellation settings can vary based on selection status
float artFadeDuration; float artFadeDuration;
float artIntensity; float artIntensity;
double artIntensityMinimumFov;
double artIntensityMaximumFov;
bool artDisplayed; bool artDisplayed;
bool boundariesDisplayed; bool boundariesDisplayed;
bool linesDisplayed; bool linesDisplayed;
bool namesDisplayed; bool namesDisplayed;
// Store the thickness of lines of the constellations // Store the thickness of lines of the constellations
float constellationLineThickness; float constellationLineThickness;
}; };
#endif // _CONSTELLATIONMGR_HPP_ #endif // _CONSTELLATIONMGR_HPP_
 End of changes. 12 change blocks. 
37 lines changed or deleted 63 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/