~ubuntu-branches/ubuntu/precise/stellarium/precise

« back to all changes in this revision

Viewing changes to plugins/Oculars/src/Telescope.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Scott Howard
  • Date: 2010-02-15 20:48:39 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20100215204839-u3qgbv60rho997yk
Tags: 0.10.3-0ubuntu1
* New upstream release.
  - fixes intel rendering bug (LP: #480553)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
17
 */
 
18
 
 
19
#include "Telescope.hpp"
 
20
 
 
21
#include <QDebug>
 
22
#include <QSettings>
 
23
 
 
24
Telescope::Telescope(QSqlRecord record)
 
25
{
 
26
        telescopeID = record.value("id").toInt();
 
27
        name = record.value("name").toString();
 
28
        focalLength = record.value("focalLength").toDouble();
 
29
        diameter = record.value("diameter").toDouble();
 
30
        hFlipped = record.value("hFlip").toBool();
 
31
        vFlipped = record.value("vFlip").toBool();
 
32
}
 
33
 
 
34
Telescope::~Telescope()
 
35
{
 
36
}
 
37
 
 
38
/* ********************************************************************* */
 
39
#if 0
 
40
#pragma mark -
 
41
#pragma mark Accessors & Mutators
 
42
#endif
 
43
/* ********************************************************************* */
 
44
const QString Telescope::getName()
 
45
{
 
46
        return name;
 
47
}
 
48
 
 
49
double Telescope::getFocalLength()
 
50
{
 
51
        return focalLength;
 
52
}
 
53
 
 
54
int Telescope::getTelescopeID()
 
55
{
 
56
        return telescopeID;
 
57
}
 
58
 
 
59
double Telescope::getDiameter()
 
60
{
 
61
        return diameter;
 
62
}
 
63
 
 
64
bool Telescope::isHFlipped()
 
65
{
 
66
        return hFlipped;
 
67
}
 
68
 
 
69
bool Telescope::isVFlipped()
 
70
{
 
71
        return vFlipped;
 
72
}