From 257a184110fb584fe0a70f07fae9d217bc67ba19 Mon Sep 17 00:00:00 2001 From: Merydian Date: Wed, 1 Nov 2023 14:39:25 +0100 Subject: [PATCH 1/5] Add styling for output layer of main plugin Basic blue line from QGis default styles. --- ORStools/gui/ORStoolsDialog.py | 5 + ORStools/gui/linestyle.qml | 365 +++++++++++++++++++++++++++++++++ 2 files changed, 370 insertions(+) create mode 100644 ORStools/gui/linestyle.qml diff --git a/ORStools/gui/ORStoolsDialog.py b/ORStools/gui/ORStoolsDialog.py index 39e119b7..3f5e0623 100644 --- a/ORStools/gui/ORStoolsDialog.py +++ b/ORStools/gui/ORStoolsDialog.py @@ -230,6 +230,11 @@ def run_gui_control(self): layer_out.dataProvider().addAttributes(directions_core.get_fields()) layer_out.updateFields() + # style output layer + qml_path = os.path.join(os.path.dirname(__file__), 'linestyle.qml') + layer_out.loadNamedStyle(qml_path, True) + layer_out.triggerRepaint() + # Associate annotations with map layer, so they get deleted when layer is deleted for annotation in self.dlg.annotations: # Has the potential to be pretty cool: instead of deleting, associate with mapLayer diff --git a/ORStools/gui/linestyle.qml b/ORStools/gui/linestyle.qml new file mode 100644 index 00000000..63356505 --- /dev/null +++ b/ORStools/gui/linestyle.qml @@ -0,0 +1,365 @@ + + + + 1 + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + 0 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + 0 + generatedlayout + + + + + + + + + + + + + + + "new_field_name" + + 1 + From d07835943973cc0df0e94c556d0fc777bbdf94e6 Mon Sep 17 00:00:00 2001 From: Merydian Date: Mon, 6 Nov 2023 10:55:23 +0100 Subject: [PATCH 2/5] Adapt style to follow web client styling Namely #C62828 7px and #fff 11px. --- ORStools/gui/linestyle.qml | 376 ++++++++++++++++++++----------------- 1 file changed, 207 insertions(+), 169 deletions(-) diff --git a/ORStools/gui/linestyle.qml b/ORStools/gui/linestyle.qml index 63356505..f787fb84 100644 --- a/ORStools/gui/linestyle.qml +++ b/ORStools/gui/linestyle.qml @@ -1,194 +1,232 @@ - + 1 1 1 0 - + - + - + - + - + - + - + - + - + - + - + + + + + + + @@ -199,7 +237,7 @@ @@ -207,53 +245,53 @@ 0 0 1 - - - + + + - + - + @@ -261,12 +299,12 @@ - + @@ -274,17 +312,17 @@ - + - + - +