Skip to content

Commit 6ea86b7

Browse files
committed
Merge branch 'master' into moduleColorHack
2 parents 132fb8e + 0d78ab7 commit 6ea86b7

File tree

10 files changed

+80
-52
lines changed

10 files changed

+80
-52
lines changed

src/Core/Algorithms/Math/Tests/SolveLinearSystemWithEigenTests.cc

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
2626
DEALINGS IN THE SOFTWARE.
2727
*/
28-
28+
2929
#include <Testing/Utils/SCIRunUnitTests.h>
3030
#include <fstream>
3131
#include <boost/filesystem.hpp>
@@ -56,7 +56,7 @@ using namespace ::testing;
5656

5757
#if 0
5858
TEST(SolveLinearSystemWithEigenAlgorithmTests, CanSolveBasicSmallDenseSystemWithEigenClasses)
59-
{
59+
{
6060
int n = 3;
6161
DenseMatrix m1(n,n);
6262
m1 << 2,-1,0,
@@ -70,12 +70,12 @@ TEST(SolveLinearSystemWithEigenAlgorithmTests, CanSolveBasicSmallDenseSystemWith
7070

7171
auto rhs = m1*v;
7272
std::cout << "rhs = \n" << rhs << std::endl;
73-
73+
7474
VectorXd x(n);
7575
x.setZero();
7676

7777
std::cout << "matrix to solve: \n" << m1 << std::endl;
78-
78+
7979
ConjugateGradient<DenseMatrix::EigenBase> cg;
8080
cg.compute(m1);
8181

@@ -89,7 +89,7 @@ TEST(SolveLinearSystemWithEigenAlgorithmTests, CanSolveBasicSmallDenseSystemWith
8989
int i = 0;
9090
do {
9191
x = cg.solveWithGuess(rhs, x);
92-
92+
9393
std::cout << i << " : " << cg.error() << std::endl;
9494
++i;
9595
} while (cg.info() != Success && i < 2000);
@@ -240,11 +240,11 @@ TEST(SparseMatrixReadTest, DISABLED_RegexOfScirun4Format)
240240
#ifndef WIN32
241241
newline += "\r";
242242
#endif
243-
243+
244244
EXPECT_EQ("2 3 4 {8 0 2 4 }{8 0 2 0 1 }{1 3.5 -1 2 }}" + newline, contents);
245245

246246
auto rawOpt = converter.parseSparseMatrixString(contents);
247-
ASSERT_TRUE(rawOpt);
247+
ASSERT_TRUE(static_cast<bool>(rawOpt));
248248
auto raw = rawOpt.get();
249249

250250
EXPECT_EQ("2", raw.get<0>());
@@ -334,11 +334,11 @@ TEST(EigenSparseSolverTest, DISABLED_CanSolveBigSystem)
334334

335335
std::cout << A->nrows() << " x " << A->ncols() << std::endl;
336336

337-
auto b = converter.make(rhsFile.string());
337+
auto b = converter.make(rhsFile.string());
338338
ASSERT_TRUE(b.get() != nullptr);
339339
std::cout << b->nrows() << " x " << b->ncols() << std::endl;
340340
auto bCol = matrix_convert::to_column(b);
341-
341+
342342
SolveLinearSystemAlgorithm::Outputs x;
343343
{
344344
ScopedTimer t("using algorithm object");

src/Interface/Application/SCIRunMainWindow.cc

Lines changed: 43 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -78,41 +78,40 @@ using namespace SCIRun::Core::Algorithms;
7878

7979
SCIRunMainWindow::SCIRunMainWindow() : firstTimePythonShown_(true)
8080
{
81-
setupUi(this);
82-
setAttribute(Qt::WA_DeleteOnClose);
83-
if (newInterface())
84-
setStyleSheet(
85-
"background-color: rgb(66,66,69);"
86-
"color: white;"
87-
"selection-color: yellow;"
88-
"selection-background-color: blue;"
89-
//"QMenuBar::item { background-color: rgb(66,66,69); color: black }"
90-
"QToolBar { background-color: rgb(66,66,69); border: 1px solid black; color: black }"
91-
"QProgressBar { background-color: rgb(66,66,69); border: 0px solid black; color: black }"
92-
"QDockWidget {background: rgb(66,66,69); background-color: rgb(66,66,69) }"
93-
94-
//"border: 1px solid white;"
95-
//"border-radius: 3px;"
96-
"QPushButton {"
97-
" border: 2px solid #8f8f91;"
98-
" border - radius: 6px;"
99-
" background - color: qlineargradient(x1 : 0, y1 : 0, x2 : 0, y2 : 1,"
100-
" stop : 0 #f6f7fa, stop: 1 #dadbde);"
101-
" min - width: 80px;"
102-
"}"
103-
"QPushButton:pressed{"
104-
"background - color: qlineargradient(x1 : 0, y1 : 0, x2 : 0, y2 : 1,"
105-
"stop : 0 #dadbde, stop: 1 #f6f7fa);"
106-
"}"
107-
"QPushButton:flat{"
108-
" border: none; /* no border for a flat push button */"
109-
"}"
110-
"QPushButton:default {"
111-
"border - color: navy; /* make the default button prominent */"
112-
"}"
113-
);
114-
115-
dialogErrorControl_.reset(new DialogErrorControl(this));
81+
setupUi(this);
82+
setAttribute(Qt::WA_DeleteOnClose);
83+
if (newInterface())
84+
setStyleSheet(
85+
"background-color: rgb(66,66,69);"
86+
"color: white;"
87+
"selection-color: yellow;"
88+
"selection-background-color: blue;"//336699 lighter blue
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+
//"border: 1px solid white;"
93+
//"border-radius: 3px;"
94+
95+
"QPushButton {"
96+
" border: 2px solid #8f8f91;"
97+
" border - radius: 6px;"
98+
" background - color: qlineargradient(x1 : 0, y1 : 0, x2 : 0, y2 : 1,"
99+
" stop : 0 #f6f7fa, stop: 1 #dadbde);"
100+
" min - width: 80px;"
101+
"}"
102+
"QPushButton:pressed{"
103+
"background - color: qlineargradient(x1 : 0, y1 : 0, x2 : 0, y2 : 1,"
104+
"stop : 0 #dadbde, stop: 1 #f6f7fa);"
105+
"}"
106+
"QPushButton:flat{"
107+
" border: none; /* no border for a flat push button */"
108+
"}"
109+
"QPushButton:default {"
110+
"border - color: navy; /* make the default button prominent */"
111+
"}"
112+
);
113+
menubar_->setStyleSheet("QMenuBar::item::selected{background-color : rgb(66, 66, 69); } QMenuBar::item::!selected{ background-color : rgb(66, 66, 69); } ");
114+
dialogErrorControl_.reset(new DialogErrorControl(this));
116115
setupNetworkEditor();
117116

118117
setTipsAndWhatsThis();
@@ -149,7 +148,8 @@ SCIRunMainWindow::SCIRunMainWindow() : firstTimePythonShown_(true)
149148
setActionIcons();
150149

151150
QToolBar* standardBar = addToolBar("Standard");
152-
standardBar->setStyleSheet("QToolBar { background-color: rgb(66,66,69); border: 1px solid black; color: black }");
151+
standardBar->setStyleSheet("QToolBar { background-color: rgb(66,66,69); border: 1px solid black; color: black }"
152+
"QToolTip { color: #ffffff; background - color: #2a82da; border: 1px solid white; }");
153153
standardBar->setObjectName("StandardToolBar");
154154
standardBar->addAction(actionNew_);
155155
standardBar->addAction(actionLoad_);
@@ -179,7 +179,9 @@ SCIRunMainWindow::SCIRunMainWindow() : firstTimePythonShown_(true)
179179

180180
networkProgressBar_.reset(new NetworkExecutionProgressBar(this));
181181
executeBar->addActions(networkProgressBar_->actions());
182-
executeBar->setStyleSheet("QToolBar { background-color: rgb(66,66,69); border: 1px solid black; color: black }");
182+
executeBar->setStyleSheet("QToolBar { background-color: rgb(66,66,69); border: 1px solid black; color: black }"
183+
"QToolTip { color: #ffffff; background - color: #2a82da; border: 1px solid white; }"
184+
);
183185
//executeBar->setStyleSheet(styleSheet());
184186
executeBar->setAutoFillBackground(true);
185187
connect(actionExecute_All_, SIGNAL(triggered()), networkProgressBar_.get(), SLOT(resetModulesDone()));
@@ -291,7 +293,10 @@ SCIRunMainWindow::SCIRunMainWindow() : firstTimePythonShown_(true)
291293
actionModule_Selector->setChecked(!moduleSelectorDockWidget_->isHidden());
292294
actionProvenance_->setChecked(!provenanceWindow_->isHidden());
293295

294-
moduleSelectorDockWidget_->setStyleSheet("QDockWidget {background: rgb(66,66,69); background-color: rgb(66,66,69) }");
296+
moduleSelectorDockWidget_->setStyleSheet("QDockWidget {background: rgb(66,66,69); background-color: rgb(66,66,69) }"
297+
"QToolTip { color: #ffffff; background - color: #2a82da; border: 1px solid white; }"
298+
"QHeaderView::section { background: rgb(66,66,69);} "
299+
);
295300

296301
provenanceWindow_->hide();
297302

src/Interface/Modules/Base/ModuleDialogGeneric.cc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -592,4 +592,20 @@ class RadioButtonGroupSlotManager : public WidgetSlotManager
592592
void ModuleDialogGeneric::addRadioButtonGroupManager(std::initializer_list<QRadioButton*> radioButtons, const AlgorithmParameterName& stateKey)
593593
{
594594
addWidgetSlotManager(boost::make_shared<RadioButtonGroupSlotManager>(state_, *this, stateKey, radioButtons));
595+
}
596+
597+
void ModuleDialogGeneric::tabStyle(QTabWidget* tabs)
598+
{
599+
tabs->setStyleSheet(
600+
"QTabBar::tab::selected, QTabBar::tab::hover {color:black; background-color: #F0F0F0; border: 1px solid rgb(66,66,69); min-width:2ex; padding: 5px 10px;} "
601+
"QTabBar::tab:!selected {color: white; background-color: rgb(66,66,69); border: 1px solid #FFFFFF; min-width:2ex; padding: 5px 10px; }"
602+
"QTabBar::tab:selected {color:black; background-color: #F0F0F0; border: 1px solid rgb(66,66,69); min-width:2ex; padding: 5px 10px;}"
603+
);
604+
}
605+
606+
void ModuleDialogGeneric::tableHeaderStyle(QTableWidget* tableHeader)
607+
{
608+
tableHeader->setStyleSheet(
609+
"QHeaderView::section {background: rgb(66,66,69);}"
610+
);
595611
}

src/Interface/Modules/Base/ModuleDialogGeneric.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ namespace Gui {
8585
~Pulling() { m_->pulling_ = false; }
8686
ModuleDialogGeneric* m_;
8787
};
88-
88+
void tabStyle(QTabWidget* tabs);
89+
void tableHeaderStyle(QTableWidget* tableHeader);
8990
void addComboBoxManager(QComboBox* comboBox, const Core::Algorithms::AlgorithmParameterName& stateKey);
9091
void addComboBoxManager(QComboBox* comboBox, const Core::Algorithms::AlgorithmParameterName& stateKey, const GuiStringTranslationMap& stringMap);
9192
void addTextEditManager(QTextEdit* textEdit, const Core::Algorithms::AlgorithmParameterName& stateKey);

src/Interface/Modules/BrainStimulator/ElectrodeCoilSetupDialog.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ ElectrodeCoilSetupDialog::ElectrodeCoilSetupDialog(const std::string& name, Modu
4848
setWindowTitle(QString::fromStdString(name));
4949
fixSize();
5050

51+
tableHeaderStyle(this->electrode_coil_tableWidget);
52+
tabStyle(this->tabWidget);
5153
electrode_coil_tableWidget->setRowCount(1);
5254
electrode_coil_tableWidget->setColumnCount(ElectrodeCoilSetupAlgorithm::number_of_columns);
5355
electrode_coil_tableWidget->setItem(0, 0, new QTableWidgetItem(" "));

src/Interface/Modules/BrainStimulator/GenerateROIStatisticsDialog.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ GenerateROIStatisticsDialog::GenerateROIStatisticsDialog(const std::string& name
4646
setupUi(this);
4747
setWindowTitle(QString::fromStdString(name));
4848
fixSize();
49+
tabStyle(this->tabWidget);
50+
tableHeaderStyle(this->SpecifyROI_tabWidget);
51+
tableHeaderStyle(this->StatisticsOutput_tableWidget);
4952

5053
QStringList tableHeader1; /// set default GUI parameter for upper table
5154
tableHeader1<<" ROI "<<" Avr. " << " Std. " << " Min. " << " Max. " << " # ";

src/Interface/Modules/BrainStimulator/SetConductivitiesToTetMeshDialog.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ SetConductivitiesToTetMeshDialog::SetConductivitiesToTetMeshDialog(const std::st
4242
setupUi(this);
4343
setWindowTitle(QString::fromStdString(name));
4444
fixSize();
45-
45+
tabStyle(this->tabWidget);
4646
using namespace Parameters;
4747
addDoubleSpinBoxManager(Skin_, Skin);
4848
addDoubleSpinBoxManager(SoftBone_, SoftBone);

src/Interface/Modules/BrainStimulator/SetupRHSforTDCSandTMSDialog.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ SetupRHSforTDCSandTMSDialog::SetupRHSforTDCSandTMSDialog(const std::string& name
3939
setupUi(this);
4040
setWindowTitle(QString::fromStdString(name));
4141
fixSize();
42-
42+
tabStyle(this->tabWidget);
43+
tableHeaderStyle(this->electrode_tableWidget);
4344
addSpinBoxManager(refnode_, Parameters::refnode);
4445
addDoubleSpinBoxManager(pointdistancebound_, Parameters::pointdistancebound);
4546
addDoubleSpinBoxManager(normal_dot_product_bound_, Parameters::normal_dot_product_bound);

src/Interface/Modules/Forward/BuildBEMatrixDialog.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ BuildBEMatrixDialog::BuildBEMatrixDialog(const std::string& name, ModuleStateHan
5454
setupUi(this);
5555
setWindowTitle(QString::fromStdString(name));
5656
fixSize();
57-
57+
tableHeaderStyle(this->tableWidget);
5858
tableWidget->resizeColumnsToContents();
5959

6060
connect(tableWidget, SIGNAL(cellChanged(int,int)), this, SLOT(pushTable(int,int)));

src/Interface/Modules/Visualization/ShowFieldDialog.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ ShowFieldDialog::ShowFieldDialog(const std::string& name, ModuleStateHandle stat
4545
setupUi(this);
4646
setWindowTitle(QString::fromStdString(name));
4747
fixSize();
48-
48+
tabStyle(this->displayOptionsTabs_);
4949
addCheckBoxManager(showNodesCheckBox_, ShowFieldModule::ShowNodes);
5050
addCheckBoxManager(showEdgesCheckBox_, ShowFieldModule::ShowEdges);
5151
addCheckBoxManager(showFacesCheckBox_, ShowFieldModule::ShowFaces);

0 commit comments

Comments
 (0)