-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #842 from Samweli/datasets_date_filtering
Enable date filtering in the datasets items
- Loading branch information
Showing
7 changed files
with
334 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import os | ||
from pathlib import Path | ||
|
||
from qgis.PyQt import QtWidgets, uic | ||
|
||
DatasetAdditionalMetadataUi, _ = uic.loadUiType( | ||
str(Path(__file__).parents[0] / "gui/DlgDatasetAdditionalMetadata.ui") | ||
) | ||
|
||
ICON_PATH = os.path.join(os.path.dirname(__file__), "icons") | ||
|
||
|
||
class DataSetAdditionalMetadataDialog(QtWidgets.QDialog, DatasetAdditionalMetadataUi): | ||
dataset: dict | ||
|
||
le_title: QtWidgets.QLineEdit | ||
te_author: QtWidgets.QTextEdit | ||
le_source: QtWidgets.QLineEdit | ||
te_citation: QtWidgets.QTextEdit | ||
|
||
def __init__(self, dataset: dict, parent=None): | ||
super().__init__(parent) | ||
self.setupUi(self) | ||
self.le_title.setText(dataset.get("title", "")) | ||
self.te_author.setPlainText(dataset.get("Data source", "")) | ||
self.le_source.setText(dataset.get("Source", "")) | ||
self.te_citation.setPlainText(dataset.get("Citation", "")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ui version="4.0"> | ||
<class>Dialog</class> | ||
<widget class="QDialog" name="Dialog"> | ||
<property name="geometry"> | ||
<rect> | ||
<x>0</x> | ||
<y>0</y> | ||
<width>706</width> | ||
<height>577</height> | ||
</rect> | ||
</property> | ||
<property name="windowTitle"> | ||
<string>Additional Metadata</string> | ||
</property> | ||
<layout class="QVBoxLayout" name="verticalLayout"> | ||
<property name="leftMargin"> | ||
<number>6</number> | ||
</property> | ||
<property name="topMargin"> | ||
<number>6</number> | ||
</property> | ||
<property name="rightMargin"> | ||
<number>6</number> | ||
</property> | ||
<property name="bottomMargin"> | ||
<number>6</number> | ||
</property> | ||
<item> | ||
<widget class="QScrollArea" name="scrollArea"> | ||
<property name="frameShape"> | ||
<enum>QFrame::NoFrame</enum> | ||
</property> | ||
<property name="widgetResizable"> | ||
<bool>true</bool> | ||
</property> | ||
<widget class="QWidget" name="scrollAreaWidgetContents"> | ||
<property name="geometry"> | ||
<rect> | ||
<x>0</x> | ||
<y>0</y> | ||
<width>694</width> | ||
<height>565</height> | ||
</rect> | ||
</property> | ||
<layout class="QVBoxLayout" name="verticalLayout_2"> | ||
<item> | ||
<widget class="QgsCollapsibleGroupBox" name="groupBox"> | ||
<property name="title"> | ||
<string>Metadata</string> | ||
</property> | ||
<layout class="QGridLayout" name="gridLayout"> | ||
<item row="8" column="0"> | ||
<widget class="QTextEdit" name="te_citation"> | ||
<property name="readOnly"> | ||
<bool>true</bool> | ||
</property> | ||
</widget> | ||
</item> | ||
<item row="2" column="0" colspan="3"> | ||
<widget class="QLineEdit" name="le_title"> | ||
<property name="readOnly"> | ||
<bool>true</bool> | ||
</property> | ||
</widget> | ||
</item> | ||
<item row="6" column="0"> | ||
<widget class="QLineEdit" name="le_source"> | ||
<property name="readOnly"> | ||
<bool>true</bool> | ||
</property> | ||
</widget> | ||
</item> | ||
<item row="1" column="0"> | ||
<widget class="QLabel" name="label"> | ||
<property name="text"> | ||
<string>Title</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item row="4" column="0" colspan="3"> | ||
<widget class="QTextEdit" name="te_author"> | ||
<property name="readOnly"> | ||
<bool>true</bool> | ||
</property> | ||
</widget> | ||
</item> | ||
<item row="7" column="0"> | ||
<widget class="QLabel" name="label_3"> | ||
<property name="text"> | ||
<string>Bibliographical Citation</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item row="3" column="0" colspan="2"> | ||
<widget class="QLabel" name="label_2"> | ||
<property name="text"> | ||
<string>Author or Publisher</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item row="5" column="0"> | ||
<widget class="QLabel" name="label_4"> | ||
<property name="text"> | ||
<string>Source Link or Identifier</string> | ||
</property> | ||
</widget> | ||
</item> | ||
</layout> | ||
</widget> | ||
</item> | ||
</layout> | ||
</widget> | ||
</widget> | ||
</item> | ||
</layout> | ||
</widget> | ||
<customwidgets> | ||
<customwidget> | ||
<class>QgsCollapsibleGroupBox</class> | ||
<extends>QGroupBox</extends> | ||
<header>qgscollapsiblegroupbox.h</header> | ||
<container>1</container> | ||
</customwidget> | ||
</customwidgets> | ||
<tabstops> | ||
<tabstop>scrollArea</tabstop> | ||
<tabstop>le_title</tabstop> | ||
<tabstop>te_author</tabstop> | ||
</tabstops> | ||
<resources/> | ||
<connections/> | ||
</ui> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.