StelObjectModule.hpp   StelObjectModule.hpp 
/* /*
* Stellarium * Stellarium
* Copyright (C) 2006 Fabien Chereau * Copyright (C) 2006 Fabien Chereau
* Copyright (C) 2016 Marcos Cardinot
* *
* 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 37 skipping to change at line 38
#include <QList> #include <QList>
#include <QString> #include <QString>
#include <QStringList> #include <QStringList>
//! @class StelObjectModule //! @class StelObjectModule
//! Specialization of StelModule which manages a collection of StelObject. //! Specialization of StelModule which manages a collection of StelObject.
//! Instances deriving from the StelObjectModule class can be managed by th e StelObjectMgr. //! Instances deriving from the StelObjectModule class can be managed by th e StelObjectMgr.
//! The class defines extra abstract functions for searching and listing St elObjects. //! The class defines extra abstract functions for searching and listing St elObjects.
class StelObjectModule : public StelModule class StelObjectModule : public StelModule
{ {
Q_OBJECT
public: public:
StelObjectModule(); StelObjectModule();
~StelObjectModule(); ~StelObjectModule();
//! Search for StelObject in an area around a specifid point. //! Search for StelObject in an area around a specifid point.
//! The function searches in a disk of diameter limitFov centered on v. //! The function searches in a disk of diameter limitFov centered on v.
//! Only visible objects (i.e curretly displayed on screen) should b e returned. //! Only visible objects (i.e curretly displayed on screen) should b e returned.
//! @param v equatorial position at epoch J2000. //! @param v equatorial position at epoch J2000.
//! @param limitFov angular diameter of the searching zone in degree . //! @param limitFov angular diameter of the searching zone in degree .
//! @param core the core instance to use. //! @param core the core instance to use.
skipping to change at line 59 skipping to change at line 61
//! Find a StelObject by name. //! Find a StelObject by name.
//! @param nameI18n The translated name for the current sky locale. //! @param nameI18n The translated name for the current sky locale.
//! @return The matching StelObject if exists or the empty StelObjec t if not found. //! @return The matching StelObject if exists or the empty StelObjec t if not found.
virtual StelObjectP searchByNameI18n(const QString& nameI18n) const = 0; virtual StelObjectP searchByNameI18n(const QString& nameI18n) const = 0;
//! Return the matching StelObject if exists or the empty StelObject if not found //! Return the matching StelObject if exists or the empty StelObject if not found
//! @param name the english object name //! @param name the english object name
virtual StelObjectP searchByName(const QString& name) const = 0; virtual StelObjectP searchByName(const QString& name) const = 0;
//! Find and return the list of at most maxNbItem objects auto-compl eting passed object I18 name //! Find and return the list of at most maxNbItem objects auto-compl eting passed object name
//! @param objPrefix the first letters of the searched object //! @param objPrefix the first letters of the searched 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 //! @param useStartOfWords decide if start of word is searched
mes //! @param inEnglish list translated names (false) or in English (tr
ue)
//! @return a list of matching object name by order of relevance, or an empty list if nothing matches //! @return a list of matching object name by order of relevance, or an empty list if nothing matches
virtual QStringList listMatchingObjectsI18n(const QString& objPrefix , int maxNbItem=5, bool useStartOfWords=false) const = 0; virtual QStringList listMatchingObjects(const QString& objPrefix, in t maxNbItem=5, bool useStartOfWords=false, bool inEnglish=false) const;
//! Find and return the list of at most maxNbItem objects auto-compl //! List all StelObjects.
eting passed object English name //! @param inEnglish list names in English (true) or translated (fal
//! @param objPrefix the first letters of the searched object se)
//! @param maxNbItem the maximum number of returned object names
//! @param useStartOfWords the autofill mode for returned objects na
mes
//! @return a list of matching object name by order of relevance, or an empty list if nothing matches //! @return a list of matching object name by order of relevance, or an empty list if nothing matches
virtual QStringList listMatchingObjects(const QString& objPrefix, in
t maxNbItem=5, bool useStartOfWords=false) const = 0;
virtual QStringList listAllObjects(bool inEnglish) const = 0; virtual QStringList listAllObjects(bool inEnglish) const = 0;
virtual QStringList listAllObjectsByType(const QString& objType, boo //! List all StelObjects by type.
l inEnglish) const = 0; //! @param objType object type
//! @param inEnglish list translated names (false) or in English (tr
ue)
//! @return a list of matching object name by order of relevance, or
an empty list if nothing matches
virtual QStringList listAllObjectsByType(const QString& objType, boo
l inEnglish) const;
virtual QString getName() const = 0; virtual QString getName() const = 0;
//! Auxiliary method of listMatchingObjects()
//! @param objName object name
//! @param objPrefix the first letters of the searched object
//! @param useStartOfWords decide if start of word is searched
//! @return true if it matches
bool matchObjectName(const QString& objName, const QString& objPrefi
x, bool useStartOfWords) const;
}; };
#endif // _STELOBJECTMODULE_HPP_ #endif // _STELOBJECTMODULE_HPP_
 End of changes. 9 change blocks. 
15 lines changed or deleted 26 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/