Script - StelUtils, StelFileMgr, Math, QString

Asked by Jiri Prchlik

I am a teacher and I use stellarium with scripts for kids.

1.
There are links on StelUtils and StelFileMgr in documentation:
http://www.stellarium.org/doc/head/classStelMainScriptAPI.html#a66ce7ef6ee92961e42d558ea10f77ce6
But these libraries do not work in Script.
I guess they are not supported, do you plan that?

2.
I cannot find description of Math and QString libraries.
I know only a few methods from Math and substring from QString.
Is there some description on the internet?
And are there other libraries in use?

Thanks a lot for your answer
(I can speak Czech)
Jiri Prchlik

Question information

Language:
English Edit question
Status:
Solved
For:
Stellarium Edit question
Assignee:
No assignee Edit question
Solved by:
Jiri Prchlik
Solved:
Last query:
Last reply:
Revision history for this message
Alexander Wolf (alexwolf) said :
#1

1. In documentation for scripting on your link you can see that some variables should use in fixed format, e.g. for RA you should use string like "12d 14m 8s" for accepted by StelUtils::getDecAngle().

2. Description for QString you can found on the http://qt-project.org website. Description for Math you can found in cmath library (math library for C++).

Revision history for this message
Jiri Prchlik (prchlikji) said :
#2

1.
That is pitty that setObserverLocation methods does not support it.

2.
I know about
http://qt-project.org/doc/qt-5.0/qtcore/qstring.html
but there is not described "substring" there and a lot of methods does not work.

Revision history for this message
Bogdan Marinov (daggerstab) said :
#3

QString is a C++ class from the Qt libraries. It can't be used in scripts.

Stellarium's scripting is based on ECMAScript, which is very similar to JavaScript. What you need is ECMAScript documentation.

For example, this overview:
http://qt-project.org/doc/qt-4.8/ecmascript.html

Or if you need more details:
http://www.ecmascript.org/
http://www.ecma-international.org/ecma-262/5.1/

Revision history for this message
Jiri Prchlik (prchlikji) said :
#4

Great, thanks a lot Bogdan that is what I really need.

I did not understand Introduction properly:
http://www.stellarium.org/doc/head/scripting.html#scripting_api

So I recommend put your links and content of your comment to it.