def __save_file(self):
     '''Opens file dialog and sets and saves the settings to a ini file.
     '''
     filename = save_file_dialog(self, self.default_folder,
                                 "Save measuring unit settings file",
                                 "Settings file (*.ini)")
     if filename:
         settings = MeasuringSettings()
         settings.set_settings(self)
         settings.save_settings(filename)
 def __save_file(self, settings_type):
     '''Opens file dialog and sets and saves the settings to a ini file.
     '''
     
     if settings_type == "MEASURING_UNIT_SETTINGS":
         settings = MeasuringSettings()
     elif settings_type == "DEPTH_PROFILE_SETTINGS":
         settings = DepthProfileSettings()
     elif settings_type == "CALIBRATION_SETTINGS":
         settings = CalibrationParameters()
     else:
         return
     
     filename = save_file_dialog(self, self.project.directory,
                                 "Open measuring unit settings file",
                                 "Settings file (*.ini)")
     if filename:
         settings.set_settings(self)
         settings.save_settings(filename)