StelScriptMgr.hpp   StelScriptMgr.hpp 
skipping to change at line 24 skipping to change at line 24
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA. * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
*/ */
#ifndef _STELSCRIPTMGR_HPP_ #ifndef _STELSCRIPTMGR_HPP_
#define _STELSCRIPTMGR_HPP_ #define _STELSCRIPTMGR_HPP_
#include <QObject> #include <QObject>
#include <QtScript>
#include <QStringList> #include <QStringList>
#include <QFile> #include <QFile>
#include <QTime> #include <QTime>
#include <QTimer> #include <QTimer>
#include <QScriptEngineAgent>
class StelMainScriptAPI; class StelMainScriptAPI;
class StelScriptEngineAgent; class StelScriptEngineAgent;
class QScriptEngine;
#ifdef ENABLE_SCRIPT_CONSOLE #ifdef ENABLE_SCRIPT_CONSOLE
class ScriptConsole; class ScriptConsole;
#endif #endif
//! Manage scripting in Stellarium //! Manage scripting in Stellarium
class StelScriptMgr : public QObject class StelScriptMgr : public QObject
{ {
Q_OBJECT Q_OBJECT
skipping to change at line 229 skipping to change at line 228
//! The name of the action is of the form: "actionScript/<script-pat h>" //! The name of the action is of the form: "actionScript/<script-pat h>"
void initActions(); void initActions();
//! This function is for use with getName, getAuthor and getLicense. //! This function is for use with getName, getAuthor and getLicense.
//! @param s the script id //! @param s the script id
//! @param id the command line id, e.g. "Name" //! @param id the command line id, e.g. "Name"
//! @param notFoundText the text to be returned if the key is not fo und //! @param notFoundText the text to be returned if the key is not fo und
//! @return the text following the id and : on a comment line near t he top of //! @return the text following the id and : on a comment line near t he top of
//! the script file (i.e. before there is a non-comment line). //! the script file (i.e. before there is a non-comment line).
QString getHeaderSingleLineCommentText(const QString& s, const QStri ng& id, const QString& notFoundText="") const; QString getHeaderSingleLineCommentText(const QString& s, const QStri ng& id, const QString& notFoundText="") const;
QScriptEngine engine; QScriptEngine* engine;
//! The thread in which scripts are run //! The thread in which scripts are run
StelMainScriptAPI *mainAPI; StelMainScriptAPI *mainAPI;
QString scriptFileName; QString scriptFileName;
//Script engine agent //Script engine agent
StelScriptEngineAgent *agent; StelScriptEngineAgent *agent;
};
class StelScriptEngineAgent : public QScriptEngineAgent
{
public:
explicit StelScriptEngineAgent(QScriptEngine *engine);
virtual ~StelScriptEngineAgent() {}
void setPauseScript(bool pause) { isPaused=pause; }
bool getPauseScript() { return isPaused; }
void positionChange(qint64 scriptId, int lineNumber, int columnNumbe
r);
private:
bool isPaused;
}; };
#endif // _STELSCRIPTMGR_HPP_ #endif // _STELSCRIPTMGR_HPP_
 End of changes. 5 change blocks. 
21 lines changed or deleted 2 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/