ConstellationMgr.hpp   ConstellationMgr.hpp 
skipping to change at line 90 skipping to change at line 90
WRITE setFlagLines WRITE setFlagLines
NOTIFY linesDisplayedChanged) NOTIFY linesDisplayedChanged)
Q_PROPERTY(Vec3f namesColor Q_PROPERTY(Vec3f namesColor
READ getLabelsColor READ getLabelsColor
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
READ getConstellationDisplayStyle
WRITE setConstellationDisplayStyle
NOTIFY constellationsDisplayStyleChanged)
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 124 skipping to change at line 128
//////////////////////////////////////////////////////////////////// /////// //////////////////////////////////////////////////////////////////// ///////
// Methods defined in StelObjectManager class // Methods defined in StelObjectManager class
virtual QList<StelObjectP> searchAround(const Vec3d& v, double limit Fov, const StelCore* core) const; virtual QList<StelObjectP> searchAround(const Vec3d& v, double limit Fov, const StelCore* core) const;
//! 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-sensistive standard program name (three letter 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",
// 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 I18n 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 match //! @return a vector of matching object name by order of relevance, or an empty vector if nothing matches
virtual QStringList listMatchingObjectsI18n(const QString& objPrefix , int maxNbItem=5, bool useStartOfWords=false) const; virtual QStringList listMatchingObjectsI18n(const QString& objPrefix , int maxNbItem=5, bool useStartOfWords=false) const;
//! Find and return the list of at most maxNbItem objects auto-compl eting the passed object English name. //! 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 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 match //! @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 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 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.
enum ConstellationDisplayStyle
{
constellationsAbbreviated = 0,
constellationsNative = 1,
constellationsTranslated = 2,
constellationsEnglish = 3 // Maybe this is not useful?
};
//////////////////////////////////////////////////////////////////// /////// //////////////////////////////////////////////////////////////////// ///////
// Properties setters and getters // Properties setters and getters
public slots: public slots:
//! Set whether constellation art will be displayed //! Set whether constellation art will be displayed
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
skipping to change at line 181 skipping to change at line 195
//! Set whether constellation boundaries lines will be displayed //! Set whether constellation boundaries lines will be displayed
void setFlagBoundaries(const bool displayed); void setFlagBoundaries(const bool displayed);
//! Get whether constellation boundaries lines are displayed //! Get whether constellation boundaries lines are displayed
bool getFlagBoundaries(void) const; bool getFlagBoundaries(void) const;
//! Set whether selected constellation must be displayed alone //! Set whether selected constellation must be displayed alone
void setFlagIsolateSelected(const bool isolate); void setFlagIsolateSelected(const bool isolate);
//! Get whether selected constellation is displayed alone //! Get whether selected constellation is displayed alone
bool getFlagIsolateSelected(void) const; bool getFlagIsolateSelected(void) const;
//! Set whether only one selected constellation must be displayed
void setFlagConstellationPick(const bool mode);
//! Get whether only one selected constellation is displayed
bool getFlagConstellationPick(void) const;
//! Define line color //! Define line color
//! @param color The color of lines //! @param color The color of lines
//! @code //! @code
//! // example of usage in scripts //! // example of usage in scripts
//! ConstellationMgr.setLinesColor(Vec3f(1.0,0.0,0.0)); //! ConstellationMgr.setLinesColor(Vec3f(1.0,0.0,0.0));
//! @endcode //! @endcode
void setLinesColor(const Vec3f& color); void setLinesColor(const Vec3f& color);
//! Get line color //! Get line color
Vec3f getLinesColor() const; Vec3f getLinesColor() const;
//! Set whether constellation path lines will be displayed //! Set whether constellation lines will be displayed
void setFlagLines(const bool displayed); void setFlagLines(const bool displayed);
//! Get whether constellation path lines are displayed //! Get whether constellation lines are displayed
bool getFlagLines(void) const; bool getFlagLines(void) const;
//! Set label color for names //! Set label color for names
//! @param color The color of labels //! @param color The color of labels
//! @code //! @code
//! // example of usage in scripts //! // example of usage in scripts
//! ConstellationMgr.setLabelsColor(Vec3f(1.0,0.0,0.0)); //! ConstellationMgr.setLabelsColor(Vec3f(1.0,0.0,0.0));
//! @endcode //! @endcode
void setLabelsColor(const Vec3f& color); void setLabelsColor(const Vec3f& color);
//! Get label color for names //! Get label color for names
Vec3f getLabelsColor() const; Vec3f getLabelsColor() const;
//! Set whether constellation names will be displayed //! Set whether constellation names will be displayed
void setFlagLabels(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
s-given/translated
//! @param style acceptable values 0=abbreviated, 1=untranslated, 2=
translated.
//! @note Will be cast to enum'ed value, but usually receives value
from a QComboBox in the GUI.
void setConstellationDisplayStyle(int style);
//! get the way how contellation names are displayed: abbbreviated/a
s-given/translated
ConstellationDisplayStyle getConstellationDisplayStyle();
QString getConstellationDisplayStyleString();
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 le style) 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 //! Load a color scheme
void setStelStyle(const QString& section); void setStelStyle(const QString& section);
skipping to change at line 251 skipping to change at line 279
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();
private: private:
//! Read constellation names from the given file. //! Read constellation names from the given file.
//! @param namesFile Name of the file containing the constellation n //! @param namesFile Name of the file containing the constellation n
ames in english ames
//! in a format consisting of abbreviation, native name and t
ranslatable english name.
//! @note The abbreviation must occur in the lines file loaded first
in @name loadLinesAndArt()!
void loadNames(const QString& namesFile); void loadNames(const QString& namesFile);
//! Load constellation line shapes, art textures and boundaries shap es from data files. //! Load constellation line shapes, art textures and boundaries shap es from data files.
//! @param fileName The name of the constellation data file //! @param fileName The name of the constellation data file
//! @param artFileName The name of the constellation art data file //! @param artFileName The name of the constellation art data file
//! @param cultureName A string ID of the current skyculture //! @param cultureName A string ID of the current skyculture
//! @note The abbreviation used in @param filename is required for c ross-identifying translatable names in @name loadNames():
void loadLinesAndArt(const QString& fileName, const QString& artfile Name, const QString& cultureName); void loadLinesAndArt(const QString& fileName, const QString& artfile Name, const QString& cultureName);
//! Load the constellation boundary file. //! Load the constellation boundary file.
//! This function deletes any currently loaded constellation boundar ies //! This function deletes any currently loaded constellation boundar ies
//! and loads a new set from the file passed as the parameter. The boundary //! and loads a new set from the file passed as the parameter. The boundary
//! data file consists of whitespace separated values (space, tab or newline). //! data file consists of whitespace separated values (space, tab or newline).
//! Each boundary may span multiple lines, and consists of the follo wing ordered //! Each boundary may span multiple lines, and consists of the follo wing ordered
//! data items: //! data items:
//! - The number of vertexes which make up in the boundary (integer ). //! - The number of vertices which make up in the boundary (integer ).
//! - For each vertex, two floating point numbers describing the ra and dec //! - For each vertex, two floating point numbers describing the ra and dec
//! of the vertex. //! of the vertex.
//! - The number of constellations which this boundary separates (a lways 2). //! - The number of constellations which this boundary separates (a lways 2).
//! - Two constellation abbreviations representing the constellatio ns which //! - Two constellation abbreviations representing the constellatio ns which
//! the boundary separates. //! the boundary separates.
//! @param conCatFile the path to the file which contains the conste llation boundary data. //! @param conCatFile the path to the file which contains the conste llation boundary data.
bool loadBoundaries(const QString& conCatFile); bool loadBoundaries(const QString& conCatFile);
//! Read seasonal rules for displaying constellations from the given file. //! Read seasonal rules for displaying constellations from the given file.
//! @param rulesFile Name of the file containing the seasonal rules //! @param rulesFile Name of the file containing the seasonal rules
void loadSeasonalRules(const QString& rulesFile); void loadSeasonalRules(const QString& rulesFile);
//! Draw the constellation lines at the epoch given by the StelCore . //! Draw the constellation lines at the epoch given by the StelCore.
void drawLines(StelPainter& sPainter, const StelCore* core) const; void drawLines(StelPainter& sPainter, const StelCore* core) const;
//! Draw the constellation art. //! Draw the constellation art.
void drawArt(StelPainter& sPainter) const; void drawArt(StelPainter& sPainter) const;
//! Draw the constellation name labels. //! Draw the constellation name labels.
void drawNames(StelPainter& sPainter) const; void drawNames(StelPainter& sPainter) const;
//! Draw the constellation boundaries. //! Draw the constellation boundaries.
void drawBoundaries(StelPainter& sPainter) const; void drawBoundaries(StelPainter& sPainter) const;
//! Handle single and multi-constellation selections. //! Handle single and multi-constellation selections.
void setSelectedConst(Constellation* c); void setSelectedConst(Constellation* c);
//! Handle unselecting a single constellation. //! Handle unselecting a single constellation.
skipping to change at line 315 skipping to change at line 346
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;
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
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;
bool artDisplayed; bool artDisplayed;
bool boundariesDisplayed; bool boundariesDisplayed;
bool linesDisplayed; bool linesDisplayed;
bool namesDisplayed; bool namesDisplayed;
}; };
#endif // _CONSTELLATIONMGR_HPP_ #endif // _CONSTELLATIONMGR_HPP_
 End of changes. 18 change blocks. 
10 lines changed or deleted 55 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/