Skip to content

Commit

Permalink
sync intervals; fix deleted substrate for Rules; new ICs
Browse files Browse the repository at this point in the history
  • Loading branch information
rheiland committed Aug 15, 2023
1 parent e83cfd4 commit e7b222a
Show file tree
Hide file tree
Showing 5 changed files with 607 additions and 46 deletions.
34 changes: 34 additions & 0 deletions bin/config_tab.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ def __init__(self, studio_flag):

self.xml_root = None

self.sync_output = True

qlineedit_style = """
QLineEdit: disabled {
background-color:#ff0000;
Expand Down Expand Up @@ -318,6 +320,7 @@ def __init__(self, studio_flag):
self.svg_interval = QLineEdit()
self.svg_interval.setFixedWidth(100)
self.svg_interval.setValidator(QtGui.QDoubleValidator())
self.svg_interval.textChanged.connect(self.svg_interval_changed)
icol += 1
# self.config_tab_layout.addWidget(self.svg_interval, idx_row,icol,1,1) # w, row, column, rowspan, colspan
hbox.addWidget(self.svg_interval)
Expand Down Expand Up @@ -345,6 +348,7 @@ def __init__(self, studio_flag):
self.full_interval = QLineEdit()
self.full_interval.setFixedWidth(100)
self.full_interval.setValidator(QtGui.QDoubleValidator())
self.full_interval.textChanged.connect(self.full_interval_changed)
icol += 1
# self.config_tab_layout.addWidget(self.full_interval, idx_row,icol,1,1) # w, row, column, rowspan, colspan
hbox.addWidget(self.full_interval)
Expand All @@ -354,6 +358,17 @@ def __init__(self, studio_flag):
# self.config_tab_layout.addWidget(label, idx_row,icol,1,1) # w, row, column, rowspan, colspan
hbox.addWidget(label)

#------
label = QLabel(" ")
hbox.addWidget(label)

self.sync_svg_mat = QCheckBox_custom("Sync")
self.sync_svg_mat.setFixedWidth(cbox_width)
self.sync_svg_mat.setChecked(self.sync_output)
self.sync_svg_mat.clicked.connect(self.sync_clicked)
hbox.addWidget(self.sync_svg_mat)

#------
hbox.addStretch()
vbox.addLayout(hbox)

Expand Down Expand Up @@ -484,13 +499,32 @@ def svg_clicked(self, bval):
else:
self.svg_interval.setStyleSheet("background-color: lightgray; color: black")

def svg_interval_changed(self, val):
# print("svg_interval_changed(): val=",val)
if self.sync_output:
self.full_interval.setText(val)

def full_clicked(self, bval):
self.full_interval.setEnabled(bval)
if bval:
self.full_interval.setStyleSheet("background-color: white; color: black")
else:
self.full_interval.setStyleSheet("background-color: lightgray; color: black")

def full_interval_changed(self, val):
# print("full_interval_changed(): val=",val)
if self.sync_output:
self.svg_interval.setText(val)

def sync_clicked(self, bval):
self.sync_output = bval

if bval:
if self.save_svg.isChecked():
self.full_interval.setText(self.svg_interval.text())
else:
self.svg_interval.setText(self.full_interval.text())

def cells_csv_clicked(self, bval):
self.csv_folder.setEnabled(bval)
if self.nanohub_flag:
Expand Down
Loading

0 comments on commit e7b222a

Please sign in to comment.