def __init__(self): super(MainWindow, self).__init__() # Store ourself. self.windows.append(self) # State! self.current_file = None # Editor! self.editor = QTextEdit() self.setCentralWidget(self.editor) # Style the editor style.apply_stylesheet(self.editor, 'editor.qss') # Menus and Stuff! self.init_actions() self.init_menus() self.init_toolbars() self.init_statusbar() # Settings! self.init_settings() # Icons! self.reload_icons() style.style_reloaded.connect(self.reload_icons) # Fancy! style.enable_aero(self) self.update_title() # Now, for some plugins. plugins.run_signal('new_window', self)
def __init__(self, parent=None): ManagerWindow.__init__(self, parent) # Set the window title and size. self.setWindowTitle(self.tr("Add-on Manager")) self.setMinimumSize(400, 300) # Build the main widget. self.tabs = QTabWidget(self) self.setCentralWidget(self.tabs) # Load up all our tabs. for addon_type in sorted(addons.manager._types.keys()): tab = AddonTypeTab(addon_type) self.tabs.addTab(tab, tab.windowIcon(), tab.windowTitle()) # Let plugins get in on this. plugins.run_signal('opened_addon_manager', self) # Icons and Style! style.enable_aero(self) self.reload_icons() style.style_reloaded.connect(self.reload_icons)