Exemplo n.º 1
0
 def onShowRequest(self):
     if self.window:
         self.window.setVisible(True)
         self.window.activateWindow()
     else:
         self.window = MainWindowReader(self.parent, self.preferences,
                                        self.language, None, self.anki,
                                        self.onWindowClose)
         self.window.show()
Exemplo n.º 2
0
    def __init__(self):
        Yomichan.__init__(self)

        self.application = QtGui.QApplication(sys.argv)
        self.window = MainWindowReader(
            None,
            self.preferences,
            self.language,
            filename=sys.argv[1] if len(sys.argv) >= 2 else None)

        self.window.show()
        self.application.exec_()