Esempio n. 1
0
 def run(self):
     # show the dialog
     self.dlg.show()
     # Run the dialog event loop
     result = self.dlg.exec_()
     # See if OK was pressed
     if result == 1:
         # do something useful (delete the line containing pass and
         # substitute with your code)
         pass
     del self.dlg
     self.dlg = pygisedtrendDialog(self.iface)
Esempio n. 2
0
    def __init__(self, iface):
        # Save reference to the QGIS interface
        self.iface = iface
        # initialize plugin directory
        self.plugin_dir = os.path.dirname(__file__)
        # initialize locale
        locale = QSettings().value("locale/userLocale")[0:2]
        localePath = os.path.join(self.plugin_dir, 'i18n', 'pygisedtrend_{}.qm'.format(locale))

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

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

        # Create the dialog (after translation) and keep reference
        self.dlg = pygisedtrendDialog(self.iface)