Skip to content

Commit

Permalink
bug tab/escape
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastienPeillet committed Oct 18, 2018
1 parent fba9be3 commit f5d8dd3
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions pointSamplingTool.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,38 +30,38 @@
class pointSamplingTool(object):

def __init__(self, iface):
self.iface = iface
locale = QSettings().value('locale/userLocale')[0:2]
locale_path = os.path.join(
self.plugin_dir,
'i18n',
'AutomaTracks_{}.qm'.format(locale))
self.iface = iface
locale = QSettings().value('locale/userLocale')[0:2]
locale_path = os.path.join(
self.plugin_dir,
'i18n',
'AutomaTracks_{}.qm'.format(locale))

if os.path.exists(locale_path):
self.translator = QTranslator()
self.translator.load(locale_path)
if os.path.exists(locale_path):
self.translator = QTranslator()
self.translator.load(locale_path)

if qVersion() > '4.3.3':
QCoreApplication.installTranslator(self.translator)
if qVersion() > '4.3.3':
QCoreApplication.installTranslator(self.translator)


def initGui(self):
# create action
self.action = QAction(QIcon(":/plugins/pointSamplingTool/pointSamplingToolIcon.png"), "Point sampling tool", self.iface.mainWindow())
self.action.setWhatsThis("Collects polygon attributes and raster values from multiple layers at specified sampling points")
self.action.triggered.connect(self.run)
# add toolbar button and menu item
self.iface.addToolBarIcon(self.action)
self.iface.addPluginToMenu("&Analyses", self.action)
# create action
self.action = QAction(QIcon(":/plugins/pointSamplingTool/pointSamplingToolIcon.png"), "Point sampling tool", self.iface.mainWindow())
self.action.setWhatsThis("Collects polygon attributes and raster values from multiple layers at specified sampling points")
self.action.triggered.connect(self.run)
# add toolbar button and menu item
self.iface.addToolBarIcon(self.action)
self.iface.addPluginToMenu("&Analyses", self.action)


def unload(self):
# remove the plugin menu item and icon
self.iface.removePluginMenu("&Analyses",self.action)
self.iface.removeToolBarIcon(self.action)
# remove the plugin menu item and icon
self.iface.removePluginMenu("&Analyses",self.action)
self.iface.removeToolBarIcon(self.action)


def run(self):
# create and show a configuration dialog or something similar
dialoga = doPointSamplingTool.Dialog(self.iface)
dialoga.exec_()
# create and show a configuration dialog or something similar
dialoga = doPointSamplingTool.Dialog(self.iface)
dialoga.exec_()

0 comments on commit f5d8dd3

Please sign in to comment.