Документ взят из кэша поисковой машины. Адрес оригинального документа : http://astro.uni-altai.ru/~aw/stellarium/api/Ocular_8hpp_source.html
Дата изменения: Unknown
Дата индексирования: Fri Feb 28 07:29:54 2014
Кодировка:

Поисковые слова: п п п п п п п п п п п п п п п п п п п п п п п п п п
Stellarium: /home/aw/devel/stellarium/trunk/plugins/Oculars/src/Ocular.hpp Source File
Stellarium 0.12.3
Ocular.hpp
1 /*
2  * Copyright (C) 2009 Timothy Reaves
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU General Public License
6  * as published by the Free Software Foundation; either version 2
7  * of the License, or (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
17  */
18 
19 #ifndef OCULAR_HPP_
20 #define OCULAR_HPP_
21 
22 #include <QDebug>
23 #include <QObject>
24 #include <QString>
25 #include <QSettings>
26 
27 class Telescope;
28 class Lens;
29 
30 class Ocular : public QObject
31 {
32  Q_OBJECT
33  Q_PROPERTY(QString name READ name WRITE setName)
34  Q_PROPERTY(double appearentFOV READ appearentFOV WRITE setAppearentFOV)
35  Q_PROPERTY(double effectiveFocalLength READ effectiveFocalLength WRITE setEffectiveFocalLength)
36  Q_PROPERTY(double fieldStop READ fieldStop WRITE setFieldStop)
37  Q_PROPERTY(bool binoculars READ isBinoculars WRITE setBinoculars)
38 public:
39  Ocular();
40  Q_INVOKABLE Ocular(const QObject& other);
41  virtual ~Ocular();
42  static Ocular* ocularFromSettings(QSettings* theSettings, int ocularIndex);
43  static Ocular* ocularModel();
44 
45  const QString name() const;
46  void setName(QString aName);
47  double appearentFOV() const;
48  void setAppearentFOV(double fov);
49  double effectiveFocalLength() const;
50  void setEffectiveFocalLength(double fl);
51  double fieldStop() const;
52  void setFieldStop(double fs);
53  bool isBinoculars() const;
54  void setBinoculars(bool flag);
55 
56  double actualFOV(Telescope *telescope, Lens *lens) const;
57  double magnification(Telescope *telescope, Lens *lens) const;
58  QMap<int, QString> propertyMap();
59 
60 private:
61  QString m_name;
62  double m_appearentFOV;
63  double m_effectiveFocalLength;
64  double m_fieldStop;
65  bool m_binoculars;
66 };
67 
68 
69 #endif /* OCULAR_HPP_ */