def handleDisplayAppSettingsDialogEvent(self): usersettings = readPickle(self._appdirs.user_config_dir,u'usersettings.pkl') updatedsettings, allsettings, savestate, ok = ProjectSettingsDialog.getProjectSettings(self, usersettings) if ok is True: writePickle(self._appdirs.user_config_dir,u'usersettings.pkl', savestate) if self.project and len(updatedsettings)>0: self.sigAppSettingsUpdated.emit(updatedsettings, allsettings)
myappid = u'isolver.markwrite.editor.version' # arbitrary string ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID(myappid) # Need to import pyTables module before pyqt imports pyh5 or error occurs when # openning an iohub datastore file. import tables import pyqtgraph as pg # # Switch to using white background and black foreground from pyqtgraph.Qt import QtGui from markwrite.gui.mainwin import MarkWriteMainWindow from markwrite.appdirs import AppDirs from markwrite.file_io import readPickle appdirs = AppDirs("MarkWrite") usersettings = readPickle(appdirs.user_config_dir,u'usersettings.pkl') app = QtGui.QApplication(sys.argv) from markwrite.gui.projectsettings import ProjectSettingsDialog _ = ProjectSettingsDialog(savedstate=usersettings) from markwrite.gui.projectsettings import SETTINGS pg.setConfigOption('background', SETTINGS['plotviews_background_color']) pg.setConfigOption('foreground', SETTINGS['plotviews_foreground_color']) wmwin = MarkWriteMainWindow(app) MarkWriteMainWindow._appdirs = appdirs wmwin.show() status = app.exec_() sys.exit(status)