def __init__(self): print "loading ..." QApplication.__init__(self, sys.argv) self.cwd = dirname(realpath(__file__)) self.window = Window(self) self.db = Databaser(self) self.preferences = Preferencer(self) self.filters = Filterer(self) self.icons = Iconer(self) self.accounts = Accounter(self) self.updates = Updater(self) self.threads = Threader(self) self.reader = Reader(self) self.notifier = Notifier(self) controllers = [self.window, self.db, self.preferences, self.filters, self.accounts, self.updates, self.icons, self.threads, self.reader, self.notifier] for controller in controllers: controller.setup() # need to be seperated for controller in controllers: controller.connect()
def __init__(self, args, force_calibre_style=False, override_program_name=None): self.file_event_hook = None if override_program_name: args = [override_program_name] + args[1:] qargs = [ i.encode('utf-8') if isinstance(i, unicode) else i for i in args ] self.pi = plugins['progress_indicator'][0] if DEBUG: self.redirect_notify = True QApplication.__init__(self, qargs) dl = QLocale(get_lang()) if unicode(dl.bcp47Name()) != u'C': QLocale.setDefault(dl) global gui_thread, qt_app gui_thread = QThread.currentThread() self._translator = None self.load_translations() qt_app = self self._file_open_paths = [] self._file_open_lock = RLock() self.setup_styles(force_calibre_style)
def __init__(self, args, force_calibre_style=False, override_program_name=None): self.file_event_hook = None if override_program_name: args = [override_program_name] + args[1:] qargs = [i.encode("utf-8") if isinstance(i, unicode) else i for i in args] self.pi = plugins["progress_indicator"][0] if DEBUG: self.redirect_notify = True QApplication.__init__(self, qargs) global gui_thread, qt_app gui_thread = QThread.currentThread() self._translator = None self.load_translations() qt_app = self self._file_open_paths = [] self._file_open_lock = RLock() self.setup_styles(force_calibre_style)
def __init__(self, args, force_calibre_style=False, override_program_name=None): self.file_event_hook = None if override_program_name: args = [override_program_name] + args[1:] qargs = [ i.encode('utf-8') if isinstance(i, unicode) else i for i in args ] QApplication.__init__(self, qargs) global gui_thread, qt_app gui_thread = QThread.currentThread() self._translator = None self.load_translations() qt_app = self self._file_open_paths = [] self._file_open_lock = RLock() self.setup_styles(force_calibre_style)
def __init__(self, *args): QApplication.__init__(self, *args) self.init = InitWindow() self.connect(self, SIGNAL("lastWindowClosed()"), self.byebye) self.init.setWindowTitle('Main') self.init.show()
def __init__(self, args): QApplication.__init__(self, args) self.gui = None
def __init__(self,argv): QApplication.__init__(self,argv)