omassot 7 роки тому
батько
коміт
f2f18daaeb
9 змінених файлів з 220 додано та 3 видалено
  1. 36 0
      __init__.py
  2. BIN
      icon.png
  3. 1 1
      mncheck.py
  4. 1 2
      ui/dlg_main.py
  5. 68 0
      ui/dlg_main.ui
  6. BIN
      ui/rsc/knot.png
  7. 79 0
      ui/rsc/knot.svg
  8. BIN
      ui/rsc/network.png
  9. 35 0
      ui/rsc/network.svg

+ 36 - 0
__init__.py

@@ -0,0 +1,36 @@
+# -*- coding: utf-8 -*-
+"""
+/***************************************************************************
+ MnCheck
+                                 A QGIS plugin
+ Contrôle des données FTTH format MN
+ Generated by Plugin Builder: http://g-sherman.github.io/Qgis-Plugin-Builder/
+                             -------------------
+        begin                : 2018-12-07
+        copyright            : (C) 2018 by Manche Numérique 2019
+        email                : olivier.massot@manchenumerique.fr
+        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 MnCheck class from file MnCheck.
+
+    :param iface: A QGIS interface instance.
+    :type iface: QgsInterface
+    """
+    #
+    from .mncheck import MnCheck
+    return MnCheck(iface)


+ 1 - 1
mncheck.py

@@ -27,7 +27,7 @@ from PyQt5.QtCore import QSettings, QTranslator, qVersion, QCoreApplication
 from PyQt5.QtGui import QIcon
 from PyQt5.QtWidgets import QAction
 
-from ui.dlg_main import DlgMain
+from .ui.dlg_main import DlgMain
 
 from .resources import *
 

+ 1 - 2
ui/dlg_main.py

@@ -28,8 +28,7 @@ from PyQt5 import uic
 from PyQt5 import QtWidgets
 
 FORM_CLASS, _ = uic.loadUiType(os.path.join(
-    os.path.dirname(__file__), 'mncheck_dialog_base.ui'))
-
+    os.path.dirname(__file__), 'dlg_main.ui'))
 
 class DlgMain(QtWidgets.QDialog, FORM_CLASS):
     def __init__(self, parent=None):

+ 68 - 0
ui/dlg_main.ui

@@ -0,0 +1,68 @@
+<?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>418</width>
+    <height>301</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Dialog</string>
+  </property>
+  <widget class="QDialogButtonBox" name="buttonBox">
+   <property name="geometry">
+    <rect>
+     <x>30</x>
+     <y>240</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>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>Dialog</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>248</x>
+     <y>254</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>157</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>Dialog</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>316</x>
+     <y>260</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>286</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>

BIN
ui/rsc/knot.png


+ 79 - 0
ui/rsc/knot.svg

@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+	 viewBox="0 0 512.002 512.002" style="enable-background:new 0 0 512.002 512.002;" xml:space="preserve">
+<circle style="fill:#983262;" cx="256.001" cy="256" r="256"/>
+<path style="fill:#78274D;" d="M174.115,498.622c25.71,8.675,53.248,13.379,81.886,13.379c141.384,0,256-114.616,256-256
+	c0-10.8-0.678-21.442-1.976-31.892l-5.168-0.367l-71.44-71.44l-287.172,7.735L1.976,224.108l0,0l95.368,95.368l-83.965,18.41
+	L174.115,498.622z"/>
+<g>
+	<path style="fill:#FFECB3;" d="M81.886,256c0-11.24,2.12-21.987,5.947-31.892H35.632c-2.42,10.249-3.741,20.916-3.741,31.892
+		c0,10.976,1.321,21.644,3.741,31.892h52.202C84.007,277.987,81.886,267.24,81.886,256z"/>
+	<path style="fill:#FFECB3;" d="M476.368,287.892h-52.202h-84.044c-29.92,0-58.947,7.964-84.121,23.012
+		c-0.652,0.39-1.314,0.764-1.96,1.164c-21.566,13.314-41.767,22.968-58.59,28.207c-9.447,2.941-17.841,4.506-24.783,4.506
+		c-12.15,0-23.735-2.458-34.292-6.896H58.721c25.274,34.461,66.032,56.889,111.947,56.889c27.691,0,58.923-12.34,85.333-26.25
+		c8.728-4.598,16.93-9.366,24.304-13.917c11.102-6.854,23.368-11.681,36.247-14.333c7.678-1.581,15.574-2.389,23.573-2.389h35.502
+		h77.655h45.342c5.403-16.013,9.259-32.737,11.404-49.993H476.368z"/>
+</g>
+<path style="fill:#FFD863;" d="M476.368,287.892h-52.202h-84.044c-29.92,0-58.947,7.964-84.121,23.012
+	c-0.191,0.114-0.383,0.229-0.574,0.341v57.575c0.19-0.1,0.384-0.197,0.574-0.297c8.728-4.598,16.93-9.366,24.304-13.917
+	c11.102-6.854,23.368-11.681,36.247-14.333c7.678-1.581,15.574-2.389,23.573-2.389h35.502h77.655h45.342
+	c5.403-16.013,9.259-32.737,11.404-49.993H476.368z"/>
+<g>
+	<path style="fill:#FFCF35;" d="M87.834,287.892H35.632H1.976c2.145,17.256,6.001,33.98,11.404,49.993h45.34h77.655h35.502
+		c7.999,0,15.894,0.808,23.573,2.389c16.824-5.239,37.024-14.893,58.59-28.207c0.646-0.4,1.308-0.772,1.96-1.164
+		c-25.176-15.048-54.203-23.012-84.123-23.012H87.834z"/>
+	<path style="fill:#FFCF35;" d="M195.45,171.727c-7.678,1.581-15.574,2.389-23.573,2.389h-35.502H58.721H13.38
+		c-5.403,16.013-9.259,32.737-11.404,49.993h33.656h52.202h84.044c29.92,0,58.947-7.964,84.121-23.012
+		c-0.652-0.39-1.312-0.764-1.958-1.162C232.475,186.62,212.274,176.964,195.45,171.727z"/>
+</g>
+<path style="fill:#FFECB3;" d="M498.622,174.114h-45.342h-77.655h-35.502c-7.999,0-15.894-0.809-23.574-2.389
+	c-12.879-2.651-25.145-7.478-36.247-14.331c-7.373-4.551-15.576-9.319-24.304-13.917c-11.555-6.085-24.033-11.871-36.733-16.455
+	c-1.814-0.655-3.634-1.284-5.454-1.888c-3.643-1.207-7.296-2.303-10.942-3.27c-1.824-0.484-3.644-0.934-5.463-1.352
+	c-7.271-1.665-14.486-2.77-21.511-3.144c-1.753-0.095-3.498-0.143-5.227-0.143c-45.915,0-86.671,22.428-111.947,56.889h77.655
+	c10.555-4.437,22.142-6.896,34.292-6.896c0.867,0,1.758,0.024,2.67,0.072c6.387,0.34,13.846,1.86,22.113,4.434l0,0l0,0
+	c16.824,5.239,37.024,14.893,58.59,28.208c0.646,0.398,1.307,0.772,1.958,1.162c25.176,15.05,54.201,23.012,84.123,23.012h84.044
+	h52.202h33.659C507.881,206.853,504.024,190.128,498.622,174.114z"/>
+<path style="fill:#FFD863;" d="M498.622,174.114h-45.342h-77.655h-35.502c-7.999,0-15.894-0.809-23.574-2.389
+	c-12.879-2.651-25.145-7.478-36.247-14.331c-7.373-4.551-15.576-9.319-24.304-13.917c-0.19-0.1-0.383-0.198-0.574-0.297v57.577
+	c0.191,0.112,0.383,0.226,0.574,0.34c25.178,15.048,54.203,23.011,84.125,23.011h84.044h52.202h33.659
+	C507.881,206.853,504.024,190.128,498.622,174.114z"/>
+<path style="fill:#FFB344;" d="M476.368,224.108c-4.329-18.327-12.281-35.261-23.088-49.993
+	c-25.274-34.459-66.032-56.889-111.945-56.889c-27.689,0-58.923,12.34-85.335,26.252l0,0c8.728,4.598,16.93,9.366,24.304,13.917
+	c11.1,6.853,23.368,11.681,36.247,14.331l0,0c9.445-2.941,17.841-4.506,24.785-4.506c12.15,0,23.735,2.458,34.292,6.896
+	c22.211,9.337,39.836,27.462,48.542,49.993c3.827,9.906,5.947,20.652,5.947,31.892c0,11.24-2.12,21.987-5.947,31.892
+	c-8.706,22.531-26.331,40.657-48.542,49.993c-10.555,4.437-22.142,6.896-34.292,6.896c-6.944,0-15.338-1.565-24.783-4.506
+	c-12.879,2.651-25.145,7.48-36.247,14.333c-7.373,4.551-15.576,9.319-24.302,13.917c26.409,13.91,57.642,26.25,85.332,26.25
+	c45.915,0,86.671-22.428,111.947-56.889c10.805-14.733,18.76-31.666,23.088-49.993c2.42-10.249,3.741-20.916,3.741-31.892
+	C480.11,245.024,478.788,234.356,476.368,224.108z"/>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+</svg>

BIN
ui/rsc/network.png


+ 35 - 0
ui/rsc/network.svg

@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Capa_1" x="0px" y="0px" viewBox="0 0 55 55" style="enable-background:new 0 0 55 55;" xml:space="preserve" width="512px" height="512px">
+<path d="M49,0c-3.309,0-6,2.691-6,6c0,1.035,0.263,2.009,0.726,2.86l-9.829,9.829C32.542,17.634,30.846,17,29,17  s-3.542,0.634-4.898,1.688l-7.669-7.669C16.785,10.424,17,9.74,17,9c0-2.206-1.794-4-4-4S9,6.794,9,9s1.794,4,4,4  c0.74,0,1.424-0.215,2.019-0.567l7.669,7.669C21.634,21.458,21,23.154,21,25s0.634,3.542,1.688,4.897L10.024,42.562  C8.958,41.595,7.549,41,6,41c-3.309,0-6,2.691-6,6s2.691,6,6,6s6-2.691,6-6c0-1.035-0.263-2.009-0.726-2.86l12.829-12.829  c1.106,0.86,2.44,1.436,3.898,1.619v10.16c-2.833,0.478-5,2.942-5,5.91c0,3.309,2.691,6,6,6s6-2.691,6-6c0-2.967-2.167-5.431-5-5.91  v-10.16c1.458-0.183,2.792-0.759,3.898-1.619l7.669,7.669C41.215,39.576,41,40.26,41,41c0,2.206,1.794,4,4,4s4-1.794,4-4  s-1.794-4-4-4c-0.74,0-1.424,0.215-2.019,0.567l-7.669-7.669C36.366,28.542,37,26.846,37,25s-0.634-3.542-1.688-4.897l9.665-9.665  C46.042,11.405,47.451,12,49,12c3.309,0,6-2.691,6-6S52.309,0,49,0z M11,9c0-1.103,0.897-2,2-2s2,0.897,2,2s-0.897,2-2,2  S11,10.103,11,9z M6,51c-2.206,0-4-1.794-4-4s1.794-4,4-4s4,1.794,4,4S8.206,51,6,51z M33,49c0,2.206-1.794,4-4,4s-4-1.794-4-4  s1.794-4,4-4S33,46.794,33,49z M29,31c-3.309,0-6-2.691-6-6s2.691-6,6-6s6,2.691,6,6S32.309,31,29,31z M47,41c0,1.103-0.897,2-2,2  s-2-0.897-2-2s0.897-2,2-2S47,39.897,47,41z M49,10c-2.206,0-4-1.794-4-4s1.794-4,4-4s4,1.794,4,4S51.206,10,49,10z" fill="#006DF0"/>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+</svg>