![]() |
VR-Forces Developer's Guide
|
Class that will request and spawn an editor that will allow the editing of the given scripted task. This editor will create a temporary file to be handed to the editing application and will monitor changes to that temporary file. If changes are made the new script will be sent to all back-ends.

Classes | |
| struct | FileInfo |
| struct | PendingRequest |
Public Member Functions | |
| DtScriptEditor (makVrv::DtDe &, const std::string &tmpDir="scripts") | |
| virtual | ~DtScriptEditor () override |
| virtual void | edit (const std::string &, int scriptType, const std::string &commentBlock="") |
| virtual void | editNew (const std::string &id, int sType, const std::string &script, const std::string &scriptEngine, const std::string &commentBlock="") |
| virtual void | view (const std::string &) |
| virtual void | closeEditorFor (const std::string &) |
| virtual bool | alreadyEditing (const std::string &id) const |
| virtual void | editExternalScript (const std::string &filename) |
| virtual bool | hasScriptFor (const std::string &) const |
Public Member Functions inherited from makVrv::DtVirtualBaseClass | |
| DtVirtualBaseClass () | |
| virtual | ~DtVirtualBaseClass () |
Static Public Member Functions | |
| static DtScriptEditor & | instance (makVrv::DtDe &de) |
| static void | registerInstance (makVrv::DtDe &, DtScriptEditor *) |
Public Attributes | |
| boost::signals2::signal< void(const std::string &, const std::string &)> | signal_scriptModified |
| boost::signals2::signal< void(const std::string &)> | signal_editingComplete |
Protected Types | |
| typedef std::map< std::string, FileInfo > | FileInfoMap |
Protected Slots | |
| virtual void | editingComplete (int, QProcess::ExitStatus) |
| virtual void | startupError (QProcess::ProcessError) |
Protected Member Functions | |
| virtual void | slot_scriptSaveError (std::string scriptId) |
| virtual void | receivedScript (DtSimMessage *) |
| virtual void | slot_aboutToClearScriptedTasks () |
| virtual void | slot_scriptedTaskAboutToBeRemoved (std::string scriptId) |
| virtual void | editScript (const std::string &id, int sType, const std::string &script, const std::string &scriptEngine="lua", bool readOnly=false, bool localOnly=false, bool scriptIsFilename=false, const std::string &commentBlock="") |
| virtual void | tick () |
| virtual void | checkNeedsUpdate (const std::string &filename) |
| virtual void | scriptBeingRemoved () |
| virtual void | slot_scriptedTaskAdded (std::string) |
| virtual void | editingComplete (QProcess *) |
| virtual bool | checkForScriptErrors (const DtScriptedTaskMetaData &) const |
| virtual std::string | cleanUpError (const std::string &) const |
| virtual void | exitingApplication () |
Protected Attributes | |
| makVrv::DtDe & | myDe |
| std::map< DtU32, PendingRequest > | myPendingRequests |
| FileInfoMap | myFileInfoMap |
| makVrv::DtSignalConnectionManager | myConnections |
| DtFilename | myTempDirectory |
| std::set< std::string > | myHasScriptFor |
|
protected |
| makVrf::DtScriptEditor::DtScriptEditor | ( | makVrv::DtDe & | , |
| const std::string & | tmpDir = "scripts" |
||
| ) |
CTOR.
|
overridevirtual |
DTOR.
|
static |
Returns instance of the manager.
|
static |
|
virtual |
Request the script for the given task and start editing.
|
virtual |
Edits a new script file without requesting information from the back-end for the current script.
|
virtual |
Request the script for view only access.
|
virtual |
If editing, closes the editor for the specified script.
|
virtual |
Returns true if already editing script.
|
virtual |
Edits an external script as local only. Good for editing script files (Lua) that can leverage script parsing.
|
virtual |
Returns true if there was at least one time there was a script for this script id.
|
protectedvirtual |
|
protectedvirtual |
Received when script is received.
Reimplemented in makVrf::DtDesignerEditor.
|
protectedvirtual |
Called when a script is removed, stop editing the script in question.
|
protectedvirtual |
|
protectedvirtual |
Starts the editing of the specified script.
|
protectedvirtual |
Check last modified dates of files to see if they have changed. If they have update the server.
|
protectedvirtual |
Checks to see if this file has been updated since last time. If so sends the script update message to the server.
Reimplemented in makVrf::DtDesignerEditor.
|
protectedvirtual |
Called when a script is removed, put up a dialog announcing why editor is being closed.
Reimplemented in makVrf::DtDesignerEditor.
|
protectedvirtual |
Called when a script is added, see if the script has changed from scenario to system script.
|
protectedvirtual |
Call to complete editing on the given process.
|
protectedvirtual |
Checks for syntax errors in script. Will not abort any processes because of it, but, will warn the user. Will also mark script as having errors to display to the user. Returns false if there are no errors.
|
protectedvirtual |
Cleans up error to remove some information that might not be meaningful to users.
|
protectedvirtual |
|
protectedvirtualslot |
|
protectedvirtualslot |
| boost::signals2::signal<void (const std::string&, const std::string&)> makVrf::DtScriptEditor::signal_scriptModified |
Signals sent when scripts are changed or an editor closed.
| boost::signals2::signal<void (const std::string&)> makVrf::DtScriptEditor::signal_editingComplete |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |