Beispiel #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',
            'OrthoMaker_{}.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 = OrthoMakerDialog()

        # Declare instance attributes
        self.actions = []
        self.menu = self.tr(u'&Ortho Maker')

        self.toolbar = self.iface.addToolBar(u'OrthoMaker')
        self.toolbar.setObjectName(u'OrthoMaker')

        # Settings dialog etc.
        self.settings = OrthoMakerSettings()
        self.settings_dlg = OrthoMakerSettingsDialog(self.settings)

        self.dlg.pushButton_Input.clicked.connect(self.showFileSelectDialogInput)
        self.dlg.pushButton_Output.clicked.connect(self.showFileSelectDialogOutput)
        self.dlg.pushButton_workdir.clicked.connect(self.showFileSelectDialogWorkdir)
        self.dlg.pushButton_DEM.clicked.connect(self.showFileSelectDialogDEM)

        self.dlg.inDir.setText('C:/')
        self.dlg.outDir.setText('C:/temp/COWStemp/jpeg/')
        self.dlg.lineEditDEM.setText('F:\GDB\DHM\AnvendelseGIS\DTM_orto.vrt')
        self.dlg.lineEdit_workdir.setText('C:/Temp/COWStemp/')
        self.dlg.lineEditPixelSize.setText('0.16')
        self.dlg.radioButtonDEM_2015.toggle()
        self.dlg.radioButton_fieldpath.toggle()
        self.dlg.checkBoxDelTiff.setCheckState( Qt.Checked )
Beispiel #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]
        locale_path = os.path.join(
            self.plugin_dir,
            'i18n',
            'OrthoMaker_{}.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 = OrthoMakerDialog()
        self.fdl = OrthoMakerFileDialog()

        # Declare instance attributes
        self.actions = []
        self.menu = self.tr(u'&Ortho Maker')

        self.toolbar = self.iface.addToolBar(u'OrthoMaker')
        self.toolbar.setObjectName(u'OrthoMaker')

        # Settings dialog etc.
        self.settings = OrthoMakerSettings()
        self.settings_dlg = OrthoMakerSettingsDialog(self.settings)

        self.dlg.pushButton_Input.clicked.connect(self.showFileSelectDialogInput)
        self.dlg.pushButton_Output.clicked.connect(self.showFileSelectDialogOutput)
        self.fdl.pushButton_Output.clicked.connect(self.showFileSelectDialogOutputf)
        self.dlg.pushButton_workdir.clicked.connect(self.showFileSelectDialogWorkdir)
        self.dlg.pushButton_DEM.clicked.connect(self.showFileSelectDialogDEM)

        self.dlg.inDir.setText('C:/')
        self.dlg.outDir.setText('C:/temp/COWStemp/jpeg/')
        self.dlg.lineEditDEM.setText('F:\GDB\DHM\AnvendelseGIS\DTM_orto.vrt')
        self.dlg.lineEdit_workdir.setText('C:/Temp/COWStemp/')
        self.dlg.lineEditPixelSize.setText('0.16')
        self.dlg.lineEditImageAngle.setText('15')
        self.dlg.radioButtonDEM_2015.toggle()
        self.dlg.radioButton_fieldpath.toggle()
        self.dlg.checkBoxDelTiff.setCheckState(Qt.Checked)

        self.fdl.outDir.setText('F:/GEO\DATA/RemoteSensing/Drift/ForaarsFoto/FotoFlyv_2017/QuickOrto')
Beispiel #3
0
 def setUp(self):
     """Runs before each test."""
     self.dialog = OrthoMakerDialog(None)