Manage scripting in Stellarium.
More...
#include <StelScriptMgr.hpp>
|
| StelScriptMgr (QObject *parent=0) |
|
QStringList | getScriptList () |
|
bool | scriptIsRunning () |
| Find out if a script is running. More...
|
|
QString | runningScriptId () |
| Get the ID (filename) of the currently running script. More...
|
|
bool | preprocessScript (const QString &input, QString &output, const QString &scriptDir) |
|
bool | preprocessScript (QFile &input, QString &output, const QString &scriptDir) |
|
void | addModules () |
| Add all the StelModules into the script engine. More...
|
|
Manage scripting in Stellarium.
Definition at line 39 of file StelScriptMgr.hpp.
void StelScriptMgr::addModules |
( |
| ) |
|
Add all the StelModules into the script engine.
void StelScriptMgr::debug |
( |
const QString & |
msg | ) |
|
|
slot |
const QString StelScriptMgr::getAuthor |
( |
const QString & |
s | ) |
|
|
slot |
Gets the name of the script Author.
- Parameters
-
s | the file name of the script whose name is to be returned. |
- Returns
- text following a comment with Author: at the start. If no such comment is found, "" is returned. If the file is not found or cannot be opened for some reason, an Empty string will be returned.
const QString StelScriptMgr::getDescription |
( |
const QString & |
s | ) |
|
|
slot |
Gets a description of the script.
- Parameters
-
s | the file name of the script whose name is to be returned. |
- Returns
- text following a comment with Description: at the start. The description is considered to be over when a line with no comment is found. If no such comment is found, QString("") is returned. If the file is not found or cannot be opened for some reason, an Empty string will be returned.
const QString StelScriptMgr::getLicense |
( |
const QString & |
s | ) |
|
|
slot |
Gets the licensing terms for the script.
- Parameters
-
s | the file name of the script whose name is to be returned. |
- Returns
- text following a comment with License: at the start. If no such comment is found, "" is returned. If the file is not found or cannot be opened for some reason, an Empty string will be returned.
const QString StelScriptMgr::getName |
( |
const QString & |
s | ) |
|
|
slot |
Gets a single line name of the script.
- Parameters
-
s | the file name of the script whose name is to be returned. |
- Returns
- text following a comment with Name: at the start. If no such comment is found, the file name will be returned. If the file is not found or cannot be opened for some reason, an Empty string will be returned.
double StelScriptMgr::getScriptRate |
( |
| ) |
|
|
slot |
Get the rate at which the script is running as a multiple of the normal execution rate.
void StelScriptMgr::pauseScript |
( |
| ) |
|
|
slot |
void StelScriptMgr::resumeScript |
( |
| ) |
|
|
slot |
QString StelScriptMgr::runningScriptId |
( |
| ) |
|
Get the ID (filename) of the currently running script.
- Returns
- Empty string if no script is running, else the ID of the script which is running.
bool StelScriptMgr::runPreprocessedScript |
( |
const QString & |
preprocessedScript | ) |
|
|
slot |
Run the prprocessed script.
- Parameters
-
preprocessedScript | the string containing the preprocessed script. |
- Returns
- false if the given script could not be run, true otherwise
bool StelScriptMgr::runScript |
( |
const QString & |
fileName, |
|
|
const QString & |
includePath = "" |
|
) |
| |
|
slot |
Run the script located at the given location.
- Parameters
-