Skip to content
Snippets Groups Projects
Commit 99215790 authored by A Nilsen's avatar A Nilsen
Browse files

Update get_nib/metadata.txt, get_nib/resources.py, get_nib/icon.png,...

Update get_nib/metadata.txt, get_nib/resources.py, get_nib/icon.png, get_nib/get_nib.py, get_nib/get_nib_dialog_base.ui, get_nib/get_nib_dialog.py, get_nib/__init__.py, get_nib/resources.qrc
parent ddd8cf3e
Branches
No related tags found
No related merge requests found
# -*- coding: utf-8 -*-
"""
/***************************************************************************
getnib
A QGIS plugin
Hent alle of-prosket i utsnitt
Generated by Plugin Builder: http://g-sherman.github.io/Qgis-Plugin-Builder/
-------------------
begin : 2021-12-22
copyright : (C) 2021 by ban, NIBIO
email : ban@nibio.no
git sha : $Format:%H$
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
This script initializes the plugin, making it known to QGIS.
"""
# noinspection PyPep8Naming
def classFactory(iface): # pylint: disable=invalid-name
"""Load getnib class from file getnib.
:param iface: A QGIS interface instance.
:type iface: QgsInterface
"""
#
from .get_nib import getnib
return getnib(iface)
This diff is collapsed.
# -*- coding: utf-8 -*-
"""
/***************************************************************************
getnibDialog
A QGIS plugin
Plugin "NIB of-prosjekt"
Hent alle of-prosjekt i et utsnitt fra Norge i bilder (WMS)
Utsnittet kan være bounding boksen til
- et kartlag i Layers panel
- en fil man laster opp
- aktuelt map canvas
Generated by Plugin Builder: http://g-sherman.github.io/Qgis-Plugin-Builder/
-------------------
begin : 2021-12-22
git sha : $Format:%H$
copyright : (C) 2021 by ban, NIBIO
email : ban@nibio.no
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
"""
import os
from qgis.PyQt import uic
from qgis.PyQt import QtWidgets
# 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__), 'get_nib_dialog_base.ui'))
class getnibDialog(QtWidgets.QDialog, FORM_CLASS):
def __init__(self, parent=None):
"""Constructor."""
super(getnibDialog, self).__init__(parent)
# Set up the user interface from Designer through FORM_CLASS.
# After self.setupUi() you can access any designer object by doing
# self.<objectname>, and you can use autoconnect slots - see
# http://qt-project.org/doc/qt-4.8/designer-using-a-ui-file.html
# #widgets-and-dialogs-with-auto-connect
self.setupUi(self)
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>getnibDialogBase</class>
<widget class="QDialog" name="getnibDialogBase">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>331</width>
<height>180</height>
</rect>
</property>
<property name="windowTitle">
<string>NIB of-prosjekt</string>
</property>
<widget class="QDialogButtonBox" name="button_box">
<property name="geometry">
<rect>
<x>-20</x>
<y>140</y>
<width>341</width>
<height>32</height>
</rect>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
<widget class="QPushButton" name="pushButton">
<property name="geometry">
<rect>
<x>280</x>
<y>110</y>
<width>40</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>...</string>
</property>
</widget>
<widget class="QComboBox" name="comboBox">
<property name="geometry">
<rect>
<x>88</x>
<y>70</y>
<width>231</width>
<height>22</height>
</rect>
</property>
</widget>
<widget class="QCheckBox" name="checkBox">
<property name="geometry">
<rect>
<x>10</x>
<y>40</y>
<width>311</width>
<height>17</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Use current map canvas</string>
</property>
</widget>
<widget class="QLineEdit" name="lineEdit">
<property name="geometry">
<rect>
<x>90</x>
<y>110</y>
<width>181</width>
<height>22</height>
</rect>
</property>
</widget>
<widget class="QLabel" name="label_lyr">
<property name="geometry">
<rect>
<x>10</x>
<y>70</y>
<width>81</width>
<height>16</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Select layer</string>
</property>
</widget>
<widget class="QLabel" name="label_file">
<property name="geometry">
<rect>
<x>10</x>
<y>110</y>
<width>71</width>
<height>16</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Select file</string>
</property>
</widget>
<widget class="QCheckBox" name="checkBoxNib">
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>271</width>
<height>17</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Reset (empty) &quot;Nib-prosjekt&quot;-group</string>
</property>
</widget>
</widget>
<resources/>
<connections>
<connection>
<sender>button_box</sender>
<signal>accepted()</signal>
<receiver>getnibDialogBase</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>20</x>
<y>20</y>
</hint>
<hint type="destinationlabel">
<x>20</x>
<y>20</y>
</hint>
</hints>
</connection>
<connection>
<sender>button_box</sender>
<signal>rejected()</signal>
<receiver>getnibDialogBase</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>20</x>
<y>20</y>
</hint>
<hint type="destinationlabel">
<x>20</x>
<y>20</y>
</hint>
</hints>
</connection>
</connections>
</ui>
get_nib/icon.png

660 B

# This file contains metadata for your plugin.
# This file should be included when you package your plugin.
# Mandatory items:
[general]
name=NIB-ortofoto-prosjekt
qgisMinimumVersion=3.0
description=Hent alle ortofoto-prosjekt fra Norge i bilder (WMS) som ligger innafor et utsnitt
version=0.5
author=ban, NIBIO
email=ban@nibio.no
about=Utsnittet kan være bounding boksen til
- et kartlag i Layers panel (table of contents (TOC))
- en fil man laster opp
- aktuelt map canvas (default)
Utsnittet kan ikke overskride 50 km x 50 km.
Alle WMS-layere (ortofoto) havner i en egen gruppe "Nib-prosjekt".
Tidligere innhenta ortofoto kan slettes før nye hentes inn (husker siste valg).
tracker=http://bugs
repository=http://repo
# End of mandatory metadata
# Recommended items:
hasProcessingProvider=no
# Uncomment the following line and add your changelog:
changelog=
0.1: Default logo og kun vektor-layer og -fil mulig for utsnitt, Nib-prosjekt kollapser
0.2: Egen logo, inkludert current map canvas for utsnitt, bruke prosjektets crs som WMS-crs
0.3: Slette eksisterende WMS-layere i Nib-prosjekt-gruppa, maks. utsnitt satt til 50 km x 50 km og current map canvas satt til default
0.4: Inkludert raster-layer og -fil for utsnitt
0.5: Mulig å tømme "Nib-prosjekt" før ny ortofoto-innhenting (husker siste valg), Nib-prosjekt ekspanderer slik at alle wms-lag sees umiddelbart - alle lag er imidlertid slått av for raskere opptegning
# Tags are comma separated with spaces allowed
tags=python, wms, vector, extent
homepage=http://homepage
category=WMS
icon=icon.png
# experimental flag
experimental=True
# deprecated flag (applies to the whole plugin, not just a single version)
deprecated=False
# Since QGIS 3.8, a comma separated list of plugins to be installed
# (or upgraded) can be specified.
# Check the documentation for more information.
# plugin_dependencies=
Category of the plugin: Raster, Vector, Database or Web
#category=Vector
# If the plugin can run on QGIS Server.
server=False
# -*- coding: utf-8 -*-
# Resource object code
#
# Created by: The Resource Compiler for PyQt5 (Qt v5.15.2)
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore
qt_resource_data = b"\
\x00\x00\x02\x94\
\x89\
\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
\x00\x00\x17\x00\x00\x00\x17\x08\x06\x00\x00\x00\xe0\x2a\xd4\xa0\
\x00\x00\x00\x04\x73\x42\x49\x54\x08\x08\x08\x08\x7c\x08\x64\x88\
\x00\x00\x00\x01\x73\x52\x47\x42\x00\xae\xce\x1c\xe9\x00\x00\x00\
\x04\x67\x41\x4d\x41\x00\x00\xb1\x8f\x0b\xfc\x61\x05\x00\x00\x00\
\x09\x70\x48\x59\x73\x00\x00\x0e\xc4\x00\x00\x0e\xc4\x01\x95\x2b\
\x0e\x1b\x00\x00\x00\x19\x74\x45\x58\x74\x53\x6f\x66\x74\x77\x61\
\x72\x65\x00\x77\x77\x77\x2e\x69\x6e\x6b\x73\x63\x61\x70\x65\x2e\
\x6f\x72\x67\x9b\xee\x3c\x1a\x00\x00\x01\xf4\x49\x44\x41\x54\x48\
\x4b\x8d\x95\xbb\xcf\x31\x41\x14\xc6\xe7\xfb\x3a\x3a\x8d\x88\x42\
\xaf\x52\xd0\xe8\x14\x22\xa1\xd7\xea\x68\xe8\x84\x0a\x89\x42\x41\
\xa2\xa5\xd1\xb9\x25\x88\x4a\xad\x11\x7f\x83\x84\x28\x49\xd4\x12\
\xa2\x9a\x77\x9f\xb3\x33\xbb\xec\xce\x0e\xbf\x64\x9c\xdb\x73\x9e\
\x5d\x77\xc6\x7f\xa0\xd1\x68\x70\xbf\xdf\xcf\x19\x63\x14\x51\xff\
\xc2\x57\x73\x18\xe2\xb4\xdb\x6d\xbe\xdd\x6e\x29\xca\xde\x37\xb4\
\x8a\x74\x3a\xfd\x61\xb2\xdb\xed\x44\x66\x5e\x14\x73\x1d\x5a\x73\
\x18\x6c\x36\x1b\x2b\x97\x07\xa0\x2f\x73\x2f\x3c\xa7\x87\xc3\xc1\
\x5a\xae\xd5\x6a\x56\x8e\x88\x5a\xe6\xd0\x79\xf1\xdf\x10\x28\x09\
\x87\xc3\x14\xaf\xd7\x2b\x4b\xa5\x52\x94\xe7\xf3\x79\x8a\xa8\x2f\
\x97\x0b\xe5\x52\xa7\x44\x5c\x44\x09\xc6\xf5\x7a\x9d\xf2\x7e\xbf\
\xcf\x23\x91\x08\x45\x50\xad\x56\xad\x67\xe3\x85\x76\xda\xe9\x74\
\x3c\x0d\xd0\xef\x76\xbb\xa2\x52\xe3\x69\x7e\x3a\x9d\xc8\x00\x67\
\x34\x1a\x89\xae\xc9\x70\x38\xb4\x66\xc7\xe3\x51\x74\xdd\x28\xcd\
\x8d\xd7\x93\x16\x73\xb9\x1c\x2f\x95\x4a\x94\xbf\x83\xba\x52\xa9\
\xf0\x6c\x36\x4b\x39\xf4\x2a\x94\xe6\x58\x88\x46\xa3\xa2\x32\xeb\
\x62\xb1\x48\x79\xa1\x50\xf8\xb8\x18\x74\xef\xf5\x3b\xae\xee\x64\
\x32\x71\x89\xa7\xd3\x29\xf5\xd6\xeb\x35\xc5\xd5\x6a\x25\x26\x26\
\xe8\x61\xcf\x89\xcb\x3c\x1e\x8f\x73\xe3\xa3\x26\x2a\x1b\x79\x87\
\xb1\x58\x4c\x74\x6c\xa0\x4f\x24\x12\xa2\xb2\xb1\xcc\x6f\xb7\x1b\
\x1f\x0c\x06\x64\x90\xc9\x64\xf8\x62\xb1\x10\x13\x1b\xcc\x9c\x2c\
\x97\x4b\xd2\x63\x86\x7d\xf8\x48\x2c\xf5\x7e\xbf\x27\x81\x3c\xc1\
\x60\x50\x4c\xf4\x40\xf7\xbe\x07\x1f\x89\xeb\x56\x02\x81\x80\xf5\
\xc5\xf9\x15\xe8\xb1\xe7\xc4\x65\xae\xfa\xe8\x7d\x03\x7a\xec\x39\
\x71\xb9\xdc\xef\x77\x12\x8f\xc7\x63\xd1\xd1\x03\x1d\xf4\xd8\x73\
\xa2\xbc\xc5\x72\xb9\x4c\x0b\xe7\xf3\x59\x74\xd4\x60\x0e\x1d\xf4\
\x2a\x3c\x9f\x7f\x32\x99\xa4\xc5\x66\xb3\x49\xf5\xeb\xf5\xa2\x1a\
\x11\xb4\x5a\x2d\xaa\xa1\xf3\x42\xfb\xe2\xf6\x7a\x3d\x32\xc0\x09\
\x85\x42\x1f\x11\x07\x73\x1d\x3f\xbd\x73\xf3\xf9\x9c\x1b\xbf\xe5\
\x64\x88\x38\x9b\xcd\xc4\x44\xcf\x3f\x3c\x18\x4b\x5f\x79\x3e\x9f\
\xcc\xf8\xe7\x67\x8f\xc7\x83\xf9\x7c\x3e\xd1\xd5\xc1\xd8\x1f\x3c\
\x0b\x5d\x40\x01\xcd\x27\xcb\x00\x00\x00\x00\x49\x45\x4e\x44\xae\
\x42\x60\x82\
"
qt_resource_name = b"\
\x00\x07\
\x07\x3b\xe0\xb3\
\x00\x70\
\x00\x6c\x00\x75\x00\x67\x00\x69\x00\x6e\x00\x73\
\x00\x07\
\x0d\xca\x64\x32\
\x00\x67\
\x00\x65\x00\x74\x00\x5f\x00\x6e\x00\x69\x00\x62\
\x00\x08\
\x0a\x61\x5a\xa7\
\x00\x69\
\x00\x63\x00\x6f\x00\x6e\x00\x2e\x00\x70\x00\x6e\x00\x67\
"
qt_resource_struct_v1 = b"\
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x01\
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x02\
\x00\x00\x00\x14\x00\x02\x00\x00\x00\x01\x00\x00\x00\x03\
\x00\x00\x00\x28\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\
"
qt_resource_struct_v2 = b"\
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x01\
\x00\x00\x00\x00\x00\x00\x00\x00\
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x02\
\x00\x00\x00\x00\x00\x00\x00\x00\
\x00\x00\x00\x14\x00\x02\x00\x00\x00\x01\x00\x00\x00\x03\
\x00\x00\x00\x00\x00\x00\x00\x00\
\x00\x00\x00\x28\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\
\x00\x00\x01\x7d\xed\xb0\x55\xea\
"
qt_version = [int(v) for v in QtCore.qVersion().split('.')]
if qt_version < [5, 8, 0]:
rcc_version = 1
qt_resource_struct = qt_resource_struct_v1
else:
rcc_version = 2
qt_resource_struct = qt_resource_struct_v2
def qInitResources():
QtCore.qRegisterResourceData(rcc_version, qt_resource_struct, qt_resource_name, qt_resource_data)
def qCleanupResources():
QtCore.qUnregisterResourceData(rcc_version, qt_resource_struct, qt_resource_name, qt_resource_data)
qInitResources()
<RCC>
<qresource prefix="/plugins/get_nib" >
<file>icon.png</file>
</qresource>
</RCC>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment