From 09e7250ed8631580457307e13c9926118a0e4763 Mon Sep 17 00:00:00 2001
From: Merydian
Date: Wed, 27 Sep 2023 12:26:32 +0200
Subject: [PATCH] Run pre commit
---
ohsomeTools/gui/OhsomeToolsDialog.py | 27 +-
ohsomeTools/gui/OhsomeToolsDialogUI.py | 621 +++++++++++++++++++------
2 files changed, 506 insertions(+), 142 deletions(-)
diff --git a/ohsomeTools/gui/OhsomeToolsDialog.py b/ohsomeTools/gui/OhsomeToolsDialog.py
index 05645cc..54f06b4 100644
--- a/ohsomeTools/gui/OhsomeToolsDialog.py
+++ b/ohsomeTools/gui/OhsomeToolsDialog.py
@@ -45,7 +45,7 @@
QgsTask,
QgsApplication,
QgsWkbTypes,
- QgsVectorLayer
+ QgsVectorLayer,
)
from qgis.core import (
QgsProject,
@@ -215,7 +215,6 @@ def unload(self):
QApplication.restoreOverrideCursor()
del self.dlg
-
def _init_gui_control(self):
"""Slot for main plugin button. Initializes the GUI and shows it."""
@@ -251,8 +250,18 @@ def _init_gui_control(self):
layers = QgsProject.instance().mapLayers().values()
# Filter layers to include only polygon and point layers
- geomTypes = (QgsWkbTypes.Point, QgsWkbTypes.MultiPoint, QgsWkbTypes.Polygon, QgsWkbTypes.MultiPolygon)
- polygon_and_point_layers = [layer for layer in layers if isinstance(layer, QgsVectorLayer) and layer.wkbType() in geomTypes]
+ geomTypes = (
+ QgsWkbTypes.Point,
+ QgsWkbTypes.MultiPoint,
+ QgsWkbTypes.Polygon,
+ QgsWkbTypes.MultiPolygon,
+ )
+ polygon_and_point_layers = [
+ layer
+ for layer in layers
+ if isinstance(layer, QgsVectorLayer)
+ and layer.wkbType() in geomTypes
+ ]
# Add the names of polygon and point layers to the combo box
for layer in polygon_and_point_layers:
@@ -368,7 +377,9 @@ def run_gui_control(self):
else:
globals()[task_name] = task
last_task = task
- self.dlg.debug_text.append(f'> cURL: {preferences.cURL(provider)}')
+ self.dlg.debug_text.append(
+ f"> cURL: {preferences.cURL(provider)}"
+ )
QgsApplication.taskManager().addTask(globals()[task_name])
elif wkbType in (QgsWkbTypes.Polygon, QgsWkbTypes.MultiPolygon):
self.dlg.global_buttons.button(QDialogButtonBox.Ok).setDisabled(
@@ -402,7 +413,9 @@ def run_gui_control(self):
else:
globals()[task_name] = task
last_task = task
- self.dlg.debug_text.append(f'> cURL: {preferences.cURL(provider)}')
+ self.dlg.debug_text.append(
+ f"> cURL: {preferences.cURL(provider)}"
+ )
QgsApplication.taskManager().addTask(globals()[task_name])
else:
@@ -421,7 +434,7 @@ def run_gui_control(self):
)
self.dlg.global_buttons.button(QDialogButtonBox.Ok).setEnabled(True)
except Exception as e:
- msg = f'{e.__class__.__name__} {str(e)}'
+ msg = f"{e.__class__.__name__} {str(e)}"
logger.log("{}: {}".format(*msg), 2)
self.dlg.debug_text.append(msg)
self.iface.messageBar().pushMessage(
diff --git a/ohsomeTools/gui/OhsomeToolsDialogUI.py b/ohsomeTools/gui/OhsomeToolsDialogUI.py
index 7730799..96ce407 100644
--- a/ohsomeTools/gui/OhsomeToolsDialogUI.py
+++ b/ohsomeTools/gui/OhsomeToolsDialogUI.py
@@ -15,10 +15,14 @@ class Ui_OhsomeToolsDialogBase(object):
def setupUi(self, OhsomeToolsDialogBase):
OhsomeToolsDialogBase.setObjectName("OhsomeToolsDialogBase")
OhsomeToolsDialogBase.resize(568, 542)
- sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed)
+ sizePolicy = QtWidgets.QSizePolicy(
+ QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed
+ )
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(OhsomeToolsDialogBase.sizePolicy().hasHeightForWidth())
+ sizePolicy.setHeightForWidth(
+ OhsomeToolsDialogBase.sizePolicy().hasHeightForWidth()
+ )
OhsomeToolsDialogBase.setSizePolicy(sizePolicy)
OhsomeToolsDialogBase.setMinimumSize(QtCore.QSize(0, 0))
OhsomeToolsDialogBase.setMaximumSize(QtCore.QSize(16777215, 16777215))
@@ -30,24 +34,34 @@ def setupUi(self, OhsomeToolsDialogBase):
self.global_buttons = QtWidgets.QDialogButtonBox(OhsomeToolsDialogBase)
self.global_buttons.setEnabled(True)
self.global_buttons.setOrientation(QtCore.Qt.Horizontal)
- self.global_buttons.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
+ self.global_buttons.setStandardButtons(
+ QtWidgets.QDialogButtonBox.Cancel | QtWidgets.QDialogButtonBox.Ok
+ )
self.global_buttons.setObjectName("global_buttons")
self.gridLayout_17.addWidget(self.global_buttons, 2, 1, 1, 1)
self.control_widget = QtWidgets.QWidget(OhsomeToolsDialogBase)
- sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed)
+ sizePolicy = QtWidgets.QSizePolicy(
+ QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed
+ )
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.control_widget.sizePolicy().hasHeightForWidth())
+ sizePolicy.setHeightForWidth(
+ self.control_widget.sizePolicy().hasHeightForWidth()
+ )
self.control_widget.setSizePolicy(sizePolicy)
self.control_widget.setMaximumSize(QtCore.QSize(150, 16777215))
self.control_widget.setObjectName("control_widget")
self.horizontalLayout_8 = QtWidgets.QHBoxLayout(self.control_widget)
self.horizontalLayout_8.setObjectName("horizontalLayout_8")
self.help_button = QtWidgets.QPushButton(self.control_widget)
- sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
+ sizePolicy = QtWidgets.QSizePolicy(
+ QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed
+ )
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.help_button.sizePolicy().hasHeightForWidth())
+ sizePolicy.setHeightForWidth(
+ self.help_button.sizePolicy().hasHeightForWidth()
+ )
self.help_button.setSizePolicy(sizePolicy)
self.help_button.setObjectName("help_button")
self.horizontalLayout_8.addWidget(self.help_button)
@@ -67,9 +81,15 @@ def setupUi(self, OhsomeToolsDialogBase):
self.scrollArea_2.setWidgetResizable(True)
self.scrollArea_2.setObjectName("scrollArea_2")
self.scrollAreaWidgetContents_4 = QtWidgets.QWidget()
- self.scrollAreaWidgetContents_4.setGeometry(QtCore.QRect(0, 0, 511, 733))
- self.scrollAreaWidgetContents_4.setObjectName("scrollAreaWidgetContents_4")
- self.verticalLayout_8 = QtWidgets.QVBoxLayout(self.scrollAreaWidgetContents_4)
+ self.scrollAreaWidgetContents_4.setGeometry(
+ QtCore.QRect(0, 0, 511, 733)
+ )
+ self.scrollAreaWidgetContents_4.setObjectName(
+ "scrollAreaWidgetContents_4"
+ )
+ self.verticalLayout_8 = QtWidgets.QVBoxLayout(
+ self.scrollAreaWidgetContents_4
+ )
self.verticalLayout_8.setObjectName("verticalLayout_8")
self.verticalLayout_5 = QtWidgets.QVBoxLayout()
self.verticalLayout_5.setObjectName("verticalLayout_5")
@@ -80,10 +100,14 @@ def setupUi(self, OhsomeToolsDialogBase):
self.label_7.setMaximumSize(QtCore.QSize(60, 16777215))
self.label_7.setObjectName("label_7")
self.gridLayout.addWidget(self.label_7, 0, 0, 1, 1)
- self.comboBox_inputLayer = QtWidgets.QComboBox(self.scrollAreaWidgetContents_4)
+ self.comboBox_inputLayer = QtWidgets.QComboBox(
+ self.scrollAreaWidgetContents_4
+ )
self.comboBox_inputLayer.setObjectName("comboBox_inputLayer")
self.gridLayout.addWidget(self.comboBox_inputLayer, 0, 1, 1, 1)
- self.lineEdit_radius = QtWidgets.QLineEdit(self.scrollAreaWidgetContents_4)
+ self.lineEdit_radius = QtWidgets.QLineEdit(
+ self.scrollAreaWidgetContents_4
+ )
self.lineEdit_radius.setClearButtonEnabled(False)
self.lineEdit_radius.setObjectName("lineEdit_radius")
self.gridLayout.addWidget(self.lineEdit_radius, 1, 1, 1, 1)
@@ -91,9 +115,15 @@ def setupUi(self, OhsomeToolsDialogBase):
self.label_8.setObjectName("label_8")
self.gridLayout.addWidget(self.label_8, 1, 0, 1, 1)
self.verticalLayout_5.addLayout(self.gridLayout)
- self.tabWidget_simple_advanced = QtWidgets.QTabWidget(self.scrollAreaWidgetContents_4)
- self.tabWidget_simple_advanced.setTabPosition(QtWidgets.QTabWidget.North)
- self.tabWidget_simple_advanced.setObjectName("tabWidget_simple_advanced")
+ self.tabWidget_simple_advanced = QtWidgets.QTabWidget(
+ self.scrollAreaWidgetContents_4
+ )
+ self.tabWidget_simple_advanced.setTabPosition(
+ QtWidgets.QTabWidget.North
+ )
+ self.tabWidget_simple_advanced.setObjectName(
+ "tabWidget_simple_advanced"
+ )
self.tab_simple = QtWidgets.QWidget()
self.tab_simple.setObjectName("tab_simple")
self.gridLayout_16 = QtWidgets.QGridLayout(self.tab_simple)
@@ -146,7 +176,12 @@ def setupUi(self, OhsomeToolsDialogBase):
self.verticalLayout_2.addLayout(self.horizontalLayout_16)
self.horizontalLayout_17 = QtWidgets.QHBoxLayout()
self.horizontalLayout_17.setObjectName("horizontalLayout_17")
- spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
+ spacerItem = QtWidgets.QSpacerItem(
+ 40,
+ 20,
+ QtWidgets.QSizePolicy.Expanding,
+ QtWidgets.QSizePolicy.Minimum,
+ )
self.horizontalLayout_17.addItem(spacerItem)
self.label_4 = QtWidgets.QLabel(self.tab_simple)
font = QtGui.QFont()
@@ -168,7 +203,12 @@ def setupUi(self, OhsomeToolsDialogBase):
self.mcomboBox_osm_type.addItem("")
self.mcomboBox_osm_type.addItem("")
self.horizontalLayout_17.addWidget(self.mcomboBox_osm_type)
- spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
+ spacerItem1 = QtWidgets.QSpacerItem(
+ 40,
+ 20,
+ QtWidgets.QSizePolicy.Expanding,
+ QtWidgets.QSizePolicy.Minimum,
+ )
self.horizontalLayout_17.addItem(spacerItem1)
self.verticalLayout_2.addLayout(self.horizontalLayout_17)
self.gridLayout_16.addLayout(self.verticalLayout_2, 4, 0, 1, 1)
@@ -178,10 +218,14 @@ def setupUi(self, OhsomeToolsDialogBase):
self.gridLayout_18 = QtWidgets.QGridLayout(self.tab_advanced)
self.gridLayout_18.setObjectName("gridLayout_18")
self.filter_frame = QtWidgets.QFrame(self.tab_advanced)
- sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Maximum)
+ sizePolicy = QtWidgets.QSizePolicy(
+ QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Maximum
+ )
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.filter_frame.sizePolicy().hasHeightForWidth())
+ sizePolicy.setHeightForWidth(
+ self.filter_frame.sizePolicy().hasHeightForWidth()
+ )
self.filter_frame.setSizePolicy(sizePolicy)
self.filter_frame.setFrameShape(QtWidgets.QFrame.StyledPanel)
self.filter_frame.setFrameShadow(QtWidgets.QFrame.Raised)
@@ -197,27 +241,40 @@ def setupUi(self, OhsomeToolsDialogBase):
self.horizontalLayout_4 = QtWidgets.QHBoxLayout(self.frame_9)
self.horizontalLayout_4.setObjectName("horizontalLayout_4")
self.filter_label = QtWidgets.QLabel(self.frame_9)
- sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Maximum)
+ sizePolicy = QtWidgets.QSizePolicy(
+ QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Maximum
+ )
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.filter_label.sizePolicy().hasHeightForWidth())
+ sizePolicy.setHeightForWidth(
+ self.filter_label.sizePolicy().hasHeightForWidth()
+ )
self.filter_label.setSizePolicy(sizePolicy)
self.filter_label.setObjectName("filter_label")
self.horizontalLayout_4.addWidget(self.filter_label)
self.filter_help = QtWidgets.QPushButton(self.frame_9)
- sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Maximum)
+ sizePolicy = QtWidgets.QSizePolicy(
+ QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Maximum
+ )
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.filter_help.sizePolicy().hasHeightForWidth())
+ sizePolicy.setHeightForWidth(
+ self.filter_help.sizePolicy().hasHeightForWidth()
+ )
self.filter_help.setSizePolicy(sizePolicy)
self.filter_help.setObjectName("filter_help")
self.horizontalLayout_4.addWidget(self.filter_help)
self.horizontalLayout_6.addWidget(self.frame_9)
self.filter_input = QtWidgets.QPlainTextEdit(self.filter_frame)
- sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Maximum)
+ sizePolicy = QtWidgets.QSizePolicy(
+ QtWidgets.QSizePolicy.MinimumExpanding,
+ QtWidgets.QSizePolicy.Maximum,
+ )
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.filter_input.sizePolicy().hasHeightForWidth())
+ sizePolicy.setHeightForWidth(
+ self.filter_input.sizePolicy().hasHeightForWidth()
+ )
self.filter_input.setSizePolicy(sizePolicy)
self.filter_input.setMaximumSize(QtCore.QSize(360, 101))
self.filter_input.setToolTipDuration(-1)
@@ -235,7 +292,9 @@ def setupUi(self, OhsomeToolsDialogBase):
self.verticalLayout_10.setObjectName("verticalLayout_10")
self.gridLayout_19 = QtWidgets.QGridLayout()
self.gridLayout_19.setObjectName("gridLayout_19")
- self.radioButton_tag = QtWidgets.QRadioButton(self.scrollAreaWidgetContents_4)
+ self.radioButton_tag = QtWidgets.QRadioButton(
+ self.scrollAreaWidgetContents_4
+ )
self.radioButton_tag.setObjectName("radioButton_tag")
self.buttonGroup_groupby = QtWidgets.QButtonGroup(OhsomeToolsDialogBase)
self.buttonGroup_groupby.setObjectName("buttonGroup_groupby")
@@ -249,20 +308,28 @@ def setupUi(self, OhsomeToolsDialogBase):
self.group_results.setFont(font)
self.group_results.setObjectName("group_results")
self.gridLayout_19.addWidget(self.group_results, 0, 0, 1, 1)
- self.radioButton_boundary = QtWidgets.QRadioButton(self.scrollAreaWidgetContents_4)
+ self.radioButton_boundary = QtWidgets.QRadioButton(
+ self.scrollAreaWidgetContents_4
+ )
self.radioButton_boundary.setObjectName("radioButton_boundary")
self.buttonGroup_groupby.addButton(self.radioButton_boundary)
self.gridLayout_19.addWidget(self.radioButton_boundary, 2, 1, 1, 1)
- self.radioButton_key = QtWidgets.QRadioButton(self.scrollAreaWidgetContents_4)
+ self.radioButton_key = QtWidgets.QRadioButton(
+ self.scrollAreaWidgetContents_4
+ )
self.radioButton_key.setObjectName("radioButton_key")
self.buttonGroup_groupby.addButton(self.radioButton_key)
self.gridLayout_19.addWidget(self.radioButton_key, 2, 3, 1, 1)
- self.radioButton_None = QtWidgets.QRadioButton(self.scrollAreaWidgetContents_4)
+ self.radioButton_None = QtWidgets.QRadioButton(
+ self.scrollAreaWidgetContents_4
+ )
self.radioButton_None.setChecked(True)
self.radioButton_None.setObjectName("radioButton_None")
self.buttonGroup_groupby.addButton(self.radioButton_None)
self.gridLayout_19.addWidget(self.radioButton_None, 1, 0, 1, 1)
- self.radioButton_osm_type = QtWidgets.QRadioButton(self.scrollAreaWidgetContents_4)
+ self.radioButton_osm_type = QtWidgets.QRadioButton(
+ self.scrollAreaWidgetContents_4
+ )
self.radioButton_osm_type.setObjectName("radioButton_osm_type")
self.buttonGroup_groupby.addButton(self.radioButton_osm_type)
self.gridLayout_19.addWidget(self.radioButton_osm_type, 2, 0, 1, 1)
@@ -270,27 +337,45 @@ def setupUi(self, OhsomeToolsDialogBase):
self.gridLayout_2 = QtWidgets.QGridLayout()
self.gridLayout_2.setContentsMargins(5, 5, 5, 5)
self.gridLayout_2.setObjectName("gridLayout_2")
- self.group_by_keys_label = QtWidgets.QLabel(self.scrollAreaWidgetContents_4)
+ self.group_by_keys_label = QtWidgets.QLabel(
+ self.scrollAreaWidgetContents_4
+ )
self.group_by_keys_label.setEnabled(True)
- sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Maximum)
+ sizePolicy = QtWidgets.QSizePolicy(
+ QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Maximum
+ )
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.group_by_keys_label.sizePolicy().hasHeightForWidth())
+ sizePolicy.setHeightForWidth(
+ self.group_by_keys_label.sizePolicy().hasHeightForWidth()
+ )
self.group_by_keys_label.setSizePolicy(sizePolicy)
self.group_by_keys_label.setObjectName("group_by_keys_label")
self.gridLayout_2.addWidget(self.group_by_keys_label, 0, 0, 1, 1)
- self.group_by_values_label = QtWidgets.QLabel(self.scrollAreaWidgetContents_4)
- sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Maximum)
+ self.group_by_values_label = QtWidgets.QLabel(
+ self.scrollAreaWidgetContents_4
+ )
+ sizePolicy = QtWidgets.QSizePolicy(
+ QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Maximum
+ )
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.group_by_values_label.sizePolicy().hasHeightForWidth())
+ sizePolicy.setHeightForWidth(
+ self.group_by_values_label.sizePolicy().hasHeightForWidth()
+ )
self.group_by_values_label.setSizePolicy(sizePolicy)
self.group_by_values_label.setObjectName("group_by_values_label")
self.gridLayout_2.addWidget(self.group_by_values_label, 1, 0, 1, 1)
- self.group_by_values_line_edit = QtWidgets.QLineEdit(self.scrollAreaWidgetContents_4)
- self.group_by_values_line_edit.setObjectName("group_by_values_line_edit")
+ self.group_by_values_line_edit = QtWidgets.QLineEdit(
+ self.scrollAreaWidgetContents_4
+ )
+ self.group_by_values_line_edit.setObjectName(
+ "group_by_values_line_edit"
+ )
self.gridLayout_2.addWidget(self.group_by_values_line_edit, 1, 1, 1, 1)
- self.group_by_key_line_edit = QtWidgets.QLineEdit(self.scrollAreaWidgetContents_4)
+ self.group_by_key_line_edit = QtWidgets.QLineEdit(
+ self.scrollAreaWidgetContents_4
+ )
self.group_by_key_line_edit.setObjectName("group_by_key_line_edit")
self.gridLayout_2.addWidget(self.group_by_key_line_edit, 0, 1, 1, 1)
self.verticalLayout_10.addLayout(self.gridLayout_2)
@@ -309,7 +394,9 @@ def setupUi(self, OhsomeToolsDialogBase):
self.label_months.setToolTip("")
self.label_months.setObjectName("label_months")
self.gridLayout_25.addWidget(self.label_months, 1, 1, 1, 1)
- self.interval_months = QtWidgets.QSpinBox(self.scrollAreaWidgetContents_4)
+ self.interval_months = QtWidgets.QSpinBox(
+ self.scrollAreaWidgetContents_4
+ )
self.interval_months.setMaximum(12)
self.interval_months.setObjectName("interval_months")
self.gridLayout_25.addWidget(self.interval_months, 2, 1, 1, 1)
@@ -318,7 +405,9 @@ def setupUi(self, OhsomeToolsDialogBase):
self.interval_days.setProperty("value", 1)
self.interval_days.setObjectName("interval_days")
self.gridLayout_25.addWidget(self.interval_days, 2, 2, 1, 1)
- self.interval_years = QtWidgets.QSpinBox(self.scrollAreaWidgetContents_4)
+ self.interval_years = QtWidgets.QSpinBox(
+ self.scrollAreaWidgetContents_4
+ )
self.interval_years.setAccessibleDescription("")
self.interval_years.setMaximum(99)
self.interval_years.setProperty("value", 0)
@@ -333,20 +422,30 @@ def setupUi(self, OhsomeToolsDialogBase):
self.date_end_label.setObjectName("date_end_label")
self.gridLayout_26.addWidget(self.date_end_label, 4, 2, 1, 1)
self.date_end = QtWidgets.QDateEdit(self.scrollAreaWidgetContents_4)
- self.date_end.setDateTime(QtCore.QDateTime(QtCore.QDate(2017, 1, 1), QtCore.QTime(0, 0, 0)))
- self.date_end.setMinimumDateTime(QtCore.QDateTime(QtCore.QDate(2007, 10, 9), QtCore.QTime(0, 0, 0)))
+ self.date_end.setDateTime(
+ QtCore.QDateTime(QtCore.QDate(2017, 1, 1), QtCore.QTime(0, 0, 0))
+ )
+ self.date_end.setMinimumDateTime(
+ QtCore.QDateTime(QtCore.QDate(2007, 10, 9), QtCore.QTime(0, 0, 0))
+ )
self.date_end.setMinimumDate(QtCore.QDate(2007, 10, 9))
self.date_end.setObjectName("date_end")
self.gridLayout_26.addWidget(self.date_end, 5, 2, 1, 1)
self.date_start = QtWidgets.QDateEdit(self.scrollAreaWidgetContents_4)
- self.date_start.setDateTime(QtCore.QDateTime(QtCore.QDate(2016, 1, 1), QtCore.QTime(0, 0, 0)))
- self.date_start.setMinimumDateTime(QtCore.QDateTime(QtCore.QDate(2007, 10, 8), QtCore.QTime(0, 0, 0)))
+ self.date_start.setDateTime(
+ QtCore.QDateTime(QtCore.QDate(2016, 1, 1), QtCore.QTime(0, 0, 0))
+ )
+ self.date_start.setMinimumDateTime(
+ QtCore.QDateTime(QtCore.QDate(2007, 10, 8), QtCore.QTime(0, 0, 0))
+ )
self.date_start.setMaximumDate(QtCore.QDate(2050, 12, 31))
self.date_start.setMinimumDate(QtCore.QDate(2007, 10, 8))
self.date_start.setTimeSpec(QtCore.Qt.LocalTime)
self.date_start.setObjectName("date_start")
self.gridLayout_26.addWidget(self.date_start, 5, 0, 1, 1)
- self.date_start_label = QtWidgets.QLabel(self.scrollAreaWidgetContents_4)
+ self.date_start_label = QtWidgets.QLabel(
+ self.scrollAreaWidgetContents_4
+ )
self.date_start_label.setObjectName("date_start_label")
self.gridLayout_26.addWidget(self.date_start_label, 4, 0, 1, 1)
self.label_5 = QtWidgets.QLabel(self.scrollAreaWidgetContents_4)
@@ -357,23 +456,37 @@ def setupUi(self, OhsomeToolsDialogBase):
self.label_5.setObjectName("label_5")
self.gridLayout_26.addWidget(self.label_5, 1, 0, 1, 1)
self.verticalLayout_5.addLayout(self.gridLayout_26)
- self.general_options_group = QgsCollapsibleGroupBox(self.scrollAreaWidgetContents_4)
+ self.general_options_group = QgsCollapsibleGroupBox(
+ self.scrollAreaWidgetContents_4
+ )
self.general_options_group.setCollapsed(False)
self.general_options_group.setObjectName("general_options_group")
- self.verticalLayout_7 = QtWidgets.QVBoxLayout(self.general_options_group)
+ self.verticalLayout_7 = QtWidgets.QVBoxLayout(
+ self.general_options_group
+ )
self.verticalLayout_7.setObjectName("verticalLayout_7")
self.horizontalLayout = QtWidgets.QHBoxLayout()
self.horizontalLayout.setContentsMargins(5, 5, 5, 5)
self.horizontalLayout.setObjectName("horizontalLayout")
- self.provider_refresh = QtWidgets.QPushButton(self.general_options_group)
- sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
+ self.provider_refresh = QtWidgets.QPushButton(
+ self.general_options_group
+ )
+ sizePolicy = QtWidgets.QSizePolicy(
+ QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed
+ )
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.provider_refresh.sizePolicy().hasHeightForWidth())
+ sizePolicy.setHeightForWidth(
+ self.provider_refresh.sizePolicy().hasHeightForWidth()
+ )
self.provider_refresh.setSizePolicy(sizePolicy)
self.provider_refresh.setText("")
icon = QtGui.QIcon()
- icon.addPixmap(QtGui.QPixmap(":/plugins/ohsomeTools/img/icon_refresh.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ icon.addPixmap(
+ QtGui.QPixmap(":/plugins/ohsomeTools/img/icon_refresh.png"),
+ QtGui.QIcon.Normal,
+ QtGui.QIcon.Off,
+ )
self.provider_refresh.setIcon(icon)
self.provider_refresh.setObjectName("provider_refresh")
self.horizontalLayout.addWidget(self.provider_refresh)
@@ -381,23 +494,35 @@ def setupUi(self, OhsomeToolsDialogBase):
self.label_15.setObjectName("label_15")
self.horizontalLayout.addWidget(self.label_15)
self.provider_combo = QtWidgets.QComboBox(self.general_options_group)
- sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed)
+ sizePolicy = QtWidgets.QSizePolicy(
+ QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed
+ )
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.provider_combo.sizePolicy().hasHeightForWidth())
+ sizePolicy.setHeightForWidth(
+ self.provider_combo.sizePolicy().hasHeightForWidth()
+ )
self.provider_combo.setSizePolicy(sizePolicy)
self.provider_combo.setMinimumSize(QtCore.QSize(150, 25))
self.provider_combo.setObjectName("provider_combo")
self.horizontalLayout.addWidget(self.provider_combo)
self.provider_config = QtWidgets.QPushButton(self.general_options_group)
- sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
+ sizePolicy = QtWidgets.QSizePolicy(
+ QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed
+ )
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.provider_config.sizePolicy().hasHeightForWidth())
+ sizePolicy.setHeightForWidth(
+ self.provider_config.sizePolicy().hasHeightForWidth()
+ )
self.provider_config.setSizePolicy(sizePolicy)
self.provider_config.setText("")
icon1 = QtGui.QIcon()
- icon1.addPixmap(QtGui.QPixmap(":/plugins/ohsomeTools/img/icon_settings.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ icon1.addPixmap(
+ QtGui.QPixmap(":/plugins/ohsomeTools/img/icon_settings.png"),
+ QtGui.QIcon.Normal,
+ QtGui.QIcon.Off,
+ )
self.provider_config.setIcon(icon1)
self.provider_config.setObjectName("provider_config")
self.horizontalLayout.addWidget(self.provider_config)
@@ -409,7 +534,9 @@ def setupUi(self, OhsomeToolsDialogBase):
self.label.setMaximumSize(QtCore.QSize(50, 16777215))
self.label.setObjectName("label")
self.horizontalLayout_3.addWidget(self.label)
- self.data_aggregation_format = QtWidgets.QComboBox(self.general_options_group)
+ self.data_aggregation_format = QtWidgets.QComboBox(
+ self.general_options_group
+ )
self.data_aggregation_format.setObjectName("data_aggregation_format")
self.horizontalLayout_3.addWidget(self.data_aggregation_format)
self.verticalLayout_7.addLayout(self.horizontalLayout_3)
@@ -468,10 +595,14 @@ def setupUi(self, OhsomeToolsDialogBase):
self.gridLayout_15 = QtWidgets.QGridLayout(self.tab_2)
self.gridLayout_15.setObjectName("gridLayout_15")
self.debug_text = QtWidgets.QTextBrowser(self.tab_2)
- sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
+ sizePolicy = QtWidgets.QSizePolicy(
+ QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding
+ )
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.debug_text.sizePolicy().hasHeightForWidth())
+ sizePolicy.setHeightForWidth(
+ self.debug_text.sizePolicy().hasHeightForWidth()
+ )
self.debug_text.setSizePolicy(sizePolicy)
self.debug_text.setMinimumSize(QtCore.QSize(0, 0))
self.debug_text.setMaximumSize(QtCore.QSize(16777215, 16777215))
@@ -488,100 +619,320 @@ def setupUi(self, OhsomeToolsDialogBase):
self.tabWidget_simple_advanced.setCurrentIndex(0)
self.global_buttons.accepted.connect(OhsomeToolsDialogBase.accept)
self.global_buttons.rejected.connect(OhsomeToolsDialogBase.reject)
- self.radioButton_None.toggled['bool'].connect(self.group_by_keys_label.setHidden)
- self.radioButton_None.toggled['bool'].connect(self.group_by_values_label.setHidden)
- self.radioButton_osm_type.toggled['bool'].connect(self.group_by_keys_label.setHidden)
- self.radioButton_osm_type.toggled['bool'].connect(self.group_by_values_label.setHidden)
- self.radioButton_boundary.toggled['bool'].connect(self.group_by_keys_label.setHidden)
- self.radioButton_boundary.toggled['bool'].connect(self.group_by_values_label.setHidden)
- self.radioButton_tag.toggled['bool'].connect(self.group_by_keys_label.setVisible)
- self.radioButton_tag.toggled['bool'].connect(self.group_by_values_label.setVisible)
- self.radioButton_key.toggled['bool'].connect(self.group_by_values_label.setVisible)
- self.radioButton_key.toggled['bool'].connect(self.group_by_keys_label.setHidden)
- self.radioButton_None.toggled['bool'].connect(self.group_by_key_line_edit.setHidden)
- self.radioButton_osm_type.toggled['bool'].connect(self.group_by_key_line_edit.setHidden)
- self.radioButton_None.toggled['bool'].connect(self.group_by_values_line_edit.setHidden)
- self.radioButton_osm_type.toggled['bool'].connect(self.group_by_key_line_edit.setHidden)
- self.radioButton_osm_type.toggled['bool'].connect(self.group_by_values_line_edit.setHidden)
- self.radioButton_boundary.toggled['bool'].connect(self.group_by_key_line_edit.setHidden)
- self.radioButton_boundary.toggled['bool'].connect(self.group_by_values_line_edit.setHidden)
- self.radioButton_tag.toggled['bool'].connect(self.group_by_key_line_edit.setVisible)
- self.radioButton_tag.toggled['bool'].connect(self.group_by_values_line_edit.setVisible)
- self.radioButton_key.toggled['bool'].connect(self.group_by_key_line_edit.setHidden)
- self.radioButton_key.toggled['bool'].connect(self.group_by_values_line_edit.setVisible)
+ self.radioButton_None.toggled["bool"].connect(
+ self.group_by_keys_label.setHidden
+ )
+ self.radioButton_None.toggled["bool"].connect(
+ self.group_by_values_label.setHidden
+ )
+ self.radioButton_osm_type.toggled["bool"].connect(
+ self.group_by_keys_label.setHidden
+ )
+ self.radioButton_osm_type.toggled["bool"].connect(
+ self.group_by_values_label.setHidden
+ )
+ self.radioButton_boundary.toggled["bool"].connect(
+ self.group_by_keys_label.setHidden
+ )
+ self.radioButton_boundary.toggled["bool"].connect(
+ self.group_by_values_label.setHidden
+ )
+ self.radioButton_tag.toggled["bool"].connect(
+ self.group_by_keys_label.setVisible
+ )
+ self.radioButton_tag.toggled["bool"].connect(
+ self.group_by_values_label.setVisible
+ )
+ self.radioButton_key.toggled["bool"].connect(
+ self.group_by_values_label.setVisible
+ )
+ self.radioButton_key.toggled["bool"].connect(
+ self.group_by_keys_label.setHidden
+ )
+ self.radioButton_None.toggled["bool"].connect(
+ self.group_by_key_line_edit.setHidden
+ )
+ self.radioButton_osm_type.toggled["bool"].connect(
+ self.group_by_key_line_edit.setHidden
+ )
+ self.radioButton_None.toggled["bool"].connect(
+ self.group_by_values_line_edit.setHidden
+ )
+ self.radioButton_osm_type.toggled["bool"].connect(
+ self.group_by_key_line_edit.setHidden
+ )
+ self.radioButton_osm_type.toggled["bool"].connect(
+ self.group_by_values_line_edit.setHidden
+ )
+ self.radioButton_boundary.toggled["bool"].connect(
+ self.group_by_key_line_edit.setHidden
+ )
+ self.radioButton_boundary.toggled["bool"].connect(
+ self.group_by_values_line_edit.setHidden
+ )
+ self.radioButton_tag.toggled["bool"].connect(
+ self.group_by_key_line_edit.setVisible
+ )
+ self.radioButton_tag.toggled["bool"].connect(
+ self.group_by_values_line_edit.setVisible
+ )
+ self.radioButton_key.toggled["bool"].connect(
+ self.group_by_key_line_edit.setHidden
+ )
+ self.radioButton_key.toggled["bool"].connect(
+ self.group_by_values_line_edit.setVisible
+ )
QtCore.QMetaObject.connectSlotsByName(OhsomeToolsDialogBase)
def retranslateUi(self, OhsomeToolsDialogBase):
_translate = QtCore.QCoreApplication.translate
- OhsomeToolsDialogBase.setWindowTitle(_translate("OhsomeToolsDialogBase", "ohsomeTools"))
+ OhsomeToolsDialogBase.setWindowTitle(
+ _translate("OhsomeToolsDialogBase", "ohsomeTools")
+ )
self.help_button.setText(_translate("OhsomeToolsDialogBase", "Help"))
self.about_button.setText(_translate("OhsomeToolsDialogBase", "About"))
- self.label_7.setText(_translate("OhsomeToolsDialogBase", "Input Layer:"))
- self.lineEdit_radius.setPlaceholderText(_translate("OhsomeToolsDialogBase", "1000"))
+ self.label_7.setText(
+ _translate("OhsomeToolsDialogBase", "Input Layer:")
+ )
+ self.lineEdit_radius.setPlaceholderText(
+ _translate("OhsomeToolsDialogBase", "1000")
+ )
self.label_8.setText(_translate("OhsomeToolsDialogBase", "Radius:"))
self.label_6.setText(_translate("OhsomeToolsDialogBase", "OSM tag"))
self.label_2.setText(_translate("OhsomeToolsDialogBase", "Key"))
self.label_3.setText(_translate("OhsomeToolsDialogBase", "Value"))
- self.radioButton_count.setText(_translate("OhsomeToolsDialogBase", "Count"))
- self.radioButton_length.setText(_translate("OhsomeToolsDialogBase", "Length"))
- self.radioButton_area.setText(_translate("OhsomeToolsDialogBase", "Area"))
- self.radioButton_perimeter.setText(_translate("OhsomeToolsDialogBase", "Perimeter"))
+ self.radioButton_count.setText(
+ _translate("OhsomeToolsDialogBase", "Count")
+ )
+ self.radioButton_length.setText(
+ _translate("OhsomeToolsDialogBase", "Length")
+ )
+ self.radioButton_area.setText(
+ _translate("OhsomeToolsDialogBase", "Area")
+ )
+ self.radioButton_perimeter.setText(
+ _translate("OhsomeToolsDialogBase", "Perimeter")
+ )
self.label_4.setText(_translate("OhsomeToolsDialogBase", "OSM type"))
- self.mcomboBox_osm_type.setCurrentText(_translate("OhsomeToolsDialogBase", "Node"))
- self.mcomboBox_osm_type.setDefaultText(_translate("OhsomeToolsDialogBase", "Node"))
- self.mcomboBox_osm_type.setItemText(0, _translate("OhsomeToolsDialogBase", "Node"))
- self.mcomboBox_osm_type.setItemText(1, _translate("OhsomeToolsDialogBase", "Way"))
- self.mcomboBox_osm_type.setItemText(2, _translate("OhsomeToolsDialogBase", "Relation"))
- self.tabWidget_simple_advanced.setTabText(self.tabWidget_simple_advanced.indexOf(self.tab_simple), _translate("OhsomeToolsDialogBase", "Simple"))
- self.filter_label.setToolTip(_translate("OhsomeToolsDialogBase", "
Combines several attributive filters, e.g. OSM type, the geometry (simple feature) type, as well as the OSM tag.
For more information see: https://docs.ohsome.org/ohsome-api/v1/filter.html
"))
- self.filter_label.setText(_translate("OhsomeToolsDialogBase", "Filter "))
- self.filter_help.setToolTip(_translate("OhsomeToolsDialogBase", "Filter specific help page. Scroll to bottom to see examples."))
+ self.mcomboBox_osm_type.setCurrentText(
+ _translate("OhsomeToolsDialogBase", "Node")
+ )
+ self.mcomboBox_osm_type.setDefaultText(
+ _translate("OhsomeToolsDialogBase", "Node")
+ )
+ self.mcomboBox_osm_type.setItemText(
+ 0, _translate("OhsomeToolsDialogBase", "Node")
+ )
+ self.mcomboBox_osm_type.setItemText(
+ 1, _translate("OhsomeToolsDialogBase", "Way")
+ )
+ self.mcomboBox_osm_type.setItemText(
+ 2, _translate("OhsomeToolsDialogBase", "Relation")
+ )
+ self.tabWidget_simple_advanced.setTabText(
+ self.tabWidget_simple_advanced.indexOf(self.tab_simple),
+ _translate("OhsomeToolsDialogBase", "Simple"),
+ )
+ self.filter_label.setToolTip(
+ _translate(
+ "OhsomeToolsDialogBase",
+ 'Combines several attributive filters, e.g. OSM type, the geometry (simple feature) type, as well as the OSM tag.
For more information see: https://docs.ohsome.org/ohsome-api/v1/filter.html
',
+ )
+ )
+ self.filter_label.setText(
+ _translate("OhsomeToolsDialogBase", "Filter ")
+ )
+ self.filter_help.setToolTip(
+ _translate(
+ "OhsomeToolsDialogBase",
+ "Filter specific help page. Scroll to bottom to see examples.",
+ )
+ )
self.filter_help.setText(_translate("OhsomeToolsDialogBase", "?"))
- self.filter_input.setToolTip(_translate("OhsomeToolsDialogBase", "Combines several attributive filters, e.g. OSM type, the geometry (simple feature) type, as well as the OSM tag.
For more information see: https://docs.ohsome.org/ohsome-api/v1/filter.html
"))
- self.filter_input.setPlaceholderText(_translate("OhsomeToolsDialogBase", "building=* or (type:way and highway=residential)"))
- self.tabWidget_simple_advanced.setTabText(self.tabWidget_simple_advanced.indexOf(self.tab_advanced), _translate("OhsomeToolsDialogBase", "Advanced"))
+ self.filter_input.setToolTip(
+ _translate(
+ "OhsomeToolsDialogBase",
+ 'Combines several attributive filters, e.g. OSM type, the geometry (simple feature) type, as well as the OSM tag.
For more information see: https://docs.ohsome.org/ohsome-api/v1/filter.html
',
+ )
+ )
+ self.filter_input.setPlaceholderText(
+ _translate(
+ "OhsomeToolsDialogBase",
+ "building=* or (type:way and highway=residential)",
+ )
+ )
+ self.tabWidget_simple_advanced.setTabText(
+ self.tabWidget_simple_advanced.indexOf(self.tab_advanced),
+ _translate("OhsomeToolsDialogBase", "Advanced"),
+ )
self.radioButton_tag.setText(_translate("OhsomeToolsDialogBase", "tag"))
- self.group_results.setText(_translate("OhsomeToolsDialogBase", "Group Results By ..."))
- self.radioButton_boundary.setText(_translate("OhsomeToolsDialogBase", "boundary"))
+ self.group_results.setText(
+ _translate("OhsomeToolsDialogBase", "Group Results By ...")
+ )
+ self.radioButton_boundary.setText(
+ _translate("OhsomeToolsDialogBase", "boundary")
+ )
self.radioButton_key.setText(_translate("OhsomeToolsDialogBase", "key"))
- self.radioButton_None.setText(_translate("OhsomeToolsDialogBase", "None"))
- self.radioButton_osm_type.setText(_translate("OhsomeToolsDialogBase", "OSM Type"))
- self.group_by_keys_label.setToolTip(_translate("OhsomeToolsDialogBase", "OSM key e.g.: \'highway’, \'building’; no default value (one groupByKey parameter must be defined).
Only for `groupBy/tag` endpoints.
"))
- self.group_by_keys_label.setText(_translate("OhsomeToolsDialogBase", "groupByKey"))
- self.group_by_values_label.setToolTip(_translate("OhsomeToolsDialogBase", "OSM value(s) e.g.: \'primary’, \'residential’; default: no value. Can be left empty.
Only for `groupBy/tag` endpoints.
"))
- self.group_by_values_label.setText(_translate("OhsomeToolsDialogBase", "groupByValues"))
+ self.radioButton_None.setText(
+ _translate("OhsomeToolsDialogBase", "None")
+ )
+ self.radioButton_osm_type.setText(
+ _translate("OhsomeToolsDialogBase", "OSM Type")
+ )
+ self.group_by_keys_label.setToolTip(
+ _translate(
+ "OhsomeToolsDialogBase",
+ "OSM key e.g.: 'highway’, 'building’; no default value (one groupByKey parameter must be defined).
Only for `groupBy/tag` endpoints.
",
+ )
+ )
+ self.group_by_keys_label.setText(
+ _translate("OhsomeToolsDialogBase", "groupByKey")
+ )
+ self.group_by_values_label.setToolTip(
+ _translate(
+ "OhsomeToolsDialogBase",
+ "OSM value(s) e.g.: 'primary’, 'residential’; default: no value. Can be left empty.
Only for `groupBy/tag` endpoints.
",
+ )
+ )
+ self.group_by_values_label.setText(
+ _translate("OhsomeToolsDialogBase", "groupByValues")
+ )
self.label_years.setText(_translate("OhsomeToolsDialogBase", "Years"))
self.label_days.setText(_translate("OhsomeToolsDialogBase", "Days"))
self.label_months.setText(_translate("OhsomeToolsDialogBase", "Months"))
- self.interval_months.setToolTip(_translate("OhsomeToolsDialogBase", "Run the query every x months. Adjust the time frame accordingly.
Only available for the data aggregation endpoints.
"))
- self.interval_days.setToolTip(_translate("OhsomeToolsDialogBase", "Run the query every x days. Adjust the time frame accordingly.
Only available for the data aggregation endpoints.
"))
- self.interval_years.setToolTip(_translate("OhsomeToolsDialogBase", "Run the query every x years. Adjust the time frame accordingly.
Only available for the data aggregation endpoints.
"))
- self.date_end_label.setText(_translate("OhsomeToolsDialogBase", "Date End"))
- self.date_end.setToolTip(_translate("OhsomeToolsDialogBase", "Enter your end date.
All dates from the 9th of Oktober 2007 are valid.
"))
- self.date_end.setDisplayFormat(_translate("OhsomeToolsDialogBase", "dd-MM-yyyy"))
- self.date_start.setToolTip(_translate("OhsomeToolsDialogBase", "Enter your start date.
All dates from the 8th of Oktober 2007 are valid.
"))
- self.date_start.setDisplayFormat(_translate("OhsomeToolsDialogBase", "dd-MM-yyyy"))
- self.date_start_label.setText(_translate("OhsomeToolsDialogBase", "Date Start"))
- self.label_5.setText(_translate("OhsomeToolsDialogBase", "Time Interval"))
- self.general_options_group.setTitle(_translate("OhsomeToolsDialogBase", "Advanced Parameters"))
- self.provider_refresh.setToolTip(_translate("OhsomeToolsDialogBase", "Refresh the provider list. Needed after a provider was added or deleted."))
+ self.interval_months.setToolTip(
+ _translate(
+ "OhsomeToolsDialogBase",
+ "Run the query every x months. Adjust the time frame accordingly.
Only available for the data aggregation endpoints.
",
+ )
+ )
+ self.interval_days.setToolTip(
+ _translate(
+ "OhsomeToolsDialogBase",
+ "Run the query every x days. Adjust the time frame accordingly.
Only available for the data aggregation endpoints.
",
+ )
+ )
+ self.interval_years.setToolTip(
+ _translate(
+ "OhsomeToolsDialogBase",
+ 'Run the query every x years. Adjust the time frame accordingly.
Only available for the data aggregation endpoints.
',
+ )
+ )
+ self.date_end_label.setText(
+ _translate("OhsomeToolsDialogBase", "Date End")
+ )
+ self.date_end.setToolTip(
+ _translate(
+ "OhsomeToolsDialogBase",
+ 'Enter your end date.
All dates from the 9th of Oktober 2007 are valid.
',
+ )
+ )
+ self.date_end.setDisplayFormat(
+ _translate("OhsomeToolsDialogBase", "dd-MM-yyyy")
+ )
+ self.date_start.setToolTip(
+ _translate(
+ "OhsomeToolsDialogBase",
+ 'Enter your start date.
All dates from the 8th of Oktober 2007 are valid.
',
+ )
+ )
+ self.date_start.setDisplayFormat(
+ _translate("OhsomeToolsDialogBase", "dd-MM-yyyy")
+ )
+ self.date_start_label.setText(
+ _translate("OhsomeToolsDialogBase", "Date Start")
+ )
+ self.label_5.setText(
+ _translate("OhsomeToolsDialogBase", "Time Interval")
+ )
+ self.general_options_group.setTitle(
+ _translate("OhsomeToolsDialogBase", "Advanced Parameters")
+ )
+ self.provider_refresh.setToolTip(
+ _translate(
+ "OhsomeToolsDialogBase",
+ "Refresh the provider list. Needed after a provider was added or deleted.",
+ )
+ )
self.label_15.setText(_translate("OhsomeToolsDialogBase", "Provider"))
- self.provider_config.setToolTip(_translate("OhsomeToolsDialogBase", "Shortcut to Web ► ohsomeTools ► Provider Settings"))
- self.label.setToolTip(_translate("OhsomeToolsDialogBase", "Output format geojson (for /groupBy/boundary resources only), or json.
"))
+ self.provider_config.setToolTip(
+ _translate(
+ "OhsomeToolsDialogBase",
+ "Shortcut to Web ► ohsomeTools ► Provider Settings",
+ )
+ )
+ self.label.setToolTip(
+ _translate(
+ "OhsomeToolsDialogBase",
+ "Output format geojson (for /groupBy/boundary resources only), or json.
",
+ )
+ )
self.label.setText(_translate("OhsomeToolsDialogBase", "Format"))
- self.data_aggregation_format.setToolTip(_translate("OhsomeToolsDialogBase", "Output format geojson (for /groupBy/boundary resources only), or json.
"))
- self.check_activate_temporal.setToolTip(_translate("OhsomeToolsDialogBase", "Automatically enable the temporal feature for new layers where applicable.
This is only applied to responses that contain geometries and in that manner only on those geometry layers it makes sense for.
"))
- self.check_activate_temporal.setText(_translate("OhsomeToolsDialogBase", "Qgis temporal feature"))
- self.check_show_metadata.setToolTip(_translate("OhsomeToolsDialogBase", "Include metadata into the query response. Depending on the request of the request this can increase the response data size significantly.
"))
- self.check_show_metadata.setText(_translate("OhsomeToolsDialogBase", "Show metadata"))
- self.check_merge_geometries.setToolTip(_translate("OhsomeToolsDialogBase", "Check this to automatically merge compatible geometry types.
It is recommended to keep this checked.
The benefit is that the amount of written layers will be massively reduced.
The reason is that results may contain single and multi-geometries at once (Polygon, MultiPolygon etc.) and without combining them one layer per geometry type will be written, resulting in an increased number of layers.
"))
- self.check_merge_geometries.setText(_translate("OhsomeToolsDialogBase", "Harmonize geometries"))
- self.timeout_label.setToolTip(_translate("OhsomeToolsDialogBase", "Apply a request timeout in seconds after that the ohsome API should terminate the request.
For the public ohsome API instance the maximum value is 100. For private instances there is no maximum.
"))
- self.timeout_label.setText(_translate("OhsomeToolsDialogBase", "Timeout"))
- self.timeout_input.setToolTip(_translate("OhsomeToolsDialogBase", "Apply a request timeout in seconds after that the ohsome API should terminate the request. If the value 0 is set (default), the server side timeout is used automatically, which can be up to 600 seconds.
Depending on the size of the query, too low entries will yield API errors.
This setting is only used for the public ohsome API and not for private ones.
"))
- self.tabWidget_main.setTabText(self.tabWidget_main.indexOf(self.tab), _translate("OhsomeToolsDialogBase", "Parameter"))
- self.debug_text.setPlaceholderText(_translate("OhsomeToolsDialogBase", "Queries and errors will be printed here."))
- self.tabWidget_main.setTabText(self.tabWidget_main.indexOf(self.tab_2), _translate("OhsomeToolsDialogBase", "Log"))
+ self.data_aggregation_format.setToolTip(
+ _translate(
+ "OhsomeToolsDialogBase",
+ "Output format geojson (for /groupBy/boundary resources only), or json.
",
+ )
+ )
+ self.check_activate_temporal.setToolTip(
+ _translate(
+ "OhsomeToolsDialogBase",
+ "Automatically enable the temporal feature for new layers where applicable.
This is only applied to responses that contain geometries and in that manner only on those geometry layers it makes sense for.
",
+ )
+ )
+ self.check_activate_temporal.setText(
+ _translate("OhsomeToolsDialogBase", "Qgis temporal feature")
+ )
+ self.check_show_metadata.setToolTip(
+ _translate(
+ "OhsomeToolsDialogBase",
+ "Include metadata into the query response. Depending on the request of the request this can increase the response data size significantly.
",
+ )
+ )
+ self.check_show_metadata.setText(
+ _translate("OhsomeToolsDialogBase", "Show metadata")
+ )
+ self.check_merge_geometries.setToolTip(
+ _translate(
+ "OhsomeToolsDialogBase",
+ 'Check this to automatically merge compatible geometry types.
It is recommended to keep this checked.
The benefit is that the amount of written layers will be massively reduced.
The reason is that results may contain single and multi-geometries at once (Polygon, MultiPolygon etc.) and without combining them one layer per geometry type will be written, resulting in an increased number of layers.
',
+ )
+ )
+ self.check_merge_geometries.setText(
+ _translate("OhsomeToolsDialogBase", "Harmonize geometries")
+ )
+ self.timeout_label.setToolTip(
+ _translate(
+ "OhsomeToolsDialogBase",
+ 'Apply a request timeout in seconds after that the ohsome API should terminate the request.
For the public ohsome API instance the maximum value is 100. For private instances there is no maximum.
',
+ )
+ )
+ self.timeout_label.setText(
+ _translate("OhsomeToolsDialogBase", "Timeout")
+ )
+ self.timeout_input.setToolTip(
+ _translate(
+ "OhsomeToolsDialogBase",
+ 'Apply a request timeout in seconds after that the ohsome API should terminate the request. If the value 0 is set (default), the server side timeout is used automatically, which can be up to 600 seconds.
Depending on the size of the query, too low entries will yield API errors.
This setting is only used for the public ohsome API and not for private ones.
',
+ )
+ )
+ self.tabWidget_main.setTabText(
+ self.tabWidget_main.indexOf(self.tab),
+ _translate("OhsomeToolsDialogBase", "Parameter"),
+ )
+ self.debug_text.setPlaceholderText(
+ _translate(
+ "OhsomeToolsDialogBase",
+ "Queries and errors will be printed here.",
+ )
+ )
+ self.tabWidget_main.setTabText(
+ self.tabWidget_main.indexOf(self.tab_2),
+ _translate("OhsomeToolsDialogBase", "Log"),
+ )
+
+
from qgscheckablecombobox import QgsCheckableComboBox
from qgscollapsiblegroupbox import QgsCollapsibleGroupBox
+
# import resources_rc