Exemplo n.º 1
0
    def testDeSerializeFail(self):

        serializedValue: str = '150,bogus'

        dimensions: Dimensions = Dimensions.deSerialize(serializedValue)

        self.assertEqual(0, dimensions.width, 'Width incorrectly deserialized')
        self.assertEqual(0, dimensions.height,
                         'Height incorrectly deserialized')
Exemplo n.º 2
0
    def startupSize(self) -> Dimensions:

        serializedDimensions: str = self._config.get(
            MainPreferences.MAIN_SECTION, MainPreferences.STARTUP_SIZE)
        return Dimensions.deSerialize(serializedDimensions)
Exemplo n.º 3
0
 def textDimensions(self) -> Dimensions:
     serializedDimensions: str = self._config.get(
         ValuePreferences.VALUE_PREFERENCES_SECTION,
         ValuePreferences.TEXT_DIMENSIONS)
     return Dimensions.deSerialize(serializedDimensions)
Exemplo n.º 4
0
    def orthogonalLayoutSize(self) -> Dimensions:

        serializedDimensions: str = self._config.get(
            MiscellaneousPreferences.MISCELLANEOUS_SECTION,
            MiscellaneousPreferences.ORTHOGONAL_LAYOUT_SIZE)
        return Dimensions.deSerialize(serializedDimensions)