Example #1
0
    def test06_SaveRestoreWriterFromProject(self):
        """Test saving and restoring writer state to project"""

        writer = LeafletWriter()
        writer.params = getDefaultParams()
        # change some parameters
        writer.params['Appearance']['Add layers list'] = 'Collapsed'
        writer.params['Data export']['Minify GeoJSON files'] = False
        writer.params['Data export']['Precision'] = '4'

        WRITER_REGISTRY.saveWriterToProject(writer)

        new_writer = WRITER_REGISTRY.createWriterFromProject()
        self.assertTrue(isinstance(new_writer, LeafletWriter))
        self.assertEqual(new_writer.params, writer.params)
    def test06_SaveRestoreWriterFromProject(self):
        """Test saving and restoring writer state to project"""

        writer = LeafletWriter()
        writer.params = getDefaultParams()
        # change some parameters
        writer.params['Appearance']['Add layers list'] = 'Collapsed'
        writer.params['Data export']['Minify GeoJSON files'] = False
        writer.params['Data export']['Precision'] = '4'

        WRITER_REGISTRY.saveWriterToProject(writer)

        new_writer = WRITER_REGISTRY.createWriterFromProject()
        self.assertTrue( isinstance(new_writer, LeafletWriter))
        self.assertEqual(new_writer.params,writer.params)
Example #3
0
 def saveParameters(self):
     """
     Saves current dialog state to project
     """
     WRITER_REGISTRY.saveWriterToProject(self.createWriter())
     EXPORTER_REGISTRY.writeToProject(self.exporter)
Example #4
0
 def saveParameters(self):
     """
     Saves current dialog state to project
     """
     WRITER_REGISTRY.saveWriterToProject(self.createWriter())
     EXPORTER_REGISTRY.writeToProject(self.exporter)