Skip to content

Commit d0f8d5d

Browse files
committed
Rename
1 parent 93a4e7d commit d0f8d5d

File tree

5 files changed

+36
-25
lines changed

5 files changed

+36
-25
lines changed

src/Interface/Application/ProvenanceWindow.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ Key thing: when undoing/redoing, since we're loading from scratch, need to scope
7777
class ProvenanceWindowListItem : public QListWidgetItem
7878
{
7979
public:
80-
ProvenanceWindowListItem(ProvenanceItemHandle info, QListWidget* parent = 0) :
80+
explicit ProvenanceWindowListItem(ProvenanceItemHandle info, QListWidget* parent = nullptr) :
8181
QListWidgetItem(QString::fromStdString(info->name()), parent),
8282
info_(info)
8383
{

src/Interface/Application/SCIRunMainWindow.cc

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@
7070
#include <Interface/Application/PythonConsoleWidget.h>
7171
#include <Core/Python/PythonInterpreter.h>
7272
#endif
73+
#include "TriggeredEventsWindow.h"
7374

7475
using namespace SCIRun;
7576
using 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

512514
void SCIRunMainWindow::executeCommandLineRequests()
513515
{
514-
SCIRun::Core::Application::Instance().executeCommandLineRequests();
516+
Application::Instance().executeCommandLineRequests();
515517
}
516518

517519
void 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()
675677
void 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

943945
void 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

951953
void 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

13541356
bool 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

13591361
void SCIRunMainWindow::printStyleSheet() const

src/Interface/Application/SCIRunMainWindow.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class ShortcutsInterface;
5858
class TagManagerWindow;
5959
class PythonConsoleWidget;
6060
class FileDownloader;
61-
class ScriptedEventsWindow;
61+
class TriggeredEventsWindow;
6262

6363
class SCIRunMainWindow : public QMainWindow, public Ui::SCIRunMainWindow
6464
{
@@ -119,7 +119,7 @@ public Q_SLOTS:
119119
QToolButton* executeButton_;
120120
QByteArray windowState_;
121121
QPushButton* versionButton_;
122-
ScriptedEventsWindow* scriptedEventsWindow_;
122+
TriggeredEventsWindow* triggeredEventsWindow_;
123123
void postConstructionSignalHookup();
124124
void executeCommandLineRequests();
125125
void setTipsAndWhatsThis();

src/Interface/Application/SCIRunMainWindow.ui

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@
4444
<rect>
4545
<x>0</x>
4646
<y>0</y>
47-
<width>1081</width>
48-
<height>443</height>
47+
<width>1093</width>
48+
<height>482</height>
4949
</rect>
5050
</property>
5151
<property name="acceptDrops">
@@ -63,7 +63,7 @@
6363
<x>0</x>
6464
<y>0</y>
6565
<width>1440</width>
66-
<height>22</height>
66+
<height>21</height>
6767
</rect>
6868
</property>
6969
<widget class="QMenu" name="menuFile_">
@@ -172,6 +172,7 @@
172172
<addaction name="separator"/>
173173
<addaction name="actionPythonConsole_"/>
174174
<addaction name="actionDevConsole_"/>
175+
<addaction name="actionTriggeredEvents_"/>
175176
<addaction name="actionPreferences_"/>
176177
<addaction name="separator"/>
177178
<addaction name="actionReset_Window_Layout"/>
@@ -211,7 +212,6 @@
211212
<addaction name="separator"/>
212213
<addaction name="actionCleanUpNetwork_"/>
213214
<addaction name="separator"/>
214-
<addaction name="actionScriptEvents_"/>
215215
</widget>
216216
<addaction name="menuFile_"/>
217217
<addaction name="menuEdit"/>
@@ -1017,9 +1017,12 @@
10171017
<string>Network Editor GUI*</string>
10181018
</property>
10191019
</action>
1020-
<action name="actionScriptEvents_">
1020+
<action name="actionTriggeredEvents_">
1021+
<property name="checkable">
1022+
<bool>true</bool>
1023+
</property>
10211024
<property name="text">
1022-
<string>Script Events...</string>
1025+
<string>Triggered Events</string>
10231026
</property>
10241027
</action>
10251028
</widget>

src/Interface/Application/TriggeredEventsWindow.ui

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@
1010
<height>422</height>
1111
</rect>
1212
</property>
13+
<property name="minimumSize">
14+
<size>
15+
<width>725</width>
16+
<height>422</height>
17+
</size>
18+
</property>
1319
<property name="windowTitle">
1420
<string>Triggered Events</string>
1521
</property>

0 commit comments

Comments
 (0)