From a73d83e1bcf378dc971318f4cb50c7bd61157d99 Mon Sep 17 00:00:00 2001 From: EftyK Date: Tue, 14 Apr 2026 17:26:39 +0200 Subject: [PATCH 1/6] Add visual cue for mandatory fields in the Export tab. --- plugin/Plugin/Export/export_tab.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/plugin/Plugin/Export/export_tab.py b/plugin/Plugin/Export/export_tab.py index 0fa38e9..ef59b53 100644 --- a/plugin/Plugin/Export/export_tab.py +++ b/plugin/Plugin/Export/export_tab.py @@ -77,6 +77,7 @@ def setup_ui(self): self.instruction_label.setText( "Configure your project metadata and select an " "export location for the RO-Crate package." + "Fields marked with an asterisk (*) are required." ) self.instruction_label.setWordWrap(True) self.export_layout.addWidget(self.instruction_label) @@ -92,7 +93,7 @@ def setup_ui(self): self.author_layout.setContentsMargins(10, 10, 10, 10) # Author field - self.author_label = QLabel("Author:", self) + self.author_label = QLabel("Author (*):", self) self.author_LineEdit = QLineEdit(self) self.author_LineEdit.setPlaceholderText("Enter author name") self.author_LineEdit.setToolTip("Name of the author") @@ -124,7 +125,7 @@ def setup_ui(self): self.metadata_layout.setContentsMargins(10, 10, 10, 10) # License field - self.license_label = QLabel("License:", self) + self.license_label = QLabel("License (*):", self) self.license_ComboBox = QComboBox(self) self.license_ComboBox.setToolTip( "Select the license for your dataset (required)" @@ -133,14 +134,14 @@ def setup_ui(self): self.metadata_layout.addRow(self.license_label, self.license_ComboBox) # Title field - self.title_label = QLabel("Project Title:", self) + self.title_label = QLabel("Project Title (*):", self) self.title_LineEdit = QLineEdit(self) self.title_LineEdit.setPlaceholderText("Enter project title") self.title_LineEdit.setToolTip("Title for your QGIS project") self.metadata_layout.addRow(self.title_label, self.title_LineEdit) # Description field - self.description_label = QLabel("Description:", self) + self.description_label = QLabel("Description (*):", self) self.description_label.setAlignment( Qt.AlignLeading | Qt.AlignLeft | Qt.AlignTop ) @@ -166,7 +167,7 @@ def setup_ui(self): self.export_path_layout = QHBoxLayout() self.export_path_layout.setSpacing(8) - self.export_path_label = QLabel("Export Path:", self) + self.export_path_label = QLabel("Export Path (*):", self) self.export_path_label.setMinimumSize(QSize(80, 0)) self.export_path_layout.addWidget(self.export_path_label) From d0d2ff1b8e0e7a0b03c3874f014e57e9fff67ffb Mon Sep 17 00:00:00 2001 From: EftyK Date: Tue, 14 Apr 2026 18:06:17 +0200 Subject: [PATCH 2/6] Add visual cue for mandatory fields in the Layer Metadata dialog. --- plugin/Plugin/Layer/layer_metadata_dialog.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/plugin/Plugin/Layer/layer_metadata_dialog.py b/plugin/Plugin/Layer/layer_metadata_dialog.py index 4666db2..ff75587 100644 --- a/plugin/Plugin/Layer/layer_metadata_dialog.py +++ b/plugin/Plugin/Layer/layer_metadata_dialog.py @@ -55,6 +55,15 @@ def setup_ui(self): self.setMinimumSize(650, 700) self.resize(650, 700) + # Instruction label + self.instruction_label = QLabel(self) + self.instruction_label.setText( + "Fields marked with an asterisk (*) are required." + ) + self.instruction_label.setWordWrap(True) + self.main_layout.addWidget(self.instruction_label) + + # Main layout main_layout = QVBoxLayout() main_layout.setSpacing(15) @@ -145,7 +154,7 @@ def _create_basic_info_section(self, main_layout): self.description_textedit.setToolTip( "Provide a clear description of what this layer contains and its intended use" ) - basic_info_layout.addRow("Description:", self.description_textedit) + basic_info_layout.addRow("Description (*): ", self.description_textedit) basic_info_group.setLayout(basic_info_layout) main_layout.addWidget(basic_info_group) @@ -242,7 +251,7 @@ def _create_external_source_section(self, main_layout): self.source_title_lineedit.setToolTip( "Enter the official name or title of the data source" ) - source_info_layout.addRow("Source Title:", self.source_title_lineedit) + source_info_layout.addRow("Source Title (*): ", self.source_title_lineedit) # Source URL self.source_url_lineedit = QLineEdit() @@ -250,7 +259,7 @@ def _create_external_source_section(self, main_layout): self.source_url_lineedit.setToolTip( "Enter the URL where this data was obtained" ) - source_info_layout.addRow("Source URL:", self.source_url_lineedit) + source_info_layout.addRow("Source URL (*): ", self.source_url_lineedit) # Source Date self.source_date_dateedit = QDateEdit() From 4b7b83628b96d6ef4cbc529cf26de451f889fa1c Mon Sep 17 00:00:00 2001 From: EftyK Date: Wed, 15 Apr 2026 10:54:53 +0200 Subject: [PATCH 3/6] Use 'Data Source' as 'Source URL' for external sources. --- plugin/Plugin/Layer/layer_metadata_dialog.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugin/Plugin/Layer/layer_metadata_dialog.py b/plugin/Plugin/Layer/layer_metadata_dialog.py index ff75587..50f9ce0 100644 --- a/plugin/Plugin/Layer/layer_metadata_dialog.py +++ b/plugin/Plugin/Layer/layer_metadata_dialog.py @@ -359,8 +359,14 @@ def populate_fields(self): # External source fields if hasattr(self.layer, "source_title") and self.layer.source_title: self.source_title_lineedit.setText(self.layer.source_title) + # Set source URL from layer.source_url if available, otherwise use data source if hasattr(self.layer, "source_url") and self.layer.source_url: self.source_url_lineedit.setText(self.layer.source_url) + else: + # Use the data source as the source URL + data_source = str(getattr(self.layer, "source", "")) + if data_source: + self.source_url_lineedit.setText(data_source) if hasattr(self.layer, "source_date") and self.layer.source_date: date = QDate.fromString(self.layer.source_date, "yyyy-MM-dd") if date.isValid(): From b62435a2172bae4e43f8a4a764329b6e19b7d228 Mon Sep 17 00:00:00 2001 From: EftyK Date: Wed, 15 Apr 2026 10:59:01 +0200 Subject: [PATCH 4/6] Update the state of the Export RO-Crate button if the mandatory fields change. --- plugin/Plugin/Export/export_tab.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugin/Plugin/Export/export_tab.py b/plugin/Plugin/Export/export_tab.py index ef59b53..418a12e 100644 --- a/plugin/Plugin/Export/export_tab.py +++ b/plugin/Plugin/Export/export_tab.py @@ -282,6 +282,8 @@ def _setup_signal_connections(self): # Field validation connections self.title_LineEdit.textChanged.connect(self.validate_form) + self.description_TextEdit.textChanged.connect(self.validate_form) + self.author_LineEdit.textChanged.connect(self.validate_form) self.export_path_LineEdit.textChanged.connect(self.validate_form) self.license_ComboBox.currentTextChanged.connect(self.validate_form) From 470d9aa7756fe517a0fc26acc986607f1c67535d Mon Sep 17 00:00:00 2001 From: EftyK Date: Wed, 15 Apr 2026 16:29:35 +0200 Subject: [PATCH 5/6] Resize layer metadata window.. --- plugin/Plugin/Layer/layer_metadata_dialog.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin/Plugin/Layer/layer_metadata_dialog.py b/plugin/Plugin/Layer/layer_metadata_dialog.py index 50f9ce0..0cfdd3e 100644 --- a/plugin/Plugin/Layer/layer_metadata_dialog.py +++ b/plugin/Plugin/Layer/layer_metadata_dialog.py @@ -52,8 +52,8 @@ def __init__(self, parent=None, layer=None): def setup_ui(self): """Setup the user interface components and layout.""" self.setWindowTitle("Layer Metadata Documentation") - self.setMinimumSize(650, 700) - self.resize(650, 700) + self.setMinimumSize(650, 750) + self.resize(650, 750) # Instruction label self.instruction_label = QLabel(self) From 6d1fc80396f944dfbed58771b9affdce92b003c5 Mon Sep 17 00:00:00 2001 From: EftyK Date: Thu, 16 Apr 2026 14:59:49 +0200 Subject: [PATCH 6/6] Adjust visual changes in the layer metadata dialog. --- plugin/Plugin/Layer/layer_metadata_dialog.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/plugin/Plugin/Layer/layer_metadata_dialog.py b/plugin/Plugin/Layer/layer_metadata_dialog.py index 0cfdd3e..1482e66 100644 --- a/plugin/Plugin/Layer/layer_metadata_dialog.py +++ b/plugin/Plugin/Layer/layer_metadata_dialog.py @@ -52,8 +52,8 @@ def __init__(self, parent=None, layer=None): def setup_ui(self): """Setup the user interface components and layout.""" self.setWindowTitle("Layer Metadata Documentation") - self.setMinimumSize(650, 750) - self.resize(650, 750) + self.setMinimumSize(650, 850) + self.resize(650, 850) # Instruction label self.instruction_label = QLabel(self) @@ -61,7 +61,7 @@ def setup_ui(self): "Fields marked with an asterisk (*) are required." ) self.instruction_label.setWordWrap(True) - self.main_layout.addWidget(self.instruction_label) + # Main layout @@ -77,6 +77,8 @@ def setup_ui(self): self._create_external_source_section(main_layout) self._create_button_section(main_layout) + main_layout.addWidget(self.instruction_label) + self.setLayout(main_layout) def setup_logic(self):