Skip to content

Commit 17ba08a

Browse files
committed
Merge branch 'master' into rendererDan
2 parents 807b81a + fa9a967 commit 17ba08a

File tree

6 files changed

+48
-70
lines changed

6 files changed

+48
-70
lines changed

src/Dataflow/Network/Network.cc

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -233,9 +233,16 @@ void Network::setModuleExecutionState(ModuleInterface::ExecutionState state, Mod
233233
};
234234

235235
//TODO: possible fix for network execute delay. Need to test with users.
236-
//boost::thread t(update);
237-
// for now, just run in this thread
238-
update();
236+
if (settings().value("networkStateUpdateThread") == "yes")
237+
{
238+
boost::thread t(update);
239+
std::cout << "threaded state update" << std::endl;
240+
}
241+
else // for now, just run in this thread
242+
{
243+
update();
244+
std::cout << "non-threaded state update" << std::endl;
245+
}
239246
}
240247

241248
void Network::clear()

src/Interface/Application/NetworkEditor.cc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
#include <Dataflow/Engine/Controller/NetworkEditorController.h> //TODO: remove
4545
#include <Dataflow/Network/NetworkSettings.h> //TODO: push
4646
#include <Core/Application/Preferences/Preferences.h>
47+
#include <Core/Application/Application.h>
4748
#ifdef BUILD_WITH_PYTHON
4849
#include <Dataflow/Engine/Python/NetworkEditorPythonAPI.h>
4950
#endif
@@ -127,6 +128,10 @@ void NetworkEditor::setNetworkEditorController(boost::shared_ptr<NetworkEditorCo
127128

128129
connect(controller_.get(), SIGNAL(connectionAdded(const SCIRun::Dataflow::Networks::ConnectionDescription&)),
129130
this, SLOT(connectionAddedQueued(const SCIRun::Dataflow::Networks::ConnectionDescription&)));
131+
132+
//TODO: duplication
133+
const std::string value = Application::Instance().parameters()->entireCommandLine().find("--testUpdateThread") != std::string::npos ? "yes" : "no";
134+
controller_->getSettings().setValue("networkStateUpdateThread", value);
130135
}
131136
}
132137

@@ -818,6 +823,10 @@ SCIRun::Dataflow::Networks::NetworkFileHandle NetworkEditor::saveNetwork() const
818823
void NetworkEditor::loadNetwork(const SCIRun::Dataflow::Networks::NetworkFileHandle& xml)
819824
{
820825
controller_->loadNetwork(xml);
826+
827+
//TODO: duplication
828+
const std::string value = Application::Instance().parameters()->entireCommandLine().find("--testUpdateThread") != std::string::npos ? "yes" : "no";
829+
controller_->getSettings().setValue("networkStateUpdateThread", value);
821830
}
822831

823832
size_t NetworkEditor::numModules() const

src/Interface/Application/SCIRunMainWindow.cc

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,11 @@ SCIRunMainWindow::SCIRunMainWindow() : firstTimePythonShown_(true)
8585
"color: white;"
8686
"selection-color: yellow;"
8787
"selection-background-color: blue;"
88+
//"QMenuBar::item { background-color: rgb(66,66,69); color: black }"
89+
"QToolBar { background-color: rgb(66,66,69); border: 1px solid black; color: black }"
90+
"QProgressBar { background-color: rgb(66,66,69); border: 0px solid black; color: black }"
91+
"QDockWidget {background: rgb(66,66,69); background-color: rgb(66,66,69) }"
92+
8893
//"border: 1px solid white;"
8994
//"border-radius: 3px;"
9095
"QPushButton {"
@@ -143,6 +148,7 @@ SCIRunMainWindow::SCIRunMainWindow() : firstTimePythonShown_(true)
143148
setActionIcons();
144149

145150
QToolBar* standardBar = addToolBar("Standard");
151+
standardBar->setStyleSheet("QToolBar { background-color: rgb(66,66,69); border: 1px solid black; color: black }");
146152
standardBar->setObjectName("StandardToolBar");
147153
standardBar->addAction(actionNew_);
148154
standardBar->addAction(actionLoad_);
@@ -163,7 +169,7 @@ SCIRunMainWindow::SCIRunMainWindow() : firstTimePythonShown_(true)
163169
standardBar->addAction(actionResetNetworkZoom_);
164170
standardBar->addAction(actionDragMode_);
165171
standardBar->addAction(actionSelectMode_);
166-
standardBar->setStyleSheet(styleSheet());
172+
//standardBar->setStyleSheet(styleSheet());
167173
//setUnifiedTitleAndToolBarOnMac(true);
168174

169175
QToolBar* executeBar = addToolBar(tr("&Execute"));
@@ -172,7 +178,8 @@ SCIRunMainWindow::SCIRunMainWindow() : firstTimePythonShown_(true)
172178

173179
networkProgressBar_.reset(new NetworkExecutionProgressBar(this));
174180
executeBar->addActions(networkProgressBar_->actions());
175-
executeBar->setStyleSheet(styleSheet());
181+
executeBar->setStyleSheet("QToolBar { background-color: rgb(66,66,69); border: 1px solid black; color: black }");
182+
//executeBar->setStyleSheet(styleSheet());
176183
executeBar->setAutoFillBackground(true);
177184
connect(actionExecute_All_, SIGNAL(triggered()), networkProgressBar_.get(), SLOT(resetModulesDone()));
178185
connect(networkEditor_->moduleEventProxy().get(), SIGNAL(moduleExecuteEnd(const std::string&)), networkProgressBar_.get(), SLOT(incrementModulesDone()));
@@ -283,6 +290,8 @@ SCIRunMainWindow::SCIRunMainWindow() : firstTimePythonShown_(true)
283290
actionModule_Selector->setChecked(!moduleSelectorDockWidget_->isHidden());
284291
actionProvenance_->setChecked(!provenanceWindow_->isHidden());
285292

293+
moduleSelectorDockWidget_->setStyleSheet("QDockWidget {background: rgb(66,66,69); background-color: rgb(66,66,69) }");
294+
286295
provenanceWindow_->hide();
287296

288297
hideNonfunctioningWidgets();
@@ -1070,13 +1079,14 @@ void SCIRunMainWindow::displayAcknowledgement()
10701079

10711080
void SCIRunMainWindow::setDataDirectory(const QString& dir)
10721081
{
1073-
scirunDataLineEdit_->setText(dir);
1074-
scirunDataLineEdit_->setToolTip(dir);
10751082
if (!dir.isEmpty())
1076-
{
1083+
{
1084+
scirunDataLineEdit_->setText(dir);
1085+
scirunDataLineEdit_->setToolTip(dir);
1086+
10771087
RemembersFileDialogDirectory::setStartingDir(dir);
1078-
Core::Preferences::Instance().setDataDirectory(dir.toStdString());
1079-
}
1088+
Core::Preferences::Instance().setDataDirectory(dir.toStdString());
1089+
}
10801090
}
10811091

10821092
QString SCIRunMainWindow::dataDirectory() const
@@ -1092,7 +1102,7 @@ void SCIRunMainWindow::setDataDirectoryFromGUI()
10921102

10931103
bool SCIRunMainWindow::newInterface() const
10941104
{
1095-
return Core::Application::Instance().parameters()->entireCommandLine().find("--experimentalGUI") != std::string::npos;
1105+
return Core::Application::Instance().parameters()->entireCommandLine().find("--originalGUI") == std::string::npos;
10961106
}
10971107

10981108
namespace {
@@ -1314,4 +1324,4 @@ void SCIRunMainWindow::keyReleaseEvent(QKeyEvent *event)
13141324
statusBar()->showMessage("Network zoom inactive", 1000);
13151325
}
13161326
QMainWindow::keyPressEvent(event);
1317-
}
1327+
}

src/Interface/Modules/Fields/ReportFieldInfoDialog.cc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,6 @@ ReportFieldInfoDialog::ReportFieldInfoDialog(const std::string& name, ModuleStat
4141
{
4242
setupUi(this);
4343
setWindowTitle(QString::fromStdString(name));
44-
fixSize();
45-
46-
buttonBox->setVisible(false);
4744
}
4845

4946
void ReportFieldInfoDialog::pullAndDisplayInfo()

src/Interface/Modules/Fields/ReportFieldInfoDialog.ui

Lines changed: 7 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
<rect>
77
<x>0</x>
88
<y>0</y>
9-
<width>499</width>
10-
<height>251</height>
9+
<width>512</width>
10+
<height>263</height>
1111
</rect>
1212
</property>
1313
<property name="sizePolicy">
14-
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
14+
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
1515
<horstretch>0</horstretch>
1616
<verstretch>0</verstretch>
1717
</sizepolicy>
@@ -25,6 +25,9 @@
2525
<property name="windowTitle">
2626
<string>Dialog</string>
2727
</property>
28+
<property name="sizeGripEnabled">
29+
<bool>true</bool>
30+
</property>
2831
<layout class="QVBoxLayout" name="verticalLayout">
2932
<item>
3033
<widget class="QGroupBox" name="groupBox">
@@ -45,57 +48,8 @@
4548
</layout>
4649
</widget>
4750
</item>
48-
<item>
49-
<widget class="QDialogButtonBox" name="buttonBox">
50-
<property name="enabled">
51-
<bool>false</bool>
52-
</property>
53-
<property name="orientation">
54-
<enum>Qt::Horizontal</enum>
55-
</property>
56-
<property name="standardButtons">
57-
<set>QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::Ok|QDialogButtonBox::Reset|QDialogButtonBox::RestoreDefaults</set>
58-
</property>
59-
<property name="centerButtons">
60-
<bool>false</bool>
61-
</property>
62-
</widget>
63-
</item>
6451
</layout>
6552
</widget>
6653
<resources/>
67-
<connections>
68-
<connection>
69-
<sender>buttonBox</sender>
70-
<signal>accepted()</signal>
71-
<receiver>ReportFieldInfoDialog</receiver>
72-
<slot>accept()</slot>
73-
<hints>
74-
<hint type="sourcelabel">
75-
<x>248</x>
76-
<y>254</y>
77-
</hint>
78-
<hint type="destinationlabel">
79-
<x>157</x>
80-
<y>274</y>
81-
</hint>
82-
</hints>
83-
</connection>
84-
<connection>
85-
<sender>buttonBox</sender>
86-
<signal>rejected()</signal>
87-
<receiver>ReportFieldInfoDialog</receiver>
88-
<slot>reject()</slot>
89-
<hints>
90-
<hint type="sourcelabel">
91-
<x>316</x>
92-
<y>260</y>
93-
</hint>
94-
<hint type="destinationlabel">
95-
<x>286</x>
96-
<y>274</y>
97-
</hint>
98-
</hints>
99-
</connection>
100-
</connections>
54+
<connections/>
10155
</ui>

src/Interface/Modules/Render/ViewScene.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ ViewSceneDialog::ViewSceneDialog(const std::string& name, ModuleStateHandle stat
9696

9797
state->connect_state_changed(boost::bind(&ViewSceneDialog::newGeometryValueForwarder, this));
9898
connect(this, SIGNAL(newGeometryValueForwarder()), this, SLOT(newGeometryValue()));
99-
99+
100100
addConfigurationDock(QString::fromStdString(name));
101101
}
102102

@@ -374,6 +374,7 @@ void ViewSceneDialog::configurationButtonClicked()
374374
void ViewSceneDialog::addToolBar()
375375
{
376376
mToolBar = new QToolBar(this);
377+
mToolBar->setStyleSheet("QToolBar { background-color: rgb(66,66,69); border: 1px solid black; color: black }");
377378

378379
//addMouseMenu();
379380
addAutoViewButton();
@@ -514,7 +515,7 @@ void ViewSceneDialog::addConfigurationDock(const QString& viewName)
514515

515516
QTabWidget* tabs = new QTabWidget(mConfigurationDock);
516517
tabs->setFixedSize(300, 150);
517-
518+
518519
// View Tab
519520
QWidget* viewTab = new QWidget();
520521
addShowOrientationCheckbox(viewTab);

0 commit comments

Comments
 (0)