[general]
name=Interactive-Ruler
description=Interactive ruler with a launcher dialog, straight-line and multi-point path measurement, automatic snapping to feature vertices in visible layers, a layer-name box that groups measurements as distance-named layers, direction arrows and length labels in metric or imperial units
about=Interactive ruler for QGIS. Draw straight lines or multi-point paths on the map and save each measurement as its own styled ruler layer with direction arrows and a length label. Measurements are grouped under a layer name and named after their result (for example SITE A 1.82 km or SITE A 1.13 mi), with automatic metre/kilometre or yard/mile units chosen with a Metric / Imperial radio, a live distance balloon while dragging, adjustable label font size and line width, and three colour themes: Dark, Light and Red (#e31a1c). Version 1.22 adds automatic snapping to feature vertices in visible layers within a 10 px screen tolerance; hidden layers and ruler layers drawn by this plugin are ignored, and no new dialog control, balloon text or layer-naming behaviour was added. Existing lines keep their own style and units and are never recoloured.
version=1.22
qgisMinimumVersion=3.0
qgisMaximumVersion=4.99
author=hafiz m.
email=medsaffan@gmail.com
homepage=https://github.com/hapmuch/Interactive_Ruler
tracker=https://github.com/hapmuch/Interactive_Ruler/issues
repository=https://github.com/hapmuch/Interactive_Ruler
changelog=1.22 - Added automatic snapping to feature vertices in visible layers. Ruler points snap to the nearest vertex within a fixed 10 px screen tolerance; hidden layers, layers inside hidden groups and ruler layers drawn by this plugin are excluded. Snapping applies to straight-line start/end points and every path point, is always on, and adds no new GUI control, balloon text or saved-label change. Uses QGIS 3/4 and Qt 5/6 compatible APIs. 1.21 - Declared QGIS 4 compatibility: qgisMaximumVersion=4.99 keeps the plugin available for both QGIS 3.x and QGIS 4.x (the old supportsQt6 flag is not used). All Qt enums are scoped, QAction import works with Qt 5 and Qt 6, and label line-placement flags use the API of the running QGIS version. No change to measuring behaviour. 1.20 - Added a Metric / Imperial radio to the launcher dialog. Metric is unchanged (metres below 1 km, kilometres above); Imperial shows yards below 1 mile and miles above (1 yd = 0.9144 m, 1 mi = 1760 yd), so a measurement picks a readable unit in both systems. The choice is saved in QSettings under interactive_ruler/unit_system and applies to the live cursor balloon, the length label and the new layer name. Existing lines keep the units they were drawn in. The radio opens on Metric by default, so nothing changes for current users. 1.19 - Added a Help button (bottom-left of the launcher dialog) that opens a help window with three sections: style sliders, layer name, and how to restyle existing rulers after drawing by selecting a group or individual layer in the Layers panel. 1.18 - Qt6 compatibility fixes: enum members are now scoped (for example Qt.MouseButton.LeftButton and QgsUnitTypes.RenderUnit.RenderMillimeters), exec_() is replaced by exec(), and QVariant is imported from qgis.PyQt. No behaviour change. 1.17 - Added a Red theme (#e31a1c) alongside Dark and Light. The live rubber band shown while dragging is now always red, so the preview stays visible with the Light theme too. 1.16 - The ruler now refuses to measure when the project has no CRS and shows a warning instead ("Set a project CRS before measuring"). Previously the canvas units were interpreted as metres, producing a meaningless length. No pending layer is created until a project CRS is set. 1.15 - Fixed a RuntimeError when a pending ruler layer was deleted outside the plugin (removed in the Layers panel, project closed) and the tool was then deactivated: the layer id is now tracked and every access guarded, so an empty name group is still cleaned up. Drawing after such a deletion starts a fresh pending layer instead of touching the deleted object
