7070#include < Interface/Application/PythonConsoleWidget.h>
7171#include < Core/Python/PythonInterpreter.h>
7272#endif
73+ #include " TriggeredEventsWindow.h"
7374
7475using namespace SCIRun ;
7576using namespace SCIRun ::Gui;
@@ -359,6 +360,7 @@ SCIRunMainWindow::SCIRunMainWindow() : shortcuts_(nullptr), firstTimePythonShown
359360 actionConfiguration_->setChecked (!configurationDockWidget_->isHidden ());
360361 actionModule_Selector->setChecked (!moduleSelectorDockWidget_->isHidden ());
361362 actionProvenance_->setChecked (!provenanceWindow_->isHidden ());
363+ actionTriggeredEvents_->setChecked (!triggeredEventsWindow_->isHidden ());
362364 actionTagManager_->setChecked (!tagManagerWindow_->isHidden ());
363365
364366 moduleSelectorDockWidget_->setStyleSheet (" QDockWidget {background: rgb(66,66,69); background-color: rgb(66,66,69) }"
@@ -478,7 +480,7 @@ SCIRunMainWindow::~SCIRunMainWindow()
478480 Application::Instance ().shutdown ();
479481}
480482
481- void SCIRunMainWindow::setController (SCIRun::Dataflow::Engine:: NetworkEditorControllerHandle controller)
483+ void SCIRunMainWindow::setController (NetworkEditorControllerHandle controller)
482484{
483485 boost::shared_ptr<NetworkEditorControllerGuiProxy> controllerProxy (new NetworkEditorControllerGuiProxy (controller));
484486 networkEditor_->setNetworkEditorController (controllerProxy);
@@ -511,12 +513,12 @@ void SCIRunMainWindow::setupNetworkEditor()
511513
512514void SCIRunMainWindow::executeCommandLineRequests ()
513515{
514- SCIRun::Core:: Application::Instance ().executeCommandLineRequests ();
516+ Application::Instance ().executeCommandLineRequests ();
515517}
516518
517519void SCIRunMainWindow::preexecute ()
518520{
519- if (Core:: Preferences::Instance ().saveBeforeExecute && !Application::Instance ().parameters ()->isRegressionMode ())
521+ if (Preferences::Instance ().saveBeforeExecute && !Application::Instance ().parameters ()->isRegressionMode ())
520522 {
521523 saveNetwork ();
522524 }
@@ -605,7 +607,7 @@ bool SCIRunMainWindow::loadNetworkFile(const QString& filename)
605607 }
606608 else
607609 {
608- if (Core:: Application::Instance ().parameters ()->isRegressionMode ())
610+ if (Application::Instance ().parameters ()->isRegressionMode ())
609611 exit (7 );
610612 // TODO: set error code to non-0 so regression tests fail!
611613 // probably want to control this with a --regression flag.
@@ -675,7 +677,7 @@ bool SCIRunMainWindow::newNetwork()
675677void SCIRunMainWindow::setCurrentFile (const QString& fileName)
676678{
677679 currentFile_ = fileName;
678- SCIRun::Core:: setCurrentFileName (currentFile_.toStdString ());
680+ setCurrentFileName (currentFile_.toStdString ());
679681 setWindowModified (false );
680682 QString shownName = tr (" Untitled" );
681683 if (!currentFile_.isEmpty ())
@@ -942,15 +944,15 @@ void SCIRunMainWindow::resetBackgroundColor()
942944
943945void SCIRunMainWindow::setupScriptedEventsWindow ()
944946{
945- qDebug () << " TODO " ;
946- // scriptedEventsWindow_ = new ScriptedEventsWindow(this );
947- // connect(actionScriptedEvents_ , SIGNAL(toggled (bool)), scriptedEventsWindow_ , SLOT(setVisible (bool)));
948- // connect(scriptedEventsWindow_, SIGNAL(visibilityChanged(bool)), actionScriptedEvents_, SLOT(setChecked(bool)) );
947+ triggeredEventsWindow_ = new TriggeredEventsWindow ( this ) ;
948+ connect (actionTriggeredEvents_, SIGNAL ( toggled ( bool )), triggeredEventsWindow_, SLOT ( setVisible ( bool )) );
949+ connect (triggeredEventsWindow_ , SIGNAL (visibilityChanged (bool )), actionTriggeredEvents_ , SLOT (setChecked (bool )));
950+ triggeredEventsWindow_-> hide ( );
949951}
950952
951953void SCIRunMainWindow::setupProvenanceWindow ()
952954{
953- ProvenanceManagerHandle provenanceManager (new Dataflow::Engine:: ProvenanceManager<SCIRun::Dataflow::Networks:: NetworkFileHandle>(networkEditor_));
955+ ProvenanceManagerHandle provenanceManager (new ProvenanceManager<NetworkFileHandle>(networkEditor_));
954956 provenanceWindow_ = new ProvenanceWindow (provenanceManager, this );
955957 connect (actionProvenance_, SIGNAL (toggled (bool )), provenanceWindow_, SLOT (setVisible (bool )));
956958 connect (provenanceWindow_, SIGNAL (visibilityChanged (bool )), actionProvenance_, SLOT (setChecked (bool )));
@@ -1037,8 +1039,8 @@ void SCIRunMainWindow::runPythonScript(const QString& scriptFileName)
10371039{
10381040#ifdef BUILD_WITH_PYTHON
10391041 GuiLogger::Instance ().logInfo (" RUNNING PYTHON SCRIPT: " + scriptFileName);
1040- SCIRun::Core:: PythonInterpreter::Instance ().run_string (" import SCIRunPythonAPI; from SCIRunPythonAPI import *" );
1041- SCIRun::Core:: PythonInterpreter::Instance ().run_file (scriptFileName.toStdString ());
1042+ PythonInterpreter::Instance ().run_string (" import SCIRunPythonAPI; from SCIRunPythonAPI import *" );
1043+ PythonInterpreter::Instance ().run_file (scriptFileName.toStdString ());
10421044 statusBar ()->showMessage (tr (" Script is running." ), 2000 );
10431045#else
10441046 GuiLogger::Instance ().logInfo (" Python not included in this build, cannot run " + scriptFileName);
@@ -1308,7 +1310,7 @@ void SCIRunMainWindow::setDataDirectory(const QString& dir)
13081310 prefsWindow_->scirunDataLineEdit_ ->setToolTip (dir);
13091311
13101312 RemembersFileDialogDirectory::setStartingDir (dir);
1311- Core:: Preferences::Instance ().setDataDirectory (dir.toStdString ());
1313+ Preferences::Instance ().setDataDirectory (dir.toStdString ());
13121314 }
13131315}
13141316
@@ -1319,7 +1321,7 @@ void SCIRunMainWindow::setDataPath(const QString& dirs)
13191321 prefsWindow_->scirunDataPathTextEdit_ ->setPlainText (dirs);
13201322 prefsWindow_->scirunDataPathTextEdit_ ->setToolTip (dirs);
13211323
1322- Core:: Preferences::Instance ().setDataPath (dirs.toStdString ());
1324+ Preferences::Instance ().setDataPath (dirs.toStdString ());
13231325 }
13241326}
13251327
@@ -1335,7 +1337,7 @@ void SCIRunMainWindow::addToDataDirectory(const QString& dir)
13351337 prefsWindow_->scirunDataPathTextEdit_ ->setToolTip (prefsWindow_->scirunDataPathTextEdit_ ->toPlainText ());
13361338
13371339 RemembersFileDialogDirectory::setStartingDir (dir);
1338- Core:: Preferences::Instance ().addToDataPath (dir.toStdString ());
1340+ Preferences::Instance ().addToDataPath (dir.toStdString ());
13391341 }
13401342}
13411343
@@ -1353,7 +1355,7 @@ void SCIRunMainWindow::addToPathFromGUI()
13531355
13541356bool SCIRunMainWindow::newInterface () const
13551357{
1356- return Core:: Application::Instance ().parameters ()->entireCommandLine ().find (" --originalGUI" ) == std::string::npos;
1358+ return Application::Instance ().parameters ()->entireCommandLine ().find (" --originalGUI" ) == std::string::npos;
13571359}
13581360
13591361void SCIRunMainWindow::printStyleSheet () const
0 commit comments