Skip to content

Commit

Permalink
Various UI improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
aliaksei135 committed Mar 1, 2021
1 parent e8c2574 commit a0962c9
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 11 deletions.
2 changes: 1 addition & 1 deletion seedpod_ground_risk/layers/geojson_layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def annotate(self, data: List[gpd.GeoDataFrame], raster_data: Tuple[Dict[str, np
gv.Contours(self.dataframe).opts(line_width=4, line_color='magenta'),
gv.Polygons(self.buffer_poly).opts(style={'alpha': 0.3, 'color': 'cyan'}),
# Add the path stats as a text annotation to the final path point
gv.Text(self.endpoint[0], self.endpoint[1], label_str),
gv.Text(self.endpoint[0], self.endpoint[1], label_str, fontsize=20).opts(style={'color': 'blue'}),
*annotation_layers
])
else:
Expand Down
2 changes: 1 addition & 1 deletion seedpod_ground_risk/ui_resources/layerListDelegate.ui
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
</size>
</property>
<property name="text">
<string>data tag</string>
<string/>
</property>
</widget>
</item>
Expand Down
5 changes: 3 additions & 2 deletions seedpod_ground_risk/ui_resources/layerlistdelegate.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ def setupUi(self, delegate):

self.verticalLayout.addWidget(self.dataTagLabel)


self.horizontalLayout.addLayout(self.verticalLayout)

self.horizontalSpacer = QSpacerItem(178, 20, QSizePolicy.Expanding, QSizePolicy.Minimum)
Expand All @@ -80,12 +81,12 @@ def setupUi(self, delegate):
self.retranslateUi(delegate)

QMetaObject.connectSlotsByName(delegate)

# setupUi

def retranslateUi(self, delegate):
delegate.setWindowTitle(QCoreApplication.translate("delegate", u"Form", None))
self.nameLabel.setText(QCoreApplication.translate("delegate", u"Key", None))
self.dataTagLabel.setText(QCoreApplication.translate("delegate", u"data tag", None))
self.dataTagLabel.setText("")
self.pushButton.setText("")
# retranslateUi

11 changes: 8 additions & 3 deletions seedpod_ground_risk/ui_resources/main.ui
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,19 @@
<property name="minimumSize">
<size>
<width>405</width>
<height>500</height>
<height>490</height>
</size>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="topMargin">
<number>5</number>
</property>
<property name="bottomMargin">
<number>5</number>
</property>
<item>
<widget class="QPushButton" name="addLayerButton">
<property name="text">
Expand Down Expand Up @@ -138,7 +144,6 @@
<addaction name="actionAbout_App"/>
<addaction name="actionAbout_Static_Sources"/>
<addaction name="separator"/>
<addaction name="actionImport"/>
<addaction name="actionExport"/>
<addaction name="separator"/>
<addaction name="actionGenerate"/>
Expand All @@ -151,7 +156,7 @@
</action>
<action name="actionExport">
<property name="text">
<string>Export</string>
<string>Export .png</string>
</property>
</action>
<action name="actionAbout_Static_Sources">
Expand Down
9 changes: 5 additions & 4 deletions seedpod_ground_risk/ui_resources/mainwindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,19 @@ def setupUi(self, MainWindow):
self.listWidget.setEnabled(False)
sizePolicy.setHeightForWidth(self.listWidget.sizePolicy().hasHeightForWidth())
self.listWidget.setSizePolicy(sizePolicy)
self.listWidget.setMinimumSize(QSize(405, 500))
self.listWidget.setMinimumSize(QSize(405, 490))

self.verticalLayout.addWidget(self.listWidget)

self.horizontalLayout = QHBoxLayout()
self.horizontalLayout.setObjectName(u"horizontalLayout")
self.horizontalLayout.setContentsMargins(-1, 5, -1, 5)
self.addLayerButton = QPushButton(self.verticalLayoutWidget)
self.addLayerButton.setObjectName(u"addLayerButton")

self.horizontalLayout.addWidget(self.addLayerButton)


self.verticalLayout.addLayout(self.horizontalLayout)

self.splitter.addWidget(self.verticalLayoutWidget)
Expand All @@ -96,7 +98,6 @@ def setupUi(self, MainWindow):
self.toolBar.addAction(self.actionAbout_App)
self.toolBar.addAction(self.actionAbout_Static_Sources)
self.toolBar.addSeparator()
self.toolBar.addAction(self.actionImport)
self.toolBar.addAction(self.actionExport)
self.toolBar.addSeparator()
self.toolBar.addAction(self.actionGenerate)
Expand All @@ -110,14 +111,14 @@ def setupUi(self, MainWindow):
def retranslateUi(self, MainWindow):
MainWindow.setWindowTitle(QCoreApplication.translate("MainWindow", u"SEEDPOD Ground Risk", None))
self.actionImport.setText(QCoreApplication.translate("MainWindow", u"Import", None))
self.actionExport.setText(QCoreApplication.translate("MainWindow", u"Export", None))
self.actionExport.setText(QCoreApplication.translate("MainWindow", u"Export .png", None))
self.actionAbout_Static_Sources.setText(QCoreApplication.translate("MainWindow", u"About Static Data", None))
self.actionAbout_App.setText(QCoreApplication.translate("MainWindow", u"About App", None))
self.actionRasterise.setText(QCoreApplication.translate("MainWindow", u"Rasterise", None))
self.actionGenerate.setText(QCoreApplication.translate("MainWindow", u"Generate", None))
# if QT_CONFIG(tooltip)
self.actionGenerate.setToolTip(QCoreApplication.translate("MainWindow", u"Generate Map for current view", None))
# endif // QT_CONFIG(tooltip)
#endif // QT_CONFIG(tooltip)
self.addLayerButton.setText(QCoreApplication.translate("MainWindow", u"Add Layer", None))
self.toolBar.setWindowTitle(QCoreApplication.translate("MainWindow", u"toolBar", None))
# retranslateUi
Expand Down

0 comments on commit a0962c9

Please sign in to comment.