Beispiel #1
0
 def __onLensTypeComboBoxCurrentIndexChanged(self, index):
     """ Lens type combobox has changed.
     """
     type_ = config.LENS_TYPE_INDEX[index]
     Logger().debug("ConfigController.__onLensTypeComboBoxCurrentIndexChanged(): type=%s" % type_)
     if type_ == 'fisheye' and self._model.mode == 'mosaic':
         dialog = WarningMessageDialog(self.tr("Wrong value for lens type"),
                                       self.tr("Can't set lens type to 'fisheye' while in 'mosaic' mode"))
         dialog.exec_()
         self._view.lensTypeComboBox.setCurrentIndex(config.LENS_TYPE_INDEX[self._model.camera.lens.type_])
     else:
         if type_ == 'rectilinear':
             self._view.opticalMultiplierLabel.setEnabled(True)
             self._view.opticalMultiplierDoubleSpinBox.setEnabled(True)
         else:
             self._view.opticalMultiplierLabel.setEnabled(False)
             self._view.opticalMultiplierDoubleSpinBox.setEnabled(False)
         Logger().debug("ConfigController.__onLensTypeComboBoxCurrentIndexChanged(): lens type set to '%s'" % type_)
Beispiel #2
0
 def __onCameraOrientationComboBoxCurrentIndexChanged(self, index):
     """ Camera orientation changed.
     """
     orientation = config.CAMERA_ORIENTATION_INDEX[index]
     Logger().debug("ConfigController.__onCameraOrientationComboBoxCurrentIndexChanged(): orientation=%s" % orientation)
     if orientation == 'portrait':
         self._view.cameraRollDoubleSpinBox.setEnabled(False)
         self._view.cameraRollDoubleSpinBox.setValue(90.)
     elif orientation == 'landscape':
         self._view.cameraRollDoubleSpinBox.setEnabled(False)
         self._view.cameraRollDoubleSpinBox.setValue(0.)
     else:
         if self._model.mode == 'mosaic':
             dialog = WarningMessageDialog(self.tr("Wrong value for camera orientation"),
                                           self.tr("Can't set camera orientation to 'custom' while in 'mosaic' mode"))
             dialog.exec_()
             self._view.cameraOrientationComboBox.setCurrentIndex(config.CAMERA_ORIENTATION_INDEX[self._model.cameraOrientation])
         else:
             self._view.cameraRollDoubleSpinBox.setEnabled(True)
             self._view.cameraRollDoubleSpinBox.setValue(self._model.cameraRoll)