more work
This commit is contained in:
@ -24,20 +24,27 @@ app = App(['Team Rocket FTW!'])
|
||||
from gui_qt.main.mainwindow import NMRMainWindow
|
||||
from gui_qt.lib.backup import BackupManager
|
||||
|
||||
|
||||
def do_autosave():
|
||||
success = mplQt.autosave()
|
||||
if success:
|
||||
backuping.update_last_save()
|
||||
|
||||
|
||||
backuping = BackupManager()
|
||||
pid = os.getpid()
|
||||
|
||||
files = backuping.search_unsaved()
|
||||
print(files)
|
||||
print(sys.executable, sys.argv)
|
||||
|
||||
pid = os.getpid()
|
||||
bck_name = backuping.create_entry(pid)
|
||||
mplQt = NMRMainWindow(bck_file=bck_name)
|
||||
|
||||
print(sys.executable, sys.argv)
|
||||
timer = QtCore.QTimer()
|
||||
do_autosave()
|
||||
|
||||
timer.timeout.connect(mplQt._autosave)
|
||||
timer.timeout.connect(backuping.update_last_save)
|
||||
timer = QtCore.QTimer()
|
||||
timer.timeout.connect(do_autosave)
|
||||
timer.start(3 * 1000)
|
||||
|
||||
app.aboutToQuit.connect(backuping.close)
|
||||
|
Reference in New Issue
Block a user