def test_changeconfig(self): obj = QPen(Qt.red, 2, Qt.SolidLine) ls = LineStyleParam(_("Line style")) ls.update_param(obj) ls.write_config(CONF, "ls", "") ls = LineStyleParam(_("Line style")) ls.read_config(CONF, "ls", "") self.assertEqual(ls.width, 2) self.assertEqual(ls.style, "SolidLine") self.assertEqual(ls.color, "#ff0000")
def test_changeconfig(self): obj = QPen( Qt.red, 2, Qt.SolidLine ) ls = LineStyleParam(_("Line style")) ls.update_param( obj ) ls.write_config(CONF, "ls", "" ) ls = LineStyleParam(_("Line style")) ls.read_config(CONF, "ls", "" ) self.assertEqual(ls.width, 2) self.assertEqual(ls.style, "SolidLine") self.assertEqual(ls.color, "#ff0000")
def test_saveconfig(self): ls = LineStyleParam(_("Line style")) ls.write_config(CONF, "ls", "") ls = LineStyleParam(_("Line style")) ls.read_config(CONF, "ls", "")
def test_saveconfig(self): ls = LineStyleParam(_("Line style")) ls.write_config(CONF, "ls", "" ) ls = LineStyleParam(_("Line style")) ls.read_config(CONF, "ls", "" )