WIP saving of widget through pickle process

This commit is contained in:
2023-04-07 21:04:40 -05:00
parent a23c13a259
commit 8ccb8f0709
4 changed files with 62 additions and 11 deletions

View File

@@ -0,0 +1,33 @@
# Python imports
# Lib imports
# Application imports
class SaveLoadControllerException(Exception):
...
class WidgetSaveLoadController:
def __init__(self):
super(WidgetSaveLoadController, self).__init__()
self.saveable_data = []
self.save_collection = {
"width": -1,
"height": -1,
"x": 0,
"y": 0,
"data": None,
"widget_type": None
}
def register_saveable_data(self, data):
self.saveable_data.append(data)
def load_saveable_data(self, data):
self.save_collection = data
def get_saveable_data(self):
return self.save_collection