3
* Copyright (C) 2007 Fabien Chereau
5
* This program is free software; you can redistribute it and/or
6
* modify it under the terms of the GNU General Public License
7
* as published by the Free Software Foundation; either version 2
8
* of the License, or (at your option) any later version.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20
#ifndef _QTSCRIPTMGR_HPP_
21
#define _QTSCRIPTMGR_HPP_
28
//! Provide script API for Stellarium global functions
29
class StelMainScriptAPI : public QObject
32
Q_PROPERTY(double JDay READ getJDay WRITE setJDay)
33
Q_PROPERTY(double timeSpeed READ getTimeSpeed WRITE setTimeSpeed)
36
StelMainScriptAPI(QObject *parent = 0);
39
// Theses functions will be available in scripts
41
//! Set the current date in Julian Day
42
//! @param JD the Julian Date
43
void setJDay(double JD);
44
//! Get the current date in Julian Day
45
//! @return the Julian Date
46
double getJDay(void) const;
48
//! Set time speed in JDay/sec
49
//! @param ts time speed in JDay/sec
50
void setTimeSpeed(double ts);
51
//! Get time speed in JDay/sec
52
//! @return time speed in JDay/sec
53
double getTimeSpeed(void) const;
56
//! Manage scripting in Stellarium
57
class QtScriptMgr : public QObject
62
QtScriptMgr(QObject *parent = 0);
71
#endif // _QTSCRIPTMGR_HPP_