NavStars.hpp   NavStars.hpp 
/* /*
* Navigational Stars plug-in * Navigational Stars plug-in
* Copyright (C) 2014 Alexander Wolf * Copyright (C) 2014-2016 Alexander Wolf
* *
* 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 33 skipping to change at line 33
#include "StelFader.hpp" #include "StelFader.hpp"
#include "StelModule.hpp" #include "StelModule.hpp"
#include "StelObject.hpp" // For StelObjectP #include "StelObject.hpp" // For StelObjectP
#include "StelTexture.hpp" #include "StelTexture.hpp"
#include <QSettings> #include <QSettings>
class StelButton; class StelButton;
class StelPainter; class StelPainter;
class StarMgr; class StarMgr;
class NavStarsWindow;
/*! @defgroup navigationalStars Navigational Stars Plug-in /*! @defgroup navigationalStars Navigational Stars Plug-in
@{ @{
The Navigational Stars plugin marks the 58 navigational stars of the The Navigational Stars plugin marks the 58 navigational stars of the
Nautical Almanach and the 2102-D Rude Star Finder on the sky. Nautical Almanach and the 2102-D Rude Star Finder on the sky.
The NavStars class is the main class of the plug-in. It manages the list of The NavStars class is the main class of the plug-in. It manages the list of
navigational stars and manipulate show/hide markers of them. All markers navigational stars and manipulate show/hide markers of them. All markers
are not objects! are not objects!
skipping to change at line 60 skipping to change at line 61
@} @}
*/ */
//! @class NavStars //! @class NavStars
//! Main class of the %Navigational Stars plugin. //! Main class of the %Navigational Stars plugin.
//! @author Alexander Wolf //! @author Alexander Wolf
//! @ingroup navigationalStars //! @ingroup navigationalStars
class NavStars : public StelModule class NavStars : public StelModule
{ {
Q_OBJECT Q_OBJECT
Q_ENUMS(NavigationalStarsSet)
Q_PROPERTY(bool navStarsVisible Q_PROPERTY(bool navStarsVisible
READ getNavStarsMarks READ getNavStarsMarks
WRITE setNavStarsMarks WRITE setNavStarsMarks
NOTIFY navStarsMarksChanged) NOTIFY navStarsMarksChanged)
public: public:
//! @enum NavigationalStarsSet
//! Available sets of navigational stars
enum NavigationalStarsSet
{
AngloAmerican, //!< Anglo-American set (The Nautical Almana
ch)
French, //!< French set (Ephémérides Nautiques)
Russian //!< Russian set (Морской астрономический еж
егодник)
};
NavStars(); NavStars();
virtual ~NavStars(); virtual ~NavStars();
//////////////////////////////////////////////////////////////////// /////// //////////////////////////////////////////////////////////////////// ///////
// Methods defined in the StelModule class // Methods defined in the StelModule class
virtual void init(); virtual void init();
virtual void deinit(); virtual void deinit();
virtual void update(double deltaTime); virtual void update(double deltaTime);
virtual void draw(StelCore* core); virtual void draw(StelCore* core);
virtual double getCallOrder(StelModuleActionName actionName) const; virtual double getCallOrder(StelModuleActionName actionName) const;
virtual bool configureGui(bool show);
//! Set up the plugin with default values. This means clearing out
the NavigationalStars section in the
//! main config.ini (if one already exists), and populating it with
default values.
void restoreDefaultConfiguration(void);
//! Read (or re-read) settings from the main config file. This will
be called from init and also
//! when restoring defaults (i.e. from the configuration dialog / re
store defaults button).
void loadConfiguration(void);
//! Save the settings to the main configuration file.
void saveConfiguration(void);
void populateNavigationalStarsSet(void);
public slots: public slots:
//! Set flag of displaying markers of the navigational stars //! Set flag of displaying markers of the navigational stars
//! Emits navStarsMarksChanged() if the value changes. //! Emits navStarsMarksChanged() if the value changes.
void setNavStarsMarks(const bool b); void setNavStarsMarks(const bool b);
//! Get flag of displaying markers of the navigational stars //! Get flag of displaying markers of the navigational stars
bool getNavStarsMarks(void) const; bool getNavStarsMarks(void) const;
//! Set the set of navigational stars
void setCurrentNavigationalStarsSet(NavigationalStarsSet nsset)
{
currentNSSet = nsset;
}
//! Get the set of navigational stars
NavigationalStarsSet getCurrentNavigationalStarsSet() const
{
return currentNSSet;
}
//! Get the key of current set of navigational stars
QString getCurrentNavigationalStarsSetKey(void) const;
QString getCurrentNavigationalStarsSetDescription(void) const;
//! Set the set of navigational stars from its key
void setCurrentNavigationalStarsSetKey(QString key);
signals: signals:
//! Emitted when display of markers have been changed. //! Emitted when display of markers have been changed.
void navStarsMarksChanged(bool b); void navStarsMarksChanged(bool b);
private slots: private slots:
//! Called setNavStarsMarks() if the value changes. //! Called setNavStarsMarks() if the value changes.
void starNamesChanged(const bool b); void starNamesChanged(const bool b);
private: private:
NavStarsWindow* mainWindow;
StarMgr* smgr; StarMgr* smgr;
QSettings* conf; QSettings* conf;
// The current set of navigational stars
NavigationalStarsSet currentNSSet;
//! List of the navigational stars' HIP numbers. //! List of the navigational stars' HIP numbers.
QList<int> starNumbers; QList<int> starNumbers;
//! List of pointers to the objects representing the stars. //! List of pointers to the objects representing the stars.
QVector<StelObjectP> stars; QVector<StelObjectP> stars;
StelTextureSP markerTexture; StelTextureSP markerTexture;
//! Color used to paint each star's marker and additional label. //! Color used to paint each star's marker and additional label.
Vec3f markerColor; Vec3f markerColor;
LinearFader markerFader; LinearFader markerFader;
 End of changes. 8 change blocks. 
1 lines changed or deleted 52 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/