From ca7e8bdb0dc998088aeb45a77987a78cc4656b34 Mon Sep 17 00:00:00 2001 From: tassaron Date: Tue, 30 May 2017 19:31:10 -0400 Subject: the most simple way of saving dictionaries --- components/original.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'components/original.py') diff --git a/components/original.py b/components/original.py index 47e53b8..40f51eb 100644 --- a/components/original.py +++ b/components/original.py @@ -32,11 +32,13 @@ class Component(__base__.Component): self.visColor = self.RGBFromString(self.page.lineEdit_visColor.text()) self.parent.drawPreview() - def version(self): - return 1 + def loadPreset(self, presetDict): + self.preFrameRender(**presetDict) def savePreset(self): - return {} + return { 'layout' : self.page.comboBox_visLayout.currentIndex(), + 'visColor' : self.page.lineEdit_visColor.text(), + } def previewRender(self, previewWorker): spectrum = numpy.fromfunction(lambda x: 0.008*(x-128)**2, (255,), dtype="int16") -- cgit v1.2.3