def __init__(self, *args, **kwargs): wx.App.__init__(self, *args, **kwargs) X, Y = wx.DisplaySize() sizex, sizey = 1100, 670 if X < 1000: sizex = X - 40 if Y < 670: sizey = Y - 40 self.frame = MainWindow(pos=(20, 20), size=(sizex, sizey)) QLiveLib.setVar("MainWindow", self.frame) if hasattr(self, "filenames"): self.frame.loadFile(QLiveLib.ensureNFD(self.filenames[0]))
def __init__(self, *args, **kwargs): wx.App.__init__(self, *args, **kwargs) X, Y = wx.DisplaySize() sizex, sizey = 1000, 670 if X < 1000: sizex = X - 40 if Y < 670: sizey = Y - 40 self.frame = MainWindow(pos=(20, 20), size=(sizex, sizey)) QLiveLib.setVar("MainWindow", self.frame) if hasattr(self, "filenames"): self.frame.loadFile(QLiveLib.ensureNFD(self.filenames[0]))
def __init__(self, *args, **kwargs): wx.App.__init__(self, *args, **kwargs) sysx = wx.SystemSettings.GetMetric(wx.SYS_SCREEN_X) sysy = wx.SystemSettings.GetMetric(wx.SYS_SCREEN_Y) if sysx < 1000: sizex = sysx - 40 else: sizex = 1000 if sysy < 670: sizey = sysy - 40 else: sizey = 670 self.filenames = [] self.frame = MainWindow(pos=(20, 20), size=(sizex, sizey)) QLiveLib.setVar("MainWindow", self.frame) if self.filenames: self.frame.loadFile(QLiveLib.ensureNFD(self.filenames[0]))
sizex = X - 40 if Y < 670: sizey = Y - 40 self.frame = MainWindow(pos=(20, 20), size=(sizex, sizey)) QLiveLib.setVar("MainWindow", self.frame) if hasattr(self, "filenames"): self.frame.loadFile(QLiveLib.ensureNFD(self.filenames[0])) def MacOpenFiles(self, filenames): if type(filenames) != ListType: filenames = [filenames] self.filenames = filenames def MacReopenApp(self): try: self.frame.Raise() except: pass if __name__ == "__main__": QLiveLib.loadVars() qlfile = None if len(sys.argv) > 1: qlfile = sys.argv[1] app = QLiveApp() if qlfile: wx.CallAfter(app.frame.loadFile, QLiveLib.ensureNFD(qlfile)) app.MainLoop()
sizey = Y - 40 self.frame = MainWindow(pos=(20, 20), size=(sizex, sizey)) QLiveLib.setVar("MainWindow", self.frame) if hasattr(self, "filenames"): if len(self.filenames) > 0: self.frame.loadFile(QLiveLib.ensureNFD(self.filenames[0])) def MacOpenFiles(self, filenames): if type(filenames) != list: filenames = [filenames] filenames = [f for f in filenames if f.endswith(".qlp")] self.filenames = filenames def MacReopenApp(self): try: self.frame.Raise() except: pass if __name__ == "__main__": QLiveLib.loadVars() qlfile = None if len(sys.argv) > 1: if sys.argv[1].endswith(".qlp"): qlfile = sys.argv[1] app = QLiveApp() if qlfile: wx.CallAfter(app.frame.loadFile, QLiveLib.ensureNFD(qlfile)) app.MainLoop()