Skip to content

Commit

Permalink
Tool tips #200
Browse files Browse the repository at this point in the history
  • Loading branch information
KellyMWhitehead authored and philipbaileynar committed Sep 20, 2024
1 parent a28e6eb commit 22ad310
Show file tree
Hide file tree
Showing 19 changed files with 85 additions and 41 deletions.
4 changes: 4 additions & 0 deletions src/view/frm_analysis_explorer.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,27 +277,31 @@ def setupUi(self):

self.cmbAnalysisType = QtWidgets.QComboBox()
self.cmbAnalysisType.setEnabled(False)
self.cmbAnalysisType.setToolTip('Select the type of analysis to perform, either a sample frame metric over time or a metric across a riverscape')
self.grid.addWidget(self.cmbAnalysisType, 1, 1)

self.lblMetric = QtWidgets.QLabel('Metric')
self.grid.addWidget(self.lblMetric, 2, 0)

self.cmbMetric = QtWidgets.QComboBox()
self.cmbMetric.setEnabled(False)
self.cmbMetric.setToolTip('Select the metric to display')
self.grid.addWidget(self.cmbMetric, 2, 1)

self.lblEvent = QtWidgets.QLabel('Event')
self.grid.addWidget(self.lblEvent, 3, 0)

self.cmbEvent = QtWidgets.QComboBox()
self.cmbEvent.setEnabled(False)
self.cmbEvent.setToolTip('Select the Data Capture Event to display')
self.grid.addWidget(self.cmbEvent, 3, 1)

self.lblSampleFrameFeature = QtWidgets.QLabel('Sample Frame Feature')
self.grid.addWidget(self.lblSampleFrameFeature, 5, 0)

self.cmbSampleFrameFeature = QtWidgets.QComboBox()
self.cmbSampleFrameFeature.setEnabled(False)
self.cmbSampleFrameFeature.setToolTip('Select the sample frame feature to display')
self.grid.addWidget(self.cmbSampleFrameFeature, 5, 1)

self.plot = FigureCanvas(Figure())
Expand Down
3 changes: 3 additions & 0 deletions src/view/frm_analysis_units.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ def setupUI(self):
self.grid.addWidget(self.lblDistanceUnits , 0, 0, 1, 1)

self.cmbDistanceUnits = QComboBox()
self.cmbDistanceUnits.setToolTip('Display Units for distance measurements')
self.cmbDistanceUnits.addItems([unit for unit in distance_units])
self.cmbDistanceUnits.setCurrentText(self.analysis.units['distance'])
self.grid.addWidget(self.cmbDistanceUnits, 0, 1, 1, 1)
Expand All @@ -42,6 +43,7 @@ def setupUI(self):
self.grid.addWidget(self.lblAreaUnits , 1, 0, 1, 1)

self.cmbAreaUnits = QComboBox()
self.cmbAreaUnits.setToolTip('Display Units for area measurements')
self.cmbAreaUnits.addItems([unit for unit in area_units])
self.cmbAreaUnits.setCurrentText(self.analysis.units['area'])
self.grid.addWidget(self.cmbAreaUnits, 1, 1, 1, 1)
Expand All @@ -50,6 +52,7 @@ def setupUI(self):
self.grid.addWidget(self.lblRatioUnits , 2, 0, 1, 1)

self.cmbRatioUnits = QComboBox()
self.cmbRatioUnits.setToolTip('Display Units for ratio measurements')
self.cmbRatioUnits.addItems([unit for unit in ratio_units])
self.cmbRatioUnits.setCurrentText(self.analysis.units['ratio'])
self.grid.addWidget(self.cmbRatioUnits, 2, 1, 1, 1)
Expand Down
2 changes: 2 additions & 0 deletions src/view/frm_asbuilt.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def __init__(self, parent, qris_project: Project, event_type_id: int, event: Eve
self.tabGrid.addWidget(self.lblAssociatedDesign, 1, 0)

self.cboAssociatedDesign = QtWidgets.QComboBox(self)
self.cboAssociatedDesign.setToolTip('Select the design that this as-built is based on.')
self.tabGrid.addWidget(self.cboAssociatedDesign, 1, 1, 1, 1)
designs:dict = {design_id: design for design_id, design in qris_project.events.items() if design.event_type.id == DESIGN_EVENT_TYPE_ID}
designs[0] = DBItem('', 0, 'None')
Expand Down Expand Up @@ -59,6 +60,7 @@ def __init__(self, parent, qris_project: Project, event_type_id: int, event: Eve
self.tabGrid.setAlignment(self.lblDesigners, QtCore.Qt.AlignTop)

self.txtDesigners = QtWidgets.QPlainTextEdit(self)
self.txtDesigners.setToolTip('Enter the name(s) of the person(s) who observed the as-built survey.')
self.tabGrid.addWidget(self.txtDesigners, 8, 1, 1, 1)

# Create a checkbox widget for each design source
Expand Down
22 changes: 12 additions & 10 deletions src/view/frm_basemap.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,52 +287,52 @@ def setupUi(self):
self.tabs.addTab(self.tabProperties, 'Basic Properties')
self.tabProperties.setLayout(self.grid)

self.lblName = QtWidgets.QLabel()
self.lblName.setText('Name')
self.lblName = QtWidgets.QLabel('Name')
self.grid.addWidget(self.lblName, 0, 0, 1, 1)

self.txtName = QtWidgets.QLineEdit()
self.txtName.setToolTip('Name of the raster data')
self.txtName.setMaxLength(255)
self.grid.addWidget(self.txtName, 0, 1, 1, 1)

self.lblSourcePath = QtWidgets.QLabel()
self.lblSourcePath.setText('Source Path')
self.lblSourcePath = QtWidgets.QLabel('Source Path')
self.grid.addWidget(self.lblSourcePath, 1, 0, 1, 1)

self.txtSourcePath = QtWidgets.QLineEdit()
self.txtSourcePath.setReadOnly(True)
self.grid.addWidget(self.txtSourcePath, 1, 1, 1, 1)

self.lblRasterType = QtWidgets.QLabel()
self.lblRasterType.setText('Raster Type')
self.lblRasterType = QtWidgets.QLabel('Raster Type')
self.grid.addWidget(self.lblRasterType, 2, 0, 1, 1)

self.cboRasterType = QtWidgets.QComboBox()
self.cboRasterType.setToolTip('Type of raster data')
self.grid.addWidget(self.cboRasterType, 2, 1, 1, 1)

self.lblRasterSource = QtWidgets.QLabel('Raster Source')
self.grid.addWidget(self.lblRasterSource, 3, 0, 1, 1)

self.cboRasterSource = QtWidgets.QComboBox()
self.cboRasterSource.setToolTip('Source of the raster data. Use the dropdown to select from existing sources or type a new source.')
self.cboRasterSource.setEditable(True)
self.grid.addWidget(self.cboRasterSource, 3, 1, 1, 1)

self.lblProjectPath = QtWidgets.QLabel()
self.lblProjectPath.setText('Project Path')
self.lblProjectPath = QtWidgets.QLabel('Project Path')
self.grid.addWidget(self.lblProjectPath, 4, 0, 1, 1)

self.txtProjectPath = QtWidgets.QLineEdit()
self.txtProjectPath.setReadOnly(True)
self.grid.addWidget(self.txtProjectPath, 4, 1, 1, 1)

self.lblMask = QtWidgets.QLabel()
self.lblMask.setText('Clip to AOI')
self.lblMask = QtWidgets.QLabel('Clip to AOI')
self.grid.addWidget(self.lblMask, 5, 0, 1, 1)

self.cboMask = QtWidgets.QComboBox()
self.cboMask.setToolTip('Optionally clip the raster to the selected area of interest')
self.grid.addWidget(self.cboMask, 5, 1, 1, 1)

self.chkHillshade = QtWidgets.QCheckBox('Create Hillshade')
self.chkHillshade.setToolTip('Create a hillshade raster from the DEM')
self.chkHillshade.setChecked(False)
self.chkHillshade.setEnabled(False)
self.grid.addWidget(self.chkHillshade, 6, 1, 1, 1)
Expand All @@ -344,13 +344,15 @@ def setupUi(self):
self.grid.addLayout(self.horiz_date, 7, 1, 1, 2)

self.txtDate = ClickableDateEdit()
self.txtDate.setToolTip('Date the raster data was captured')
self.txtDate.setMinimumDate(QtCore.QDate(1900, 1, 1))
self.txtDate.setSpecialValueText("No Date")
self.txtDate.setDate(self.txtDate.minimumDate())
self.txtDate.setCalendarPopup(True)
self.horiz_date.addWidget(self.txtDate)

self.btn_clear_date = QtWidgets.QPushButton('Clear')
self.btn_clear_date.setToolTip('Clear the acquisition date')
self.btn_clear_date.clicked.connect(self.on_clear_date_clicked)
# make button size pushed to the right
self.btn_clear_date.setSizePolicy(QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Maximum))
Expand Down
12 changes: 9 additions & 3 deletions src/view/frm_calculate_all_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,21 @@ def setupUi(self):
# Groupbox named "Data Capture Events" with radio buttons for "just the currently active DCE" or "All Data Capture Events"
self.grpDCE = QtWidgets.QGroupBox('Data Capture Events')
self.rdoActiveDCE = QtWidgets.QRadioButton('Just the currently active DCE')
self.rdoActiveDCE.setToolTip('Only the currently active Data Capture Event will be processed')
self.rdoAllDCE = QtWidgets.QRadioButton('All Data Capture Events')
self.rdoAllDCE.setToolTip('All Data Capture Events will be processed')
self.rdoActiveDCE.setChecked(True)
self.grpDCE.setLayout(QtWidgets.QVBoxLayout())
self.grpDCE.layout().addWidget(self.rdoActiveDCE)
self.grpDCE.layout().addWidget(self.rdoAllDCE)
self.vert.addWidget(self.grpDCE)

# groupbox named Sampling Frames with radio buttons for "just the currently active SF" or "All Sampling Frames"
self.grpSF = QtWidgets.QGroupBox('Sampling Frames')
# groupbox named Sampling Frames with radio buttons for "just the currently active SF" or "All Sample Frames"
self.grpSF = QtWidgets.QGroupBox('Sample Frames')
self.rdoActiveSF = QtWidgets.QRadioButton('Just the currently active SF')
self.rdoAllSF = QtWidgets.QRadioButton('All Sampling Frames')
self.rdoActiveSF.setToolTip('Only the currently active Sample Frame will be processed')
self.rdoAllSF = QtWidgets.QRadioButton('All Sample Frames')
self.rdoAllSF.setToolTip('All Sample Frames will be processed')
self.rdoActiveSF.setChecked(True)
self.grpSF.setLayout(QtWidgets.QVBoxLayout())
self.grpSF.layout().addWidget(self.rdoActiveSF)
Expand All @@ -46,7 +50,9 @@ def setupUi(self):
# groupbox named metric values with check boxes for "overwrite any existing autmated values" and "force automated values to be the active values"
self.grpMetricValues = QtWidgets.QGroupBox('Metric Values')
self.chkOverwrite = QtWidgets.QCheckBox('Overwrite any existing automated values')
self.chkOverwrite.setToolTip('If this is checked, any existing automated values will be overwritten')
self.chkForceActive = QtWidgets.QCheckBox('Force automated values to be the active values')
self.chkForceActive.setToolTip('If this is checked, all of the automated values will be set as the active values')
self.grpMetricValues.setLayout(QtWidgets.QVBoxLayout())
self.grpMetricValues.layout().addWidget(self.chkOverwrite)
self.grpMetricValues.layout().addWidget(self.chkForceActive)
Expand Down
3 changes: 3 additions & 0 deletions src/view/frm_cross_sections.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,19 +212,22 @@ def setupUi(self):
self.grid.addWidget(self.lblName, 0, 0, 1, 1)

self.txtName = QtWidgets.QLineEdit()
self.txtName.setToolTip('Name of the cross sections layer')
self.txtName.setMaxLength(255)
self.grid.addWidget(self.txtName, 0, 1, 1, 1)

self.lblAttribute = QtWidgets.QLabel('Display Label Attribute')
self.grid.addWidget(self.lblAttribute, 1, 0, 1, 1)

self.cboAttribute = QtWidgets.QComboBox()
self.cboAttribute.setToolTip('Attribute to use as the display label for the cross sections')
self.grid.addWidget(self.cboAttribute, 1, 1, 1, 1)

self.lblMaskClip = QtWidgets.QLabel('Clip to AOI/Valley Bottom')
self.grid.addWidget(self.lblMaskClip, 2, 0, 1, 1)

self.cboMaskClip = QtWidgets.QComboBox()
self.cboMaskClip.setToolTip('Optionally clip the cross sections to the selected AOI or Valley Bottom')
self.grid.addWidget(self.cboMaskClip, 2, 1, 1, 1)

self.lblDescription = QtWidgets.QLabel('Description')
Expand Down
3 changes: 3 additions & 0 deletions src/view/frm_design2.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def __init__(self, parent, qris_project: Project, event_type_id: int, event: Eve
self.txtDateLabel.setVisible(False)

self.lblPercentComplete = QtWidgets.QLabel('Percent Complete', self)
self.lblPercentComplete.setToolTip('The percentage of the design that has been completed')
self.tabGrid.addWidget(self.lblPercentComplete, 7, 0)

self.horiz_slider = QtWidgets.QHBoxLayout()
Expand Down Expand Up @@ -61,6 +62,7 @@ def __init__(self, parent, qris_project: Project, event_type_id: int, event: Eve

statuses = {key: DBItem('', key, value) for key, value in enumerate(['In Progress', 'Provisional (awaiting review)', 'Final'])}
self.cboStatus = QtWidgets.QComboBox(self)
self.cboStatus.setToolTip('The status of the design')
self.status_model = DBItemModel(statuses)
self.cboStatus.setModel(self.status_model)
self.tabGrid.addWidget(self.cboStatus, 8, 1, 1, 1)
Expand All @@ -70,6 +72,7 @@ def __init__(self, parent, qris_project: Project, event_type_id: int, event: Eve
self.tabGrid.addWidget(self.lblDesigners, 9, 0, 1, 1)

self.txtDesigners = QtWidgets.QPlainTextEdit(self)
self.txtDesigners.setToolTip('The name of the designer(s) of the design')
self.tabGrid.addWidget(self.txtDesigners, 9, 1, 1, 1)

# Create a checkbox widget for each design source
Expand Down
3 changes: 3 additions & 0 deletions src/view/frm_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,10 +281,12 @@ def setupUi(self):
self.txtPhase.setVisible(False)

self.optSingleDate = QtWidgets.QRadioButton('Single Point in Time')
self.setToolTip('Select this option if the event occurred at a single point in time.')
self.optSingleDate.setChecked(True)
self.tabGrid.addWidget(self.optSingleDate, 3, 0, 1, 1)

self.optDateRange = QtWidgets.QRadioButton('Date Range')
self.setToolTip('Select this option if the event occurred over a range of dates.')
self.tabGrid.addWidget(self.optDateRange, 4, 0, 1, 1)

self.lblStartDate = QtWidgets.QLabel()
Expand Down Expand Up @@ -314,6 +316,7 @@ def setupUi(self):
self.tabGrid.addWidget(self.lblDateLabel, 7, 0, 1, 1)

self.txtDateLabel = QtWidgets.QLineEdit()
self.txtDateLabel.setPlaceholderText('Optional lable to express what the date represents.')
self.tabGrid.addWidget(self.txtDateLabel, 7, 1, 1, 1)

# self.lblRepresentation = QtWidgets.QLabel("Representation")
Expand Down
13 changes: 10 additions & 3 deletions src/view/frm_export_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,17 +132,21 @@ def setupUi(self):
# Groupbox named "Data Capture Events" with radio buttons for "just the currently active DCE" or "All Data Capture Events"
self.grpDCE = QtWidgets.QGroupBox('Data Capture Events')
self.rdoActiveDCE = QtWidgets.QRadioButton('Just the currently active Data Capture Event')
self.rdoActiveDCE.setToolTip('Export metrics for the only currently active Data Capture Event')
self.rdoAllDCE = QtWidgets.QRadioButton('All Data Capture Events')
self.rdoAllDCE.setToolTip('Export metrics for all Data Capture Events in the project')
self.rdoActiveDCE.setChecked(True)
self.grpDCE.setLayout(QtWidgets.QVBoxLayout())
self.grpDCE.layout().addWidget(self.rdoActiveDCE)
self.grpDCE.layout().addWidget(self.rdoAllDCE)
self.vert.addWidget(self.grpDCE)

# groupbox named Sampling Frames with radio buttons for "just the currently active SF" or "All Sampling Frames"
self.grpSF = QtWidgets.QGroupBox('Sampling Frames')
self.rdoActiveSF = QtWidgets.QRadioButton('Just the currently active Sampling Frame')
self.rdoAllSF = QtWidgets.QRadioButton('All Sampling Frames')
self.grpSF = QtWidgets.QGroupBox('Sample Frames')
self.rdoActiveSF = QtWidgets.QRadioButton('Just the currently active Sample Frame')
self.rdoActiveSF.setToolTip('Export metrics for the only currently active Sample Frame')
self.rdoAllSF = QtWidgets.QRadioButton('All Sample Frames')
self.rdoAllSF.setToolTip('Export metrics for all Sample Frames in the project')
self.rdoActiveSF.setChecked(True)
self.grpSF.setLayout(QtWidgets.QVBoxLayout())
self.grpSF.layout().addWidget(self.rdoActiveSF)
Expand All @@ -161,6 +165,7 @@ def setupUi(self):

# drop down for export format
self.combo_format = QtWidgets.QComboBox()
self.combo_format.setToolTip("Select the format to export the metrics table")
self.combo_format.addItems(["CSV", "JSON", "Excel"])
self.combo_format.currentTextChanged.connect(self.format_change)
self.horiz_format.addWidget(self.combo_format)
Expand All @@ -177,11 +182,13 @@ def setupUi(self):

# line edit for export location
self.txtOutpath = QtWidgets.QLineEdit()
self.txtOutpath.setToolTip("Specify the location to save the exported metrics table")
self.txtOutpath.setReadOnly(True)
self.horizOutput.addWidget(self.txtOutpath)

# button for export location
self.btn_location = QtWidgets.QPushButton("...")
self.btn_location.setToolTip("Browse to the directory to save the exported metrics table")
self.btn_location.clicked.connect(self.browse_path)
self.horizOutput.addWidget(self.btn_location)

Expand Down
1 change: 1 addition & 0 deletions src/view/frm_field_value_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ def setupUi(self):

# text box for field name
self.txtField = QtWidgets.QLineEdit()
self.txtField.setToolTip('The field from the input file to map values for')
self.txtField.setReadOnly(True)
self.hLayout.addWidget(self.txtField)

Expand Down
14 changes: 7 additions & 7 deletions src/view/frm_mask_aoi.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,29 +198,29 @@ def setupUi(self):

self.grid = QtWidgets.QGridLayout()

self.lblName = QtWidgets.QLabel()
self.lblName.setText('Name')
self.lblName = QtWidgets.QLabel('Name')
self.grid.addWidget(self.lblName, 0, 0, 1, 1)

self.txtName = QtWidgets.QLineEdit()
self.txtName.setToolTip('The name of the AOI or Sample Frame')
self.txtName.setMaxLength(255)
self.grid.addWidget(self.txtName, 0, 1, 1, 1)

self.lblAttribute = QtWidgets.QLabel('Sample Frame Labels')
self.grid.addWidget(self.lblAttribute, 1, 0, 1, 1)

self.cboAttribute = QtWidgets.QComboBox()
self.cboAttribute.setToolTip('The attribute field to use for labeling the Sample Frames')
self.grid.addWidget(self.cboAttribute, 1, 1, 1, 1)

self.lblMaskClip = QtWidgets.QLabel()
self.lblMaskClip.setText('Clip to AOI')
self.lblMaskClip = QtWidgets.QLabel('Clip to AOI')
self.grid.addWidget(self.lblMaskClip, 2, 0, 1, 1)

self.cboMaskClip = QtWidgets.QComboBox()
self.cboMaskClip.setToolTip('Clip the AOI to the boundary of another AOI')
self.grid.addWidget(self.cboMaskClip, 2, 1, 1, 1)

self.lblDescription = QtWidgets.QLabel()
self.lblDescription.setText('Description')
self.lblDescription = QtWidgets.QLabel('Description')
self.grid.addWidget(self.lblDescription, 3, 0, 1, 1)

self.txtDescription = QtWidgets.QPlainTextEdit()
Expand All @@ -238,5 +238,5 @@ def setupUi(self):
self.chkAddToMap.setText('Add to Map')
self.grid.addWidget(self.chkAddToMap, 4, 1, 1, 1)

help = 'aoi' if self.mask_type.id == AOI_MASK_TYPE_ID else 'sampling-frames'
help = 'aoi' if self.mask_type.id == AOI_MASK_TYPE_ID else 'sample-frames'
self.vert.addLayout(add_standard_form_buttons(self, help))
6 changes: 2 additions & 4 deletions src/view/frm_new_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,10 @@ def setupUi(self):
self.grid.addWidget(self.lblTags, 2, 0, 1, 1)

self.txtTags = QtWidgets.QLineEdit()
self.toolTip = "Comma separated list of tags for the project"
self.txtTags.setToolTip(self.toolTip)
self.txtTags.setToolTip("Comma separated list of tags for the project")
self.grid.addWidget(self.txtTags, 2, 1, 1, 1)

self.lblDescription = QtWidgets.QLabel()
self.lblDescription.setText('Description')
self.lblDescription = QtWidgets.QLabel('Description')
self.grid.addWidget(self.lblDescription, 3, 0, 1, 1)

self.txtDescription = QtWidgets.QPlainTextEdit()
Expand Down
1 change: 1 addition & 0 deletions src/view/frm_planning_container.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ def setupUi(self):
self.grid.addWidget(self.lblName, 0, 0, 1, 1)

self.txtName = QtWidgets.QLineEdit()
self.txtName.setToolTip('The name of the planning container')
self.txtName.setMaxLength(255)
self.grid.addWidget(self.txtName, 0, 1, 1, 1)

Expand Down
1 change: 1 addition & 0 deletions src/view/frm_pour_point.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ def setupUi(self):
self.grid.addWidget(self.lblName, 0, 0, 1, 1)

self.txtName = QtWidgets.QLineEdit()
self.txtName.setToolTip('The name of the catchment')
self.txtName.setMaxLength(255)
self.grid.addWidget(self.txtName, 0, 1, 1, 1)

Expand Down
Loading

0 comments on commit 22ad310

Please sign in to comment.