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

Поисковые слова: arp 220
Stellarium: /home/aw/devel/stellarium/trunk/plugins/Oculars/src/Telescope.hpp Source File
Stellarium 0.12.3
Telescope.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 TELESCOPE_HPP_
20 #define TELESCOPE_HPP_
21 
22 #include <QObject>
23 #include <QString>
24 #include <QSettings>
25 
26 class Telescope : public QObject
27 {
28  Q_OBJECT
29  Q_PROPERTY(QString name READ name WRITE setName)
30  Q_PROPERTY(double diameter READ diameter WRITE setDiameter)
31  Q_PROPERTY(double focalLength READ focalLength WRITE setFocalLength)
32  Q_PROPERTY(bool hFlipped READ isHFlipped WRITE setHFlipped)
33  Q_PROPERTY(bool vFlipped READ isVFlipped WRITE setVFlipped)
34 public:
35  Telescope();
36  Q_INVOKABLE Telescope(const QObject& other);
37  virtual ~Telescope();
38  static Telescope* telescopeFromSettings(QSettings* theSettings, int telescopeIndex);
39  static Telescope* telescopeModel();
40 
41  double diameter() const;
42  void setDiameter(double theValue);
43  double focalLength() const;
44  void setFocalLength(double theValue);
45  const QString name() const;
46  void setName(QString theValue);
47  bool isHFlipped() const;
48  void setHFlipped(bool flipped);
49  bool isVFlipped() const;
50  void setVFlipped(bool flipped);
51  QMap<int, QString> propertyMap();
52 private:
53  QString m_name;
54  double m_diameter;
55  double m_focalLength;
56  bool m_hFlipped;
57  bool m_vFlipped;
58 };
59 
60 #endif /*TELESCOPE_HPP_*/