[general]
name=FiberQ
description=Open-source fiber network design tools for QGIS (FTTH/GPON/FTTx)
about=FiberQ helps telecom engineers and GIS professionals design, analyze, and document fiber optic networks inside QGIS. FiberQ supports QGIS 4 / Qt6 while keeping support for QGIS 3.22 LTR and later, and clears all findings from the QGIS repository security scan. Some advanced features may require an activation key.

version=1.4.0
qgisMinimumVersion=3.22
qgisMaximumVersion=4.99

author=Vladimir Vukovic
email=vukovicvl@fiberq.net

icon=icons/fiberq.svg
category=Vector
tags=fiber,ftth,gpon,fttx,telecom,postgis,network,design

homepage=https://www.fiberq.net/
repository=https://github.com/vukovicvl/fiberq
tracker=https://github.com/vukovicvl/fiberq/issues

license=GPL-3.0-or-later

class_name=FiberQPlugin

changelog=
    1.4.0 - Project validation: find the problems before the client does
        * New: "Validate project" runs fourteen checks over the whole design and
          lists what it finds in a dockable panel - topology and connectivity,
          referential integrity, feature identity, required attributes, value
          domains, length coherence, CRS consistency and geometry health.
          Filter by severity, layer or rule; click any issue to jump to it.
        * New: export the results as a self-contained HTML report (for handover
          and audit files), JSON (machine-readable, stable keys) or CSV (for
          spreadsheets and issue trackers).
        * New: "Recalculate lengths" rewrites stored lengths that disagree with
          the drawn geometry. It shows exactly what will change before writing
          anything, and never touches slack values.
        * Fix: lengths are now measured on the project ellipsoid - true metres on
          the ground - everywhere. Routes and cables previously stored the length
          in map units, which in Web Mercator is inflated by 1/cos(latitude):
          about 1.4x at Serbian latitudes, 1.55x in the Netherlands, 1.86x in
          Finland.
          Pipes were already correct, so a trench and the duct inside it could
          disagree by that margin in the same project, and a bill of materials
          over-ordered cable to match. New features are measured correctly;
          use "Recalculate lengths" to repair existing ones.
        * Fix: placing an extension or a fiber break no longer creates an empty
          "Poles" layer as a side effect.
        * Fix: shipped layer styles named "MS Shell Dlg 2", a Windows-only font,
          so every Linux and macOS user got substituted label fonts and a warning
          per layer on load. They now use the portable "Sans Serif".
        * Fix: opening a project saved in QGIS 4 no longer re-runs the schema
          migration in QGIS 3. QGIS 4 stores project properties in a form QGIS 3
          cannot read, so the schema marker now falls back to the copy in the
          GeoPackage. Validation also reports a project left with no CRS, which
          is what that same QGIS limitation does to a downgraded project.
        * Fix: the fiber break tool accepted a click near any line, so a break
          could be recorded against a route or a duct and stored as if it were
          on a cable. It now targets cable layers only, and B1/B2 report the
          bad references already in your projects.
        * Docs: docs/validation-rules.md documents every rule - what it checks,
          why it matters, and what to do about a finding. docs/samples/ ships a
          small demo project you can open and validate yourself, alongside the
          report it produces.
        * i18n: the plugin is now translatable, with the English source catalogue
          and tooling in place; translations welcome.
        * The plugin now has a Support page - if FiberQ saves you time, you can
          help fund its development.
        (The validation engine and its reporting were developed with support from
        the NLnet NGI0 Commons Fund. The length-measurement fix, the stray-layer
        fix, the i18n groundwork and the support links were not funded by it.)

    1.3.0 - Project schema versioning, safe migrations, and stable feature IDs
        * New: every FiberQ project now carries a schema-version marker, also
          mirrored into the GeoPackage, so future releases can recognise and
          upgrade older projects safely.
        * New: a versioned migration runner upgrades older projects automatically
          on load (e.g. schema 0 -> 1.0) - losslessly and idempotently - and
          reports a summary in the QGIS log. Blank or non-FiberQ projects are
          left untouched.
        * New: the fiberq_uuid identity invariant. Every FiberQ feature carries a
          stable, cross-system UUID. Loading an older project assigns UUIDs to all
          existing features; new features receive one on creation across every
          tool (routes, cables, slack, pipes, service areas, objects, ...).
        * Fix: the cable "Number of fibers" field now follows the computed total
          instead of freezing at an intermediate value while typing.
        * Fix: the Objects draw tools (3-point / N-point / ortho / digitize) no
          longer raise an ImportError after the module split.
        * Fix: "Cut infrastructure" no longer fails to save on a duplicate primary
          key; the two halves get fresh feature ids and fresh fiberq_uuids.
        * Fix: the Optical Schematic View now draws pipes in the legend orange for
          English-named layers (previously grey), matching the "Pipes" legend.
        * Fix: renamed the mislabeled "FiberQ web browser" action to "Preview Map".
        * Compat: scoped all QGIS enum accesses (e.g. QgsWkbTypes.PointGeometry ->
          QgsWkbTypes.GeometryType.PointGeometry) for PyQt6 / QGIS 4; unchanged
          behaviour on QGIS 3 / Qt5.
        * Hardening: previously-silent exception handlers now log at debug level
          instead of swallowing errors, and the local lint gate runs Bandit at all
          severities to match the plugins.qgis.org scanner.
        * Quality: the maintainer manually reviewed the entire plugin source -
          every Python module - prior to this release. Lint (flake8 + Bandit)
          remains at zero findings on the plugins.qgis.org scan, and the pytest
          suite runs green on QGIS 3 (Qt5) and QGIS 4 (Qt6).
        (This release was developed with support from the NLnet NGI0 Commons Fund.)

    1.2.3 - Repository scan: zero findings (code hygiene, no functional change)
        * The plugin now scans clean on the plugins.qgis.org Security & Quality
          scan: flake8 (--max-line-length=120 --ignore=E501) and Bandit
          (medium/high) both report 0 findings.
        * Removed unused exception variables (except ... as e where e was never
          used). The handlers still catch the same exceptions; behavior unchanged.
        * Normalized whitespace around operators, continuation-line indentation,
          and split a few compound statements (autopep8). No logic change.
        * Removed a duplicate LayerNames / is_route_layer / is_cable_layer import
          in utils (kept the definitions already active at runtime; no change).
        * Annotated intentional multi-line conditions, conditional imports and
          accepted names with targeted "# noqa" instead of rewriting working code.
        * Packaging: the development flake8 config is no longer shipped inside
          the plugin package.

    1.2.2 - Housekeeping (code cleanup, no functional change)
        * Removed dead leftover code from the v1.x monolith split:
          extracted_classes.py (deprecated re-export shim) and two unused
          addon modules (settings, styles).
        * main_plugin.py: removed duplicate/unused imports and dead leftover
          import blocks. No behavior change.
        * Repo-wide style cleanup (unused imports, whitespace, blank lines).

    1.2.1 - QGIS 4 / Qt6 compatibility and repository scan compliance
        Compatibility
        * Full support for QGIS 4 / Qt6 while preserving QGIS 3.22 LTR and later.
        * Replaced 29 QDialog.exec_() call sites with exec() across 16 files;
          the underscored alias is gone in PyQt6 and previously caused
          "object has no attribute 'exec_'" errors on QGIS 4.
        * Fixed "QgsMapMouseEvent object has no attribute 'x'" in five map
          tools (Move Elements, Branch Info, Drawing, Image, Element
          placement). Replaced the Qt5-only event.x() / .y() with pos().x()
          / pos().y(), which works on both Qt5 and Qt6.
        * Fixed "QTableWidget object has no attribute SelectRows" crash when
          opening the List of Latent Elements dialog on Qt6. Now uses the
          Qt6-scoped QAbstractItemView.SelectionBehavior.SelectRows.
        * Fixed Drawing map tool right-click and Escape on Qt6. Replaced the
          flat Qt5 enums with Qt.MouseButton.RightButton and Qt.Key.Key_Escape.
        * Fixed sip imports for QGIS 4 / PyQt6, and Qt enum usage affecting
          QToolButton and QImage on QGIS 4.

        Optical schematic view
        * PE pipes and Transition pipes were always filtered out by the cable
          subtype filter and never drawn. Pipes are now detected from the
          source layer name (English and legacy Serbian names supported) and
          are always included when the Underground checkbox is on. Dashed
          rendering is applied via the same flag instead of a
          language-specific substring check.
        * Pan button: reworked so left-button drag panning works identically
          on Qt5 and Qt6. Replaced the built-in QGraphicsView.ScrollHandDrag
          (behaviour diverged across Qt versions) with explicit mouse
          handlers. Scroll-bar deltas are cast to int for PyQt6's stricter
          setValue() signature.

        Repository security scan
        * Replaced urllib.request.urlopen with QgsBlockingNetworkRequest in
          the Locator dialog and preview map. Eliminates the last two Bandit
          B310 findings and routes geocoding through QGIS's native network
          stack (proxy and SSL aware). Removed the now-unused urllib.request
          and ssl imports.
        * Added URL scheme validation for remote requests (http / https only).
        * Cleaned formatting issues relevant to repository scanning (trailing
          whitespace, blank-line whitespace).
