Skip to content

Commit

Permalink
Merge branch 'master' of github.com:DOV-Vlaanderen/qgis-pixel-calculator
Browse files Browse the repository at this point in the history
  • Loading branch information
Roel committed May 23, 2023
2 parents 8b3be8d + 487ec3e commit bdb6750
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions pixel_measure/action.py
@@ -1,10 +1,11 @@
import PyQt5.QtGui as QtGui
import PyQt5.QtWidgets as QtWidgets
import qgis.core as QGisCore

from .layer import PixelisedVectorLayer


class PixelMeasureAction(QtGui.QAction):
class PixelMeasureAction(QtWidgets.QAction):
"""Class representing the action to start the pixel measure.
Used as a menu item and toolbar button.
"""
Expand All @@ -15,16 +16,16 @@ def __init__(self, main, parent):
----------
main : PixelCalculator
Instance of main class.
parent : QtGui.QWidget
parent : QtWidgets.QWidget
Widget used as parent widget for the action.
"""
self.main = main
self.iface = self.main.iface

QtGui.QAction.__init__(self,
QtGui.QIcon(':/plugins/pixel_calculator/icon.png'),
self.main.tr('Calculate pixelvalue'),
parent)
QtWidgets.QAction.__init__(self,
QtGui.QIcon(':/plugins/pixel_calculator/icon.png'),
self.main.tr('Calculate pixelvalue'),
parent)

self.mapCanvas = self.main.iface.mapCanvas()
self.mapCanvas.extentsChanged.connect(self._populateVisible)
Expand Down

0 comments on commit bdb6750

Please sign in to comment.