Example #1
0
    def __init__(self, iface):
        """Constructor.

        :param iface: An interface instance that will be passed to this class
            which provides the hook by which you can manipulate the QGIS
            application at run time.
        :type iface: QgsInterface
        """
        # 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]
        locale_path = os.path.join(self.plugin_dir, 'i18n',
                                   'rcmrdTSerieries_{}.qm'.format(locale))

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

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

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

        # Declare instance attributes
        self.actions = []
        self.menu = self.tr(u'&RCMRD: Time Series')
        # TODO: We are going to let the user set this up in a future iteration
        self.toolbar = self.iface.addToolBar(u'RCMRD: Time Series')
        self.toolbar.setObjectName(u'RCMRD: Time Series')
        self.clipLayer = None  # the layer loaded in memory

        # a global storing temp files names
        self.intermediateFiles = {
            'AVG': '',
            'MIN': '',
            'MAX': ''
        }  # keys are AVG, MIN, MAX: empty means no file is selected
Example #2
0
    def __init__(self, iface):
        """Constructor.

        :param iface: An interface instance that will be passed to this class
            which provides the hook by which you can manipulate the QGIS
            application at run time.
        :type iface: QgsInterface
        """
        # 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]
        locale_path = os.path.join(self.plugin_dir, "i18n", "rcmrdTSerieries_{}.qm".format(locale))

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

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

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

        # Declare instance attributes
        self.actions = []
        self.menu = self.tr(u"&RCMRD: Time Series")
        # TODO: We are going to let the user set this up in a future iteration
        self.toolbar = self.iface.addToolBar(u"RCMRD: Time Series")
        self.toolbar.setObjectName(u"RCMRD: Time Series")
        self.clipLayer = None  # the layer loaded in memory

        # a global storing temp files names
        self.intermediateFiles = {
            "AVG": "",
            "MIN": "",
            "MAX": "",
        }  # keys are AVG, MIN, MAX: empty means no file is selected
 def setUp(self):
     """Runs before each test."""
     self.dialog = rcmrdTSerieriesDialog(None)
Example #4
0
 def setUp(self):
     """Runs before each test."""
     self.dialog = rcmrdTSerieriesDialog(None)