diff options
| author | tassaron | 2017-06-13 22:47:18 -0400 |
|---|---|---|
| committer | tassaron | 2017-06-13 22:47:18 -0400 |
| commit | 2ad14b7d6ca9216bcdc72c5e13937fcbccc887a3 (patch) | |
| tree | 489dfd5ef2c125040fbf04415ba139fb5798c56b /components/__base__.py | |
| parent | 307d499f9ae2729c790fe9258d88aca72331cdf6 (diff) | |
asterisk next to modified preset is more accurate
hopefully
Diffstat (limited to 'components/__base__.py')
| -rw-r--r-- | components/__base__.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/components/__base__.py b/components/__base__.py index b32c120..bc6644b 100644 --- a/components/__base__.py +++ b/components/__base__.py @@ -1,5 +1,6 @@ from PyQt4 import QtGui, QtCore + class Component(QtCore.QObject): '''A base class for components to inherit from''' @@ -26,8 +27,8 @@ class Component(QtCore.QObject): self.canceled = False def update(self): - self.modified.emit(self.compPos, True) - # use super().update() then read your widget values here + self.modified.emit(self.compPos, self.savePreset()) + # read your widget values, then call super().update() def loadPreset(self, presetDict, presetName): '''Children should take (presetDict, presetName=None) as args''' @@ -36,10 +37,10 @@ class Component(QtCore.QObject): # Then update your widgets using the preset dict self.currentPreset = presetName \ if presetName != None else presetDict['preset'] - + ''' def savePreset(self): return {} - + ''' def preFrameRender(self, **kwargs): for var, value in kwargs.items(): exec('self.%s = value' % var) |
