diff --git a/pb_tool.cfg b/pb_tool.cfg
index f6b59e5..ca0f171 100644
--- a/pb_tool.cfg
+++ b/pb_tool.cfg
@@ -54,7 +54,7 @@ python_files: __init__.py pygeoapi_config.py pygeoapi_config_dialog.py
main_dialog: pygeoapi_config_dialog_base.ui
# Other ui files for dialogs you create (these will be compiled)
-compiled_ui_files:
+compiled_ui_files: server_config_dialog.ui
# Resource file(s) that will be compiled
resource_files: resources.qrc
diff --git a/pygeoapi_config.py b/pygeoapi_config.py
index 825d9a9..528cc51 100644
--- a/pygeoapi_config.py
+++ b/pygeoapi_config.py
@@ -30,6 +30,7 @@
# Import the code for the dialog
from .pygeoapi_config_dialog import PygeoapiConfigDialog
+
import os.path
diff --git a/pygeoapi_config_dialog.py b/pygeoapi_config_dialog.py
index bf975bf..1a49425 100644
--- a/pygeoapi_config_dialog.py
+++ b/pygeoapi_config_dialog.py
@@ -23,14 +23,17 @@
"""
from copy import deepcopy
-from datetime import datetime, timezone
+from datetime import date, datetime, timezone
import os
+from wsgiref import headers
+import requests
import yaml
from .utils.data_diff import diff_yaml_dict
from .ui_widgets.utils import get_url_status
+from .server_config_dialog import Ui_serverDialog
from .models.top_level.providers.records import ProviderTypes
from .ui_widgets.providers.NewProviderWindow import NewProviderWindow
@@ -72,13 +75,50 @@
except:
pass
+headers = {
+ 'accept': '*/*',
+ 'Content-Type': 'application/json'
+}
+
+def preprocess_for_json(d):
+ """Recursively converts datetime/date objects in a dict to ISO strings."""
+ if isinstance(d, dict):
+ return {k: preprocess_for_json(v) for k, v in d.items()}
+ elif isinstance(d, list):
+ return [preprocess_for_json(i) for i in d]
+ elif isinstance(d, (datetime, date)):
+ return d.isoformat()
+ return d
+
+class ServerConfigDialog(QDialog, Ui_serverDialog):
+ """
+ Logic for the Server Configuration Dialog.
+ Inherits from QDialog (functionality) and Ui_serverDialog (layout).
+ """
+ def __init__(self, parent=None):
+ super().__init__(parent)
+ self.setupUi(self) # Builds the UI defined in Designer
+
+ # Optional: Set default values based on current config if needed
+ # self.ServerHostlineEdit.setText("localhost")
+
+ def get_server_data(self):
+ """
+ Retrieve the server configuration data entered by the user.
+ :return: A dictionary with 'host' and 'port' keys.
+ """
+ host = self.ServerHostlineEdit.text()
+ port = self.ServerSpinBox.value()
+ protocol = 'http' if self.radioHttp.isChecked() else 'https'
+ return {'host': host, 'port': port, 'protocol': protocol}
+
# This loads your .ui file so that PyQt can populate your plugin with the elements from Qt Designer
FORM_CLASS, _ = uic.loadUiType(
os.path.join(os.path.dirname(__file__), "pygeoapi_config_dialog_base.ui")
)
-
+
class PygeoapiConfigDialog(QtWidgets.QDialog, FORM_CLASS):
config_data: ConfigData
@@ -144,22 +184,142 @@ def on_button_clicked(self, button):
# You can also check the standard button type
if button == self.buttonBox.button(QDialogButtonBox.Save):
if self._set_validate_ui_data()[0]:
- file_path, _ = QFileDialog.getSaveFileName(
- self, "Save File", "", "YAML Files (*.yml);;All Files (*)"
- )
- # before saving, show diff with "Procced" and "Cancel" options
- if file_path and self._diff_original_and_current_data():
- self.save_to_file(file_path)
+ if self.serverRadio.isChecked():
+ self.server_config(save=True)
+ else:
+ file_path, _ = QFileDialog.getSaveFileName(
+ self, "Save File", "", "YAML Files (*.yml);;All Files (*)"
+ )
+
+ # before saving, show diff with "Procced" and "Cancel" options
+ if file_path and self._diff_original_and_current_data():
+ self.save_to_file(file_path)
elif button == self.buttonBox.button(QDialogButtonBox.Open):
- file_name, _ = QFileDialog.getOpenFileName(
- self, "Open File", "", "YAML Files (*.yml);;All Files (*)"
- )
- self.open_file(file_name)
+ if self.serverRadio.isChecked():
+ self.server_config(save=False)
+ else:
+ file_name, _ = QFileDialog.getOpenFileName(
+ self, "Open File", "", "YAML Files (*.yml);;All Files (*)"
+ )
+ self.open_file(file_name)
elif button == self.buttonBox.button(QDialogButtonBox.Close):
self.reject()
+ return
+
+ def server_config(self, save):
+
+ dialog = ServerConfigDialog(self)
+
+ if dialog.exec_():
+ data = dialog.get_server_data()
+ url = f"{data['protocol']}://{data['host']}:{data['port']}/admin/config"
+ if save == True:
+ self.push_to_server(url)
+ else:
+ self.pull_from_server(url)
+
+ def push_to_server(self, url):
+
+ QMessageBox.information(
+ self,
+ "Information",
+ f"Pushing configuration to: {url}",
+ )
+
+ config_dict = self.config_data.asdict_enum_safe(self.config_data)
+
+ # Pre-process the dictionary to handle datetime objects
+ processed_config_dict = preprocess_for_json(config_dict)
+
+ # TODO: support authentication through the QT framework
+ try:
+ # Send the PUT request to Admin API
+ response = requests.put(url, headers=headers, json=processed_config_dict)
+ response.raise_for_status()
+
+ QgsMessageLog.logMessage(
+ f"Success! Status Code: {response.status_code}")
+
+ QMessageBox.information(
+ self,
+ "Information",
+ f"Success! Status Code: {response.status_code}",
+ )
+
+ except requests.exceptions.RequestException as e:
+ QgsMessageLog.logMessage(f"An error occurred: {e}")
+ QMessageBox.critical(
+ self,
+ "Error",
+ f"An error occurred pulling the configuration from the server: {e}",
+ )
+
+
+ def pull_from_server(self, url):
+
+ QMessageBox.information(
+ self,
+ "Information",
+ f"Pulling configuration from: {url}",
+ )
+
+ # TODO: support authentication through the QT framework
+ try:
+ # Send the GET request to Admin API
+ response = requests.get(url, headers=headers)
+ response.raise_for_status()
+
+ QgsMessageLog.logMessage(
+ f"Success! Status Code: {response.status_code}")
+
+ QMessageBox.information(
+ self,
+ "Information",
+ f"Success! Status Code: {response.status_code}",
+ )
+
+ QgsMessageLog.logMessage(
+ f"Response: {response.text}")
+
+ data_dict = response.json()
+
+ self.config_data = ConfigData()
+ self.config_data.set_data_from_yaml(data_dict)
+ self.ui_setter.set_ui_from_data()
+
+ # log messages about missing or mistyped values during deserialization
+ QgsMessageLog.logMessage(
+ f"Errors during deserialization: {self.config_data.error_message}"
+ )
+ QgsMessageLog.logMessage(
+ f"Default values used for missing YAML fields: {self.config_data.defaults_message}"
+ )
+
+ # summarize all properties missing/overwitten with defaults
+ # atm, warning with the full list of properties
+ all_missing_props = self.config_data.all_missing_props
+ QgsMessageLog.logMessage(
+ f"All missing or replaced properties: {self.config_data.all_missing_props}"
+ )
+ if len(all_missing_props) > 0:
+ ReadOnlyTextDialog(
+ self,
+ "Warning",
+ f"All missing or replaced properties (check logs for more details): {self.config_data.all_missing_props}",
+ ).exec_()
+
+ except requests.exceptions.RequestException as e:
+ QgsMessageLog.logMessage(f"An error occurred: {e}")
+
+ QMessageBox.critical(
+ self,
+ "Error",
+ f"An error occurred pulling the configuration from the server: {e}",
+ )
+
def save_to_file(self, file_path):
diff --git a/pygeoapi_config_dialog_base.ui b/pygeoapi_config_dialog_base.ui
index 3cc6bcb..8177d28 100644
--- a/pygeoapi_config_dialog_base.ui
+++ b/pygeoapi_config_dialog_base.ui
@@ -7,7 +7,7 @@
0
0
870
- 490
+ 947
@@ -17,50 +17,41 @@
icon.pngicon.png
-
- -
-
-
- QDialogButtonBox::Close|QDialogButtonBox::Open|QDialogButtonBox::Save
-
-
-
- -
-
-
-
- Liberation Serif
-
-
-
- Brought to you with ❤️ by ByteRoad
-
-
- Qt::MarkdownText
-
-
-
- -
-
-
- 0
-
-
-
- Server
-
-
-
- 50
+
+
-
+
+
-
+
+
+ true
+
+
+
+
+ 0
+ -96
+ 834
+ 1050
+
-
-
-
-
- bind*
-
-
-
-
+
+
-
+
+
+ 0
+
+
+
+ Server
+
+
+
+ 50
+
+
-
+
+
+
QGroupBox {
background-color: rgba(240, 240, 240, 1); /* change to your desired color */
border: 0px solid #ffffffff; /* optional: border styling */
@@ -69,41 +60,38 @@
padding: 10px;
}
-
-
-
-
-
-
-
-
- -
-
-
- host*
-
-
-
- -
-
-
- port*
-
-
-
- -
-
-
-
-
-
-
- -
-
-
-
-
-
-
+
+
+ bind*
+
+
+
-
+
+
+ -
+
+
+ host*
+
+
+
+ -
+
+
+ port*
+
+
+
+ -
+
+
+
+
+
+ -
+
+
+
QGroupBox {
background-color: rgba(240, 240, 240, 1); /* change to your desired color */
border: 0px solid #ffffffff; /* optional: border styling */
@@ -112,85 +100,72 @@
padding: 10px;
}
-
-
-
-
-
-
-
-
-
-
-
- url*
-
-
-
- -
-
-
-
-
-
-
- -
-
-
+
+
+
+
+
-
-
-
- encoding*
-
-
+
+
-
+
+
+ url*
+
+
+
+ -
+
+
+
-
-
-
+
-
-
- utf-8
-
+
+
+ encoding*
+
+
-
-
-
-
-
-
- -
-
-
-
-
-
-
- mimetype*
-
-
+
-
+
+
-
+
+ utf-8
+
+
+
+
+
-
-
+
-
-
- application/json; charset=UTF-8
-
+
+
+ mimetype*
+
+
+
+ -
+
+
-
+
+ application/json; charset=UTF-8
+
+
+
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
- map*
-
-
-
+
+
+
+
+
+ -
+
+
+
QGroupBox {
background-color: rgba(240, 240, 240, 1); /* change to your desired color */
border: 0px solid #ffffffff; /* optional: border styling */
@@ -199,40 +174,38 @@
padding: 10px;
}
-
-
-
-
-
-
- -
-
-
- attribution*
-
-
-
- -
-
-
- -
-
-
- url*
-
-
-
-
-
-
-
-
- -
-
-
- logging*
-
-
-
+
+
+ map*
+
+
+
-
+
+
+ -
+
+
+ attribution*
+
+
+
+ -
+
+
+ -
+
+
+ url*
+
+
+
+
+
+
+ -
+
+
+
QGroupBox {
background-color: rgba(240, 240, 240, 1); /* change to your desired color */
border: 0px solid #ffffffff; /* optional: border styling */
@@ -241,137 +214,124 @@
padding: 10px;
}
-
-
-
-
+
+
+ logging*
+
+
-
-
-
- level*
-
-
+
+
+ level*
+
+
-
-
-
-
-
-
-
+
+ -
+
+
+
-
-
-
-
- logfile
-
-
+
+
+ logfile
+
+
-
-
-
-
-
-
- -
-
-
- 📂
-
-
-
-
-
-
-
-
- 50
- 100
-
-
-
-
-
-
-
- -
-
+
+
-
+
+
+ -
+
+
+
+ 50
+ 100
+
+
- logformat
+ 📂
+
+
+
+ ..
-
+
+
+
+
+ -
+
+
+ logformat
+
+
-
-
-
-
-
-
-
+
+ -
+
+
+
-
-
-
-
- dateformat
-
-
+
+
+ dateformat
+
+
-
-
-
-
-
-
-
+
+ -
+
+
+
-
-
-
-
- rotation
-
-
- false
-
-
+
+
+ false
+
+
+ rotation
+
+
-
-
-
-
-
-
-
- Qt::ScrollBarAlwaysOff
-
-
-
- 1000
- 22
-
-
-
- QAbstractItemView::NoEditTriggers
-
-
- false
-
-
-
-
-
+
+ -
+
+
+ false
+
+
+
+ 1000
+ 22
+
+
+
+ Qt::ScrollBarAlwaysOff
+
+
+ QAbstractItemView::NoEditTriggers
+
+
+
+
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
+
+
+
+ -
+
+
+
QGroupBox {
background-color: rgba(240, 240, 240, 1); /* change to your desired color */
border: 0px solid #ffffffff; /* optional: border styling */
@@ -380,144 +340,126 @@
padding: 10px;
}
-
-
-
-
-
-
-
-
- language
-
-
-
- -
-
-
-
- -
-
-
- languages
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
- Qt::Vertical
-
-
-
- 20
- 10
-
-
-
-
-
+
+
+
+
+
+ -
+
+
+ language
+
+
+
+ -
+
+
+ -
+
+
+ languages
+
+
+
+ -
+
-
-
+
+
-
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 10
+
+
+
+
+ -
+
-
-
+
en-US
-
+
-
-
+
en-GB
-
+
-
-
+
fr-CA
-
+
-
-
+
fr-FR
-
+
-
-
+
pt-PT
-
+
-
-
+
-
-
-
+
- Add
+ Add
-
+
-
-
-
- -
-
-
-
-
-
-
-
- Qt::Vertical
-
-
-
- 20
- 10
-
-
-
-
-
- -
-
-
-
-
- 1000
- 80
-
-
-
+
-
-
-
- Delete Selected
-
-
+
+
-
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 10
+
+
+
+
+ -
+
+
+
+ 1000
+ 80
+
+
+
+
+ -
+
+
+ Delete Selected
+
+
+
+
-
-
-
-
-
-
-
-
-
-
- -
-
-
- limits
-
-
-
+
+
+
+
+
+ -
+
+
+
QGroupBox {
background-color: rgba(240, 240, 240, 1); /* change to your desired color */
border: 0px solid #ffffffff; /* optional: border styling */
@@ -526,132 +468,125 @@
padding: 10px;
}
-
-
-
-
-
-
-
-
-
- default
-
-
- true
-
-
-
- -
-
-
- 9999
-
-
-
-
-
- -
-
-
-
-
-
- on exceed
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- maximum
-
-
- true
-
-
-
- -
-
-
- 9999
-
-
-
-
-
-
- -
-
+
+
+ limits
+
+
+
-
+
+
-
+
+
+ default
+
+
+ true
+
+
+
+ -
+
+
+ 9999
+
+
+
+
+
+ -
+
+
-
+
+
+ on exceed
+
+
+
+ -
+
+
+
+
+ -
+
+
-
+
+
+ maximum
+
+
+ true
+
+
+
+ -
+
+
+ 9999
+
+
+
+
+
+ -
+
+
+ false
+
- max_distance_x
+ max_distance_x
+
+
+ -
+
- false
+ false
-
-
- -
-
+
+
+ -
+
- false
+ false
-
-
-
- -
-
- max_distance_y
+ max_distance_y
+
+
+ -
+
- false
+ false
-
-
- -
-
+
+
+ -
+
- false
+ false
-
-
-
- -
-
- max_distance_units
+ max_distance_units
+
+
+ -
+
- false
-
-
-
- -
-
-
- false
-
-
-
-
-
-
-
-
-
- -
-
-
- templates
-
-
-
+ false
+
+
+
+
+
+
+ -
+
+
+
QGroupBox {
background-color: rgba(240, 240, 240, 1); /* change to your desired color */
border: 0px solid #ffffffff; /* optional: border styling */
@@ -660,81 +595,72 @@
padding: 10px;
}
-
-
-
+
+
+ templates
+
+
-
-
-
- path
-
-
+
+
+ path
+
+
-
-
+
-
-
-
-
- 📂
-
-
-
-
-
-
-
-
-
- 50
- 100
-
-
-
+
+
+
+ 50
+ 100
+
+
+
+ 📂
+
+
+
+ ..
+
+
-
-
-
-
- static
-
-
+
+
+ static
+
+
-
-
+
-
-
-
- 📂
-
-
-
-
-
-
-
-
-
- 50
- 100
-
-
-
+
+
+
+ 50
+ 100
+
+
+
+ 📂
+
+
+
+ ..
+
+
-
-
-
-
-
- -
-
-
-
-
-
-
+
+
+
+ -
+
+
+
QGroupBox {
background-color: rgba(240, 240, 240, 1); /* change to your desired color */
border: 0px solid #ffffffff; /* optional: border styling */
@@ -743,244 +669,222 @@
padding: 10px;
}
-
-
-
+
+
+
+
+
-
-
-
- admin
-
-
+
+
+ admin
+
+
- -
-
-
-
-
-
-
+ -
+
+
-
+
+
+
-
-
-
-
- gzip
-
-
+
+
+ gzip
+
+
- -
-
-
-
-
-
-
-
+ -
+
+
-
+
+
+
-
-
-
-
- pretty print
-
-
+
+
+ pretty print
+
+
- -
-
-
-
-
-
-
+ -
+
+
-
+
+
+
-
-
-
-
- cors
-
-
+
+
+ cors
+
+
- -
-
-
-
-
-
-
+ -
+
+
-
+
+
+
-
-
-
-
- ogc_schemas_location
-
-
- false
-
-
+
+
+ false
+
+
+ ogc_schemas_location
+
+
-
-
-
-
-
-
- false
-
-
-
-
+
+ -
+
+
+ false
+
+
+
+
-
-
- -
-
-
- icon
-
-
- false
-
-
-
- -
-
-
- false
-
-
-
-
- -
-
-
- logo
-
-
- false
-
-
-
- -
-
-
- false
-
-
-
-
- -
-
-
- locale_dir
-
-
- false
-
-
-
- -
-
-
- false
-
-
-
-
- -
-
-
- api_rules
-
-
- false
-
-
-
- -
-
-
-
-
-
-
- Qt::ScrollBarAlwaysOff
-
-
-
- 1000
- 22
-
-
-
- QAbstractItemView::NoEditTriggers
-
-
- false
-
-
-
-
-
-
- -
-
-
- manager
-
-
- false
-
-
-
- -
-
-
-
-
-
-
- Qt::ScrollBarAlwaysOff
-
-
-
- 1000
- 22
-
-
-
- QAbstractItemView::NoEditTriggers
-
-
- false
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Metadata
-
-
-
-
- 50
-
-
- -
-
-
- identification*
-
-
-
+
-
+
+
+ false
+
+
+ icon
+
+
+
+ -
+
+
+ false
+
+
+
+ -
+
+
+ false
+
+
+ logo
+
+
+
+ -
+
+
+ false
+
+
+
+ -
+
+
+ false
+
+
+ locale_dir
+
+
+
+ -
+
+
+ false
+
+
+
+ -
+
+
+ false
+
+
+ api_rules
+
+
+
+ -
+
+
-
+
+
+ false
+
+
+
+ 1000
+ 22
+
+
+
+ Qt::ScrollBarAlwaysOff
+
+
+ QAbstractItemView::NoEditTriggers
+
+
+
+
+
+ -
+
+
+ false
+
+
+ manager
+
+
+
+ -
+
+
-
+
+
+ false
+
+
+
+ 1000
+ 22
+
+
+
+ Qt::ScrollBarAlwaysOff
+
+
+ QAbstractItemView::NoEditTriggers
+
+
+
+
+
+
+
+
+
+
+
+
+ Metadata
+
+
+
+ 50
+
+ -
+
+
+
QGroupBox {
background-color: rgba(240, 240, 240, 1); /* change to your desired color */
border: 0px solid #ffffffff; /* optional: border styling */
@@ -989,365 +893,324 @@
padding: 10px;
}
-
-
-
-
-
-
-
- title*
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
- Qt::Vertical
-
-
-
- 20
- 40
-
-
-
+
+
+ identification*
+
+
+
-
+
+
+ title*
+
+
-
- -
-
+
-
+
-
-
-
-
+
-
-
-
-
-
- en
+
+
+ Qt::Vertical
-
- -
-
- pt
+
+
+ 20
+ 40
+
+
+
+ -
+
+
-
+
+
-
+
+
-
+
+ en
+
+
+ -
+
+ pt
+
+
+ -
+
+ fr
+
+
+
+
+ -
+
+
+ Enter title
+
+
+
+
-
-
- fr
-
+
+
+ Add
+
+
-
+
-
- -
-
-
- Enter title
-
-
-
-
-
-
+
-
-
-
- Add
-
-
+
+
-
+
+
+
+ 1000
+ 200
+
+
+
+
+ -
+
+
+ Delete Selected
+
+
+
+
-
+
-
-
-
- -
-
-
-
-
-
-
-
- 1000
- 200
-
-
-
-
- -
-
-
- Delete Selected
-
-
-
-
-
-
-
-
-
-
- -
-
-
- description*
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
- Qt::Vertical
-
-
-
- 20
- 40
-
-
-
+
-
+
+
+ description*
+
+
-
- -
-
+
-
+
-
-
-
-
+
-
-
-
-
-
- en
+
+
+ Qt::Vertical
-
- -
-
- pt
+
+
+ 20
+ 40
+
+
+
+ -
+
+
-
+
+
-
+
+
-
+
+ en
+
+
+ -
+
+ pt
+
+
+ -
+
+ fr
+
+
+
+
+ -
+
+
+ Enter description
+
+
+
+
-
-
- fr
-
+
+
+ Add
+
+
-
+
-
- -
-
-
- Enter description
-
-
-
-
-
-
+
-
-
-
- Add
-
-
+
+
-
+
+
+
+ 1000
+ 200
+
+
+
+
+ -
+
+
+ Delete Selected
+
+
+
+
-
+
-
-
-
- -
-
-
-
-
-
-
-
- 1000
- 200
-
-
-
-
- -
-
-
- Delete Selected
-
-
-
-
-
-
-
-
-
- -
-
-
- keywords*
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
- Qt::Vertical
-
-
-
- 20
- 40
-
-
-
+
-
+
+
+ keywords*
+
+
-
- -
-
+
-
+
-
-
-
-
+
-
-
-
-
-
- en
+
+
+ Qt::Vertical
-
- -
-
- pt
+
+
+ 20
+ 40
+
+
+
+ -
+
+
-
+
+
-
+
+
-
+
+ en
+
+
+ -
+
+ pt
+
+
+ -
+
+ fr
+
+
+
+
+ -
+
+
+ Enter keyword
+
+
+
+
-
-
- fr
-
+
+
+ Add
+
+
-
+
-
- -
-
-
- Enter keyword
-
-
-
-
-
-
+
-
-
-
- Add
-
-
+
+
-
+
+
+
+ 1000
+ 200
+
+
+
+
+ -
+
+
+ Delete Selected
+
+
+
+
-
+
-
-
-
- -
-
-
-
-
-
-
-
- 1000
- 200
-
-
-
-
- -
-
-
- Delete Selected
-
-
-
-
-
-
-
-
-
- -
-
-
- keywords type
-
-
-
- -
-
-
-
-
- -
-
-
- terms of service
-
-
-
- -
-
-
-
-
- -
-
-
- url*
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
- -
-
-
- license*
-
-
-
+
-
+
+
+ keywords type
+
+
+
+ -
+
+
+ -
+
+
+ terms of service
+
+
+
+ -
+
+
+ -
+
+
+ url*
+
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+ 800
+ 150
+
+
+
+
QGroupBox {
background-color: rgba(240, 240, 240, 1); /* change to your desired color */
border: 0px solid #ffffffff; /* optional: border styling */
@@ -1356,52 +1219,44 @@
padding: 10px;
}
-
-
-
- 800
- 150
-
-
-
-
-
-
-
-
- name*
-
-
-
- -
-
-
-
-
- -
-
-
- url
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
- -
-
-
- provider*
-
-
-
+
+
+ license*
+
+
+
-
+
+
+ name*
+
+
+
+ -
+
+
+ -
+
+
+ url
+
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+ 800
+ 150
+
+
+
+
QGroupBox {
background-color: rgba(240, 240, 240, 1); /* change to your desired color */
border: 0px solid #ffffffff; /* optional: border styling */
@@ -1410,52 +1265,44 @@
padding: 10px;
}
-
-
-
- 800
- 150
-
-
-
-
-
-
-
-
- name*
-
-
-
- -
-
-
-
-
- -
-
-
- url
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
- -
-
-
- contact*
-
-
-
+
+
+ provider*
+
+
+
-
+
+
+ name*
+
+
+
+ -
+
+
+ -
+
+
+ url
+
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+ 300
+ 500
+
+
+
+
QGroupBox {
background-color: rgba(240, 240, 240, 1); /* change to your desired color */
border: 0px solid #ffffffff; /* optional: border styling */
@@ -1464,205 +1311,165 @@
padding: 10px;
}
-
-
-
- 300
- 500
-
-
-
-
-
-
-
-
- name*
-
-
-
- -
-
-
-
-
- -
-
-
- position
-
-
-
- -
-
-
-
-
- -
-
-
- address
-
-
-
- -
-
-
-
-
- -
-
-
- city
-
-
-
- -
-
-
-
-
- -
-
-
- stateorprovince
-
-
-
- -
-
-
-
-
- -
-
-
- postalcode
-
-
-
- -
-
-
-
-
- -
-
-
- country
-
-
-
- -
-
-
-
-
- -
-
-
- phone
-
-
-
- -
-
-
-
-
- -
-
-
- fax
-
-
-
- -
-
-
-
-
- -
-
-
- email
-
-
-
- -
-
-
-
-
- -
-
-
- url
-
-
-
- -
-
-
-
-
- -
-
-
- hours
-
-
-
- -
-
-
-
-
- -
-
-
- instructions
-
-
-
- -
-
-
-
-
- -
-
-
- role
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Resources
-
-
- -
-
-
- select collection
-
-
-
+
+
+ contact*
+
+
+
-
+
+
+ name*
+
+
+
+ -
+
+
+ -
+
+
+ position
+
+
+
+ -
+
+
+ -
+
+
+ address
+
+
+
+ -
+
+
+ -
+
+
+ city
+
+
+
+ -
+
+
+ -
+
+
+ stateorprovince
+
+
+
+ -
+
+
+ -
+
+
+ postalcode
+
+
+
+ -
+
+
+ -
+
+
+ country
+
+
+
+ -
+
+
+ -
+
+
+ phone
+
+
+
+ -
+
+
+ -
+
+
+ fax
+
+
+
+ -
+
+
+ -
+
+
+ email
+
+
+
+ -
+
+
+ -
+
+
+ url
+
+
+
+ -
+
+
+ -
+
+
+ hours
+
+
+
+ -
+
+
+ -
+
+
+ instructions
+
+
+
+ -
+
+
+ -
+
+
+ role
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+ Resources
+
+
+ -
+
+
+
QGroupBox {
background-color: rgba(240, 240, 240, 1); /* change to your desired color */
border: 0px solid #ffffffff; /* optional: border styling */
@@ -1671,53 +1478,53 @@
padding: 10px;
}
-
-
-
-
-
-
- Search by name
-
-
-
- -
-
-
- QAbstractItemView::NoEditTriggers
-
-
-
- -
-
-
- Load
-
-
-
- -
-
-
- Delete
-
-
-
- -
-
-
- New
-
-
-
-
-
-
- -
-
-
- collection details
-
-
-
+
+
+ select collection
+
+
+
-
+
+
+ Search by name
+
+
+
+ -
+
+
+ QAbstractItemView::NoEditTriggers
+
+
+
+ -
+
+
+ Load
+
+
+
+ -
+
+
+ Delete
+
+
+
+ -
+
+
+ New
+
+
+
+
+
+
+ -
+
+
+
QGroupBox {
background-color: rgba(240, 240, 240, 1); /* change to your desired color */
border: 0px solid #ffffffff; /* optional: border styling */
@@ -1726,76 +1533,76 @@
padding: 10px;
}
-
-
-
-
-
-
- title
-
-
-
- -
-
-
- true
-
-
-
- -
-
-
- description
-
-
-
- -
-
-
- true
-
-
-
- 0
- 0
-
-
-
- Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
- -
-
-
- false
-
-
- collection details
-
-
-
- 50
-
-
-
-
-
-
-
+
+
+ collection details
+
+
+
-
+
+
+ title
+
+
+
+ -
+
+
+ true
+
+
+
+ -
+
+
+ description
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop
+
+
+ true
+
+
+
+ -
+
+
+
+
+
+ -
+
+
+ false
+
+
+ collection details
+
+
+
+ 50
+
+
-
+
+
+
+ 400
+ 150
+
+
-
+
QGroupBox {
background-color: rgba(240, 240, 240, 1); /* change to your desired color */
border: 0px solid #ffffffff; /* optional: border styling */
@@ -1805,62 +1612,44 @@
}
-
-
- 400
- 150
-
-
-
-
-
-
-
-
- alias*
-
-
-
- -
-
-
-
-
- -
-
-
- type*
-
-
-
- -
-
-
-
-
- -
-
-
- visibility
-
-
-
- -
-
-
-
+
+ -
+
+
+ alias*
+
+
+
+ -
+
+
+ -
+
+
+ type*
+
+
+
+ -
+
+
+ -
+
+
+ visibility
+
+
+
+ -
+
+
-
-
-
-
- -
-
-
-
- title*
-
+
+
+ -
+
-
+
QGroupBox {
background-color: rgba(240, 240, 240, 1); /* change to your desired color */
border: 0px solid #ffffffff; /* optional: border styling */
@@ -1870,109 +1659,100 @@
}
-
-
-
-
-
-
-
-
-
-
-
-
+
+ title*
+
+
+
-
+
+
-
+
+
-
+
+
Qt::Vertical
-
-
+
+
- 20
- 40
+ 20
+ 40
-
+
-
-
- -
-
-
-
-
-
-
+
+ -
+
+
-
+
+
-
-
-
+
-
- en
+ en
-
- -
+
+ -
- pt
+ pt
-
- -
+
+ -
- fr
+ fr
-
+
-
-
- -
+
+ -
-
+
Enter title
-
-
-
-
-
-
- -
-
-
- Add
-
+
-
+
-
-
-
-
- -
-
-
-
-
-
-
- 1000
- 80
-
-
-
-
- -
-
-
- Delete Selected
-
-
-
+
+ -
+
+
+ Add
+
+
+
-
+
+
+
+ -
+
+
-
+
+
+
+ 1000
+ 80
+
+
+
+
+ -
+
+
+ Delete Selected
+
+
+
+
+
-
-
-
-
-
-
-
- -
-
-
-
- description*
-
+
+
+
+
+ -
+
-
+
QGroupBox {
background-color: rgba(240, 240, 240, 1); /* change to your desired color */
border: 0px solid #ffffffff; /* optional: border styling */
@@ -1982,110 +1762,100 @@
}
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ description*
+
+
+
-
+
+
-
+
+
-
+
+
Qt::Vertical
-
-
+
+
- 20
- 40
+ 20
+ 40
-
+
-
-
- -
-
-
-
-
-
-
+
+ -
+
+
-
+
+
-
-
-
+
-
- en
+ en
-
- -
+
+ -
- pt
+ pt
-
- -
+
+ -
- fr
+ fr
-
+
-
-
- -
+
+ -
-
+
Enter description
-
-
-
-
-
-
- -
-
-
- Add
-
+
-
+
-
-
-
-
- -
-
-
-
-
-
-
- 1000
- 80
-
-
-
-
- -
-
-
- Delete Selected
-
-
-
+
+ -
+
+
+ Add
+
+
+
-
+
+
+
+ -
+
+
-
+
+
+
+ 1000
+ 80
+
+
+
+
+ -
+
+
+ Delete Selected
+
+
+
+
+
-
-
-
-
-
-
-
- -
-
-
-
- keywords*
-
+
+
+
+
+ -
+
-
+
QGroupBox {
background-color: rgba(240, 240, 240, 1); /* change to your desired color */
border: 0px solid #ffffffff; /* optional: border styling */
@@ -2095,109 +1865,100 @@
}
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ keywords*
+
+
+
-
+
+
-
+
+
-
+
+
Qt::Vertical
-
-
+
+
- 20
- 40
+ 20
+ 40
-
+
-
-
- -
-
-
-
-
-
-
+
+ -
+
+
-
+
+
-
-
-
+
-
- en
+ en
-
- -
+
+ -
- pt
+ pt
-
- -
+
+ -
- fr
+ fr
-
+
-
-
- -
+
+ -
-
+
Enter keyword
-
+
-
-
-
-
- -
-
-
- Add
-
-
-
+
-
-
-
-
- -
-
-
-
-
-
-
- 1000
- 80
-
-
-
-
- -
-
-
- Delete Selected
-
-
-
+
+ -
+
+
+ Add
+
+
+
-
+
+
+
+ -
+
+
-
+
+
+
+ 1000
+ 80
+
+
+
+
+ -
+
+
+ Delete Selected
+
+
+
+
+
-
-
+
-
-
-
-
- -
-
-
- links
-
+
+
+ -
+
-
+
QGroupBox {
background-color: rgba(240, 240, 240, 1); /* change to your desired color */
border: 0px solid #ffffffff; /* optional: border styling */
@@ -2207,178 +1968,164 @@
}
-
-
-
-
-
-
-
-
-
-
-
-
+
+ links
+
+
+
-
+
+
-
+
+
-
+
+
Qt::Vertical
-
-
+
+
- 20
- 40
+ 20
+ 40
-
+
-
-
- -
-
-
-
-
-
-
-
-
-
- Type
-
-
-
- -
-
-
- text/csv
-
-
-
-
- -
-
-
- Relations
-
-
-
- -
-
-
- canonical
-
-
-
-
- -
-
-
- URL
-
-
-
- -
-
-
-
-
-
-
-
- -
-
-
- Title
-
-
-
- -
-
-
- (optional)
-
-
-
-
- -
-
-
- Language
-
-
-
- -
-
-
- (optional) e.g. 'en-US'
-
-
-
-
- -
-
-
- Length
-
-
-
- -
-
-
- (optional) content size
-
-
-
-
-
-
-
-
- -
-
-
- Add
-
+
+ -
+
+
-
+
+
-
+
+
+ Type
+
-
-
-
-
-
-
- -
-
-
-
-
-
-
- 200
- 0
-
-
-
-
- 250
- 300
-
-
+
+ -
+
+
+ text/csv
+
-
- -
-
-
- Delete Selected
-
+
+ -
+
+
+ Relations
+
-
+
+ -
+
+
+ canonical
+
+
+
+ -
+
+
+ URL
+
+
+
+ -
+
+
+
+
+
+
+ -
+
+
+ Title
+
+
+
+ -
+
+
+ (optional)
+
+
+
+ -
+
+
+ Language
+
+
+
+ -
+
+
+ (optional) e.g. 'en-US'
+
+
+
+ -
+
+
+ Length
+
+
+
+ -
+
+
+ (optional) content size
+
+
+
+
+
+ -
+
+
+ Add
+
+
+
-
+
+
+
+ -
+
+
-
+
+
+
+ 200
+ 0
+
+
+
+
+ 250
+ 300
+
+
+
+
+ -
+
+
+ Delete Selected
+
+
+
+
+
-
-
-
-
-
-
- -
-
-
- providers*
-
+
+
+
+
+ -
+
-
+
QGroupBox {
background-color: rgba(240, 240, 240, 1); /* change to your desired color */
border: 0px solid #ffffffff; /* optional: border styling */
@@ -2388,132 +2135,112 @@
}
-
-
-
-
-
-
-
-
-
-
-
- Qt::Vertical
-
-
-
- 20
- 40
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
- Add
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
- 200
- 300
-
-
-
-
-
- -
-
-
-
-
-
- Edit Selected
-
-
-
- -
-
-
- Delete Selected
-
-
-
-
-
-
+
+ providers*
+
+
+ -
+
+
-
+
+
-
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 40
+
+
+
+
+ -
+
+
-
+
+
-
+
+
-
-
+
+ -
+
+
+ Add
+
+
+
+
+
-
-
- -
-
-
-
-
-
-
-
- Read-only
-
-
-
-
- -
-
-
-
- 1000
- 40
-
-
-
- QAbstractItemView::NoEditTriggers
-
-
-
-
+
+ -
+
+
-
+
+
+
+ 200
+ 300
+
+
+
+
+ -
+
+
-
+
+
+ Edit Selected
+
+
+
+ -
+
+
+ Delete Selected
+
+
+
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
- spatial extents*
-
+
+
+
+
+
+ -
+
+
-
+
+
+ Read-only
+
+
+
+ -
+
+
+
+ 1000
+ 40
+
+
+
+ QAbstractItemView::NoEditTriggers
+
+
+
+
+
+
+
+
+ -
+
-
+
QGroupBox {
background-color: rgba(240, 240, 240, 1); /* change to your desired color */
border: 0px solid #ffffffff; /* optional: border styling */
@@ -2523,149 +2250,132 @@
}
-
-
-
-
-
-
-
- bbox*
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
- XMin
-
-
-
- -
-
-
- -180
-
-
-
-
-
- -
-
-
-
-
-
- YMin
-
-
-
- -
-
-
- -90
-
-
-
-
-
- -
-
-
-
-
-
- XMax
-
-
-
- -
-
-
- 180
-
-
-
-
-
- -
-
-
-
-
-
- YMax
-
-
-
- -
-
-
- 90
-
-
-
-
-
-
+
+ spatial extents*
+
+
+ -
+
+
+ bbox*
+
+
+
+ -
+
+
-
+
+
-
+
+
+ XMin
+
+
+
+ -
+
+
+ -180
+
+
+
-
-
- -
-
-
- crs
-
-
-
-
- -
-
-
-
-
-
+
+ -
+
+
-
+
+
+ YMin
+
-
- -
-
-
-
-
-
- CRS84
-
-
-
- -
-
-
- Validate
-
-
-
-
-
+
+ -
+
+
+ -90
+
+
+
+
+
+ -
+
+
-
+
+
+ XMax
+
+
+
+ -
+
+
+ 180
+
+
+
+
+
+ -
+
+
-
+
+
+ YMax
+
+
+
+ -
+
+
+ 90
+
+
+
+
+
-
-
-
-
+
+ -
+
+
+ crs
+
+
+
+ -
+
+
-
+
+
+ -
+
+
-
+
+
+ CRS84
+
+
+
+ -
+
+
+ Validate
+
+
+
+
+
+
+
-
-
-
-
-
-
- -
-
-
-
- temporal extents
-
+
+
+ -
+
-
+
QGroupBox {
background-color: rgba(240, 240, 240, 1); /* change to your desired color */
border: 0px solid #ffffffff; /* optional: border styling */
@@ -2675,61 +2385,58 @@
}
-
-
-
-
-
-
- begin
-
-
-
- -
-
-
- 1900-10-30T18:25:00Z
-
-
-
- -
-
-
- end
-
-
-
- -
-
-
- 1900-10-30T18:25:00Z
-
-
-
- -
-
-
- trs
-
-
-
- -
-
-
-
-
-
-
-
-
-
- -
-
-
-
+ temporal extents
+
+
+
-
+
+
+ begin
+
+
+
+ -
+
+
+ 1900-10-30T18:25:00Z
+
+
+
+ -
+
+
+ end
+
+
+
+ -
+
+
+ 1900-10-30T18:25:00Z
+
+
+
+ -
+
+
+ trs
+
+
+
+ -
+
+
+
+
+
+ -
+
+
+ false
-
+
QGroupBox {
background-color: rgba(240, 240, 240, 1); /* change to your desired color */
border: 0px solid #ffffffff; /* optional: border styling */
@@ -2739,51 +2446,43 @@
}
-
- false
-
-
-
-
-
-
-
-
- linked-data
-
-
- false
-
-
-
- -
-
-
- Qt::ScrollBarAlwaysOff
-
-
-
- 1000
- 25
-
-
-
- QAbstractItemView::NoEditTriggers
-
-
-
-
-
-
-
-
-
- -
-
-
+
+
+
-
+
+
+ false
+
+
+ linked-data
+
+
+
+ -
+
+
+
+ 1000
+ 25
+
+
+
+ Qt::ScrollBarAlwaysOff
+
+
+ QAbstractItemView::NoEditTriggers
+
+
+
+
+
+
+ -
+
-
+
QGroupBox {
background-color: rgba(240, 240, 240, 0); /* change to your desired color */
border: 0px solid #ffffffff; /* optional: border styling */
@@ -2793,55 +2492,89 @@
}
-
-
-
+
+
+
+
+
-
-
+
Save changes
-
+
-
- -
+
+ -
-
+
Cancel changes
-
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+ -
+
+
+ Qt::RightToLeft
+
+
+ Local File
+
+
+ true
+
+
+
+ -
+
+
+ Qt::RightToLeft
+
+
+ Server Connection
+
+
+
+ -
+
+
+ QDialogButtonBox::Close|QDialogButtonBox::Open|QDialogButtonBox::Save
+
+
+
+ -
+
+
+
+ Liberation Serif
+
+
+
+ Brought to you with ❤️ by ByteRoad
+
+
+ Qt::MarkdownText
+
-
-
-
-
-
-
+
+
+
+
+
+
-
- buttonBox
- clicked(QAbstractButton*)
- PygeoapiConfigDialogBase
- on_button_clicked()
-
-
- 271
- 375
-
-
- 271
- 198
-
-
-
pushButtonBrowse
clicked()
@@ -2858,7 +2591,6 @@
-
pushButtonBrowseTemplatesPath
clicked()
@@ -2875,7 +2607,6 @@
-
addServerLangsButton
clicked()
@@ -2892,7 +2623,6 @@
-
deleteServerLangsButton
clicked()
@@ -2909,7 +2639,6 @@
-
addMetadataIdTitleButton
clicked()
@@ -2926,7 +2655,6 @@
-
addMetadataIdDescriptionButton
clicked()
@@ -2943,7 +2671,6 @@
-
addMetadataKeywordButton
clicked()
@@ -2960,8 +2687,6 @@
-
-
addResTitleButton
clicked()
@@ -2978,8 +2703,6 @@
-
-
addResDescriptionButton
clicked()
@@ -2996,8 +2719,6 @@
-
-
addResKeywordsButton
clicked()
@@ -3014,7 +2735,6 @@
-
addResLinksButton
clicked()
@@ -3031,7 +2751,6 @@
-
addResProviderButton
clicked()
@@ -3048,7 +2767,6 @@
-
deleteMetadataIdTitleButton
clicked()
@@ -3065,7 +2783,6 @@
-
deleteMetadataIdDescriptionButton
clicked()
@@ -3082,7 +2799,6 @@
-
deleteResTitleButton
clicked()
@@ -3099,7 +2815,6 @@
-
deleteResDescriptionButton
clicked()
@@ -3116,7 +2831,6 @@
-
deleteResKeywordsButton
clicked()
@@ -3133,7 +2847,6 @@
-
deleteResLinksButton
clicked()
@@ -3150,7 +2863,6 @@
-
editResProviderButton
clicked()
@@ -3167,7 +2879,6 @@
-
deleteResProviderButton
clicked()
@@ -3184,8 +2895,6 @@
-
-
deleteMetadataKeywordButton
clicked()
@@ -3202,7 +2911,6 @@
-
pushButtonBrowseTemplatesStatic
clicked()
@@ -3219,7 +2927,6 @@
-
lineEditCollection
textChanged(QString)
@@ -3300,7 +3007,6 @@
-
pushSaveAndPreviewResource
clicked()
@@ -3333,7 +3039,6 @@
-
validateResExtentsCrsButton
clicked()
@@ -3350,7 +3055,22 @@
-
+
+ buttonBox
+ clicked(QAbstractButton*)
+ PygeoapiConfigDialogBase
+ on_button_clicked()
+
+
+ 271
+ 375
+
+
+ 271
+ 198
+
+
+
open_logfile_dialog()
diff --git a/server_config_dialog.py b/server_config_dialog.py
new file mode 100644
index 0000000..d27ecaa
--- /dev/null
+++ b/server_config_dialog.py
@@ -0,0 +1,88 @@
+# -*- coding: utf-8 -*-
+
+# Form implementation generated from reading ui file 'server_config_dialog.ui'
+#
+# Created by: PyQt5 UI code generator 5.15.11
+#
+# WARNING: Any manual changes made to this file will be lost when pyuic5 is
+# run again. Do not edit this file unless you know what you are doing.
+
+
+from PyQt5 import QtCore, QtGui, QtWidgets
+
+
+class Ui_serverDialog(object):
+ def setupUi(self, serverDialog):
+ serverDialog.setObjectName("serverDialog")
+ serverDialog.resize(382, 173)
+ self.verticalLayout = QtWidgets.QVBoxLayout(serverDialog)
+ self.verticalLayout.setObjectName("verticalLayout")
+ self.serverGroupBox = QtWidgets.QGroupBox(serverDialog)
+ self.serverGroupBox.setTitle("")
+ self.serverGroupBox.setObjectName("serverGroupBox")
+ self.gridLayout = QtWidgets.QGridLayout(self.serverGroupBox)
+ self.gridLayout.setObjectName("gridLayout")
+ self.radioHttp = QtWidgets.QRadioButton(self.serverGroupBox)
+ self.radioHttp.setChecked(True)
+ self.radioHttp.setObjectName("radioHttp")
+ self.gridLayout.addWidget(self.radioHttp, 0, 0, 1, 1)
+ self.radioHttps = QtWidgets.QRadioButton(self.serverGroupBox)
+ self.radioHttps.setObjectName("radioHttps")
+ self.gridLayout.addWidget(self.radioHttps, 0, 1, 1, 1)
+ spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
+ self.gridLayout.addItem(spacerItem, 0, 2, 1, 1)
+ self.verticalLayout.addWidget(self.serverGroupBox)
+ self.serverHorizontalLayout = QtWidgets.QHBoxLayout()
+ self.serverHorizontalLayout.setObjectName("serverHorizontalLayout")
+ self.labelServerHost = QtWidgets.QLabel(serverDialog)
+ self.labelServerHost.setObjectName("labelServerHost")
+ self.serverHorizontalLayout.addWidget(self.labelServerHost)
+ self.ServerHostlineEdit = QtWidgets.QLineEdit(serverDialog)
+ self.ServerHostlineEdit.setObjectName("ServerHostlineEdit")
+ self.serverHorizontalLayout.addWidget(self.ServerHostlineEdit)
+ self.verticalLayout.addLayout(self.serverHorizontalLayout)
+ self.horizontalLayout = QtWidgets.QHBoxLayout()
+ self.horizontalLayout.setObjectName("horizontalLayout")
+ self.serverPortLabel = QtWidgets.QLabel(serverDialog)
+ self.serverPortLabel.setObjectName("serverPortLabel")
+ self.horizontalLayout.addWidget(self.serverPortLabel)
+ self.ServerSpinBox = QtWidgets.QSpinBox(serverDialog)
+ self.ServerSpinBox.setProperty("showGroupSeparator", True)
+ self.ServerSpinBox.setMaximum(100000000)
+ self.ServerSpinBox.setProperty("value", 5000)
+ self.ServerSpinBox.setObjectName("ServerSpinBox")
+ self.horizontalLayout.addWidget(self.ServerSpinBox)
+ spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
+ self.horizontalLayout.addItem(spacerItem1)
+ self.verticalLayout.addLayout(self.horizontalLayout)
+ spacerItem2 = QtWidgets.QSpacerItem(20, 1, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.MinimumExpanding)
+ self.verticalLayout.addItem(spacerItem2)
+ self.serverButtonBox = QtWidgets.QDialogButtonBox(serverDialog)
+ self.serverButtonBox.setOrientation(QtCore.Qt.Horizontal)
+ self.serverButtonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
+ self.serverButtonBox.setObjectName("serverButtonBox")
+ self.verticalLayout.addWidget(self.serverButtonBox)
+
+ self.retranslateUi(serverDialog)
+ self.serverButtonBox.accepted.connect(serverDialog.accept) # type: ignore
+ self.serverButtonBox.rejected.connect(serverDialog.reject) # type: ignore
+ QtCore.QMetaObject.connectSlotsByName(serverDialog)
+
+ def retranslateUi(self, serverDialog):
+ _translate = QtCore.QCoreApplication.translate
+ serverDialog.setWindowTitle(_translate("serverDialog", "Dialog"))
+ self.radioHttp.setText(_translate("serverDialog", "http"))
+ self.radioHttps.setText(_translate("serverDialog", "https"))
+ self.labelServerHost.setText(_translate("serverDialog", "Host"))
+ self.ServerHostlineEdit.setText(_translate("serverDialog", "localhost"))
+ self.serverPortLabel.setText(_translate("serverDialog", "Port"))
+
+
+if __name__ == "__main__":
+ import sys
+ app = QtWidgets.QApplication(sys.argv)
+ serverDialog = QtWidgets.QDialog()
+ ui = Ui_serverDialog()
+ ui.setupUi(serverDialog)
+ serverDialog.show()
+ sys.exit(app.exec_())
diff --git a/server_config_dialog.ui b/server_config_dialog.ui
new file mode 100644
index 0000000..e75c511
--- /dev/null
+++ b/server_config_dialog.ui
@@ -0,0 +1,174 @@
+
+
+ serverDialog
+
+
+
+ 0
+ 0
+ 382
+ 173
+
+
+
+ Dialog
+
+
+ -
+
+
+
+
+
+
-
+
+
+ http
+
+
+ true
+
+
+
+ -
+
+
+ https
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+
+
+
+ -
+
+
-
+
+
+ Host
+
+
+
+ -
+
+
+ localhost
+
+
+
+
+
+ -
+
+
-
+
+
+ Port
+
+
+
+ -
+
+
+ true
+
+
+ 100000000
+
+
+ 5000
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+ QSizePolicy::MinimumExpanding
+
+
+
+ 20
+ 1
+
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+ QDialogButtonBox::Cancel|QDialogButtonBox::Ok
+
+
+
+
+
+
+
+
+ serverButtonBox
+ accepted()
+ serverDialog
+ accept()
+
+
+ 248
+ 254
+
+
+ 157
+ 274
+
+
+
+
+ serverButtonBox
+ rejected()
+ serverDialog
+ reject()
+
+
+ 316
+ 260
+
+
+ 286
+ 274
+
+
+
+
+