diff -r c2ffbc9b832d -r f867269ab8a1 mainwindow.cpp --- a/mainwindow.cpp Sat Feb 24 12:32:53 2007 +0000 +++ b/mainwindow.cpp Mon Mar 05 23:22:51 2007 +0000 @@ -98,6 +98,13 @@ branchPropertyWindow = new BranchPropertyWindow(); branchPropertyWindow->move (20,20); + // Initialize script editor + scriptEditor = new SimpleScriptEditor(); + scriptEditor->move (50,50); + + connect( scriptEditor, SIGNAL( runScript ( QString ) ), + this, SLOT( runScript( QString ) ) ); + // Initialize some settings, which are platform dependant QString p,s; @@ -187,6 +194,9 @@ settings.setValue( "/mapeditor/editmode/useFlagGroups",actionSettingsUseFlagGroups->isOn() ); settings.setValue( "/export/useHideExport",actionSettingsUseHideExport->isOn() ); + //FIXME save branchPropWindow settings + //FIXME save scriptEditor settings + // call the destructors delete (textEditor); delete historyWindow; @@ -3419,6 +3429,14 @@ actionViewToggleNoteEditor->setOn (false); } +void Main::runScript (QString script) +{ + if (currentMapEditor()) + currentMapEditor()->runScript (script); + + +} + void Main::showPropertyDialog() { if(currentMapEditor()) @@ -3464,10 +3482,13 @@ void Main::testCommand() { if (!currentMapEditor()) return; + scriptEditor->show(); + /* bool ok; QString com = QInputDialog::getText( vymName, "Enter Command:", QLineEdit::Normal,"command", &ok, this ); if (ok) currentMapEditor()->parseAtom(com); + */ } void Main::helpDoc()