|
|
|
|
@ -192,12 +192,13 @@ class TTkDesigner(TTkGridLayout):
|
|
|
|
|
dd = json.load(fp) |
|
|
|
|
sw = SuperWidget.loadDict(self._windowEditor.viewport(), dd['tui']) |
|
|
|
|
self._windowEditor.importSuperWidget(sw) |
|
|
|
|
self._sigslotEditor.importConnections(dd['connections']) |
|
|
|
|
|
|
|
|
|
@pyTTkSlot() |
|
|
|
|
def open(self): |
|
|
|
|
# self._openFile('tmp/pippo.008.json') |
|
|
|
|
# return |
|
|
|
|
filePicker = TTkFileDialogPicker(pos = (3,3), size=(75,24), caption="Open", path="tmp.save", fileMode=TTkK.FileMode.AnyFile ,filter="Json Files (*.json);;All Files (*)") |
|
|
|
|
filePicker = TTkFileDialogPicker(pos = (3,3), size=(75,24), caption="Open", path="experiments", fileMode=TTkK.FileMode.AnyFile ,filter="Json Files (*.json);;All Files (*)") |
|
|
|
|
filePicker.pathPicked.connect(self._openFile) |
|
|
|
|
TTkHelper.overlay(None, filePicker, 5, 5, True) |
|
|
|
|
|
|
|
|
|
@ -234,6 +235,6 @@ class TTkDesigner(TTkGridLayout):
|
|
|
|
|
TTkHelper.overlay(None, messageBox, 5, 5, True) |
|
|
|
|
else: |
|
|
|
|
self._saveToFile(fileName) |
|
|
|
|
filePicker = TTkFileDialogPicker(pos = (3,3), size=(75,24), caption="Save As...", path="tmp.save", fileMode=TTkK.FileMode.AnyFile ,filter="All Files (*);;Python Files (*.json)") |
|
|
|
|
filePicker = TTkFileDialogPicker(pos = (3,3), size=(75,24), caption="Save As...", path="experiments", fileMode=TTkK.FileMode.AnyFile ,filter="All Files (*);;Python Files (*.json)") |
|
|
|
|
filePicker.pathPicked.connect(_approveFile) |
|
|
|
|
TTkHelper.overlay(None, filePicker, 5, 5, True) |
|
|
|
|
|