Skip to content
This repository has been archived by the owner on Sep 28, 2022. It is now read-only.

Commit

Permalink
Merge pull request #317 from USEPA/dev-ui-py3qt5
Browse files Browse the repository at this point in the history
MTP6r0 release
  • Loading branch information
TongZhai authored Sep 24, 2019
2 parents 3441d7c + 4d8d53a commit aa915b2
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 19 deletions.
Binary file modified src/Externals/epanet/model/epanet2_amd64.dll
Binary file not shown.
5 changes: 3 additions & 2 deletions src/Externals/epanet/outputapi/ENOutputWrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,11 +326,12 @@ def __init__(self, output_file_name):
self._raise_error(ret)
file_version = self._call_int(_lib.ENR_getVersion)
print("ENR opened {} Version {}".format(output_file_name, str(file_version)))
self._measure_new_out_value_series()
self._get_units()
self.dates = []
self.times = []
self._get_times()
if self.simDuration > 0:
self._measure_new_out_value_series()
self._get_units()
self.nodes = ENR_node_type.read_all(self)
self.links = ENR_link_type.read_all(self)
self.all_items = (self.nodes, self.links)
Expand Down
10 changes: 6 additions & 4 deletions src/core/swmm/inp_reader_sections.py
Original file line number Diff line number Diff line change
Expand Up @@ -1715,13 +1715,15 @@ def read(new_text, project):
object_name = fields[1]
tag = ' '.join(fields[2:])
sections = section_map[object_type_name]
tag_applied = False
for section in sections:
try:
candidate = section.value[object_name]
candidate = section.find_item(object_name)
if candidate:
candidate.tag = tag
tag_applied = True
break
except KeyError as ke:
print("Tag not applied: " + line + "\n")
if not tag_applied:
print("Tag not applied: " + line + "\n")


class LossesReader(SectionReader):
Expand Down
2 changes: 1 addition & 1 deletion src/ui/EPANET/frmAboutDesigner.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def retranslateUi(self, frmAbout):
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:\'MS Shell Dlg 2\'; font-size:8pt; font-weight:400; font-style:normal;\">\n"
"<p align=\"center\" style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:10pt; font-weight:600;\">Version MTP5r3</span></p>\n"
"<p align=\"center\" style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:10pt; font-weight:600;\">Version MTP6r0</span></p>\n"
"<p align=\"center\" style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:10pt; font-weight:600;\">Using Python 3.7.0</span></p>\n"
"<p align=\"center\" style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:10pt; font-weight:600;\">PyQGIS 3.6.0-Noosa</span></p>\n"
"<p align=\"center\" style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:10pt; font-weight:600;\">PyQt 5.11.3</span></p>\n"
Expand Down
2 changes: 1 addition & 1 deletion src/ui/EPANET/frmAboutDesigner.ui
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p align=&quot;center&quot; style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt; font-weight:600;&quot;&gt;Version MTP5r3&lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;center&quot; style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt; font-weight:600;&quot;&gt;Version MTP6r0&lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;center&quot; style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt; font-weight:600;&quot;&gt;Using Python 3.7.0&lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;center&quot; style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt; font-weight:600;&quot;&gt;PyQGIS 3.6.0-Noosa&lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;center&quot; style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt; font-weight:600;&quot;&gt;PyQt 5.11.3&lt;/span&gt;&lt;/p&gt;
Expand Down
2 changes: 1 addition & 1 deletion src/ui/SWMM/frmAboutDesigner.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def setupUi(self, frmAbout):
def retranslateUi(self, frmAbout):
_translate = QtCore.QCoreApplication.translate
frmAbout.setWindowTitle(_translate("frmAbout", "About SWMM"))
self.lblSwmm.setText(_translate("frmAbout", "<html><head/><body><p align=\"center\"><span style=\" font-size:14pt; font-weight:600; color:#0000ff;\">Storm Water Management Model</span></p><p align=\"center\"><span style=\" font-weight:600; color:#000000;\">Version MTP5r3 (Python 3.7, PyQGIS 3.6.0, PyQt 5.11.3)</span></p><p align=\"center\"><span style=\" font-weight:600; color:#000000;\">SWMM Engine Version 5.1.013</span></p></body></html>"))
self.lblSwmm.setText(_translate("frmAbout", "<html><head/><body><p align=\"center\"><span style=\" font-size:14pt; font-weight:600; color:#0000ff;\">Storm Water Management Model</span></p><p align=\"center\"><span style=\" font-weight:600; color:#000000;\">Version MTP6r0 (Python 3.7, PyQGIS 3.6.0, PyQt 5.11.3)</span></p><p align=\"center\"><span style=\" font-weight:600; color:#000000;\">SWMM Engine Version 5.1.013</span></p></body></html>"))
self.lblAbout.setText(_translate("frmAbout", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
Expand Down
2 changes: 1 addition & 1 deletion src/ui/SWMM/frmAboutDesigner.ui
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<item>
<widget class="QLabel" name="lblSwmm">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot; font-size:14pt; font-weight:600; color:#0000ff;&quot;&gt;Storm Water Management Model&lt;/span&gt;&lt;/p&gt;&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot; font-weight:600; color:#000000;&quot;&gt;Version MTP5r3 (Python 3.7, PyQGIS 3.6.0, PyQt 5.11.3)&lt;/span&gt;&lt;/p&gt;&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot; font-weight:600; color:#000000;&quot;&gt;SWMM Engine Version 5.1.013&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot; font-size:14pt; font-weight:600; color:#0000ff;&quot;&gt;Storm Water Management Model&lt;/span&gt;&lt;/p&gt;&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot; font-weight:600; color:#000000;&quot;&gt;Version MTP6r0 (Python 3.7, PyQGIS 3.6.0, PyQt 5.11.3)&lt;/span&gt;&lt;/p&gt;&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot; font-weight:600; color:#000000;&quot;&gt;SWMM Engine Version 5.1.013&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
Expand Down
9 changes: 4 additions & 5 deletions src/ui/SWMM/frmLID.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,11 +206,6 @@ def cmdOK_Clicked(self):
oldname = self.editing_item.name
self.editing_item.name = self.txtName.text()

if oldname != self.editing_item.name:
edited_names = []
edited_names.append((oldname, self.editing_item))
self._main_form.edited_name(edited_names)

orig_lid_type = self.editing_item.lid_type
orig_surface_layer_storage_depth = self.editing_item.surface_layer_storage_depth
orig_surface_layer_vegetative_cover_fraction = self.editing_item.surface_layer_vegetative_cover_fraction
Expand Down Expand Up @@ -385,6 +380,10 @@ def cmdOK_Clicked(self):
self._main_form.add_item(self.new_item)
self._main_form.mark_project_as_unsaved()
else:
if oldname != self.editing_item.name:
edited_names = []
edited_names.append((oldname, self.editing_item))
self._main_form.edited_name(edited_names)
pass

if orig_lid_type != self.editing_item.lid_type or \
Expand Down
11 changes: 7 additions & 4 deletions src/ui/map_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -1077,16 +1077,18 @@ def set_default_line_renderer(layer, do_labels=True):
symbol = symbol.createSimple({})
symbol.deleteSymbolLayer(0)
slayer = QgsSimpleLineSymbolLayer()
slayer.setWidth(1.0)
slayer.setColor(QColor("dark gray"))
# slayer.setWidth(1.0)
# slayer.setColor(QColor("dark gray"))
slayer.setWidth(0.2)
slayer.setColor(QColor("black"))
symbol.appendSymbolLayer(slayer)
layer_name_upper = layer.name().upper()
if "CONDUIT" in layer_name_upper or \
"PIPE" in layer_name_upper:
slayer = QgsSimpleLineSymbolLayer()
slayer.setWidth(0.5)
slayer.setColor(QColor("light gray"))
symbol.appendSymbolLayer(slayer)
# symbol.appendSymbolLayer(slayer)
renderer = QgsSingleSymbolRenderer(symbol)
layer.setRenderer(renderer)
elif "SUBLINK" in layer_name_upper:
Expand All @@ -1099,7 +1101,8 @@ def set_default_line_renderer(layer, do_labels=True):
renderer = QgsSingleSymbolRenderer(symbol)
layer.setRenderer(renderer)
else:
slayer.setWidth(1.0)
# slayer.setWidth(1.0)
slayer.setWidth(0.2)
slayer = QgsMarkerLineSymbolLayer(True, 1.5)
mlayer = slayer.subSymbol()
anewlayer = None
Expand Down

0 comments on commit aa915b2

Please sign in to comment.