示例#1
0
    def __init__(self, application):
        """
        The main window
        @param parent: The QObject parent, in this case it should be the QApp
        @param files_to_open: The set of files to be opened when the window is shown in the screen.
        """
        QtGui.QMainWindow.__init__(self)
        self.application = application
        self.setupUi(self)

        self.setWindowIcon(resources.getIcon("prymatex"))

        self.setupDialogs()
        self.setupDockToolBars()
        self.setupMenu()

        self.setStatusBar(PMXStatusBar(self))

        # Connect Signals
        self.splitTabWidget.currentWidgetChanged.connect(
            self.on_currentWidgetChanged)
        self.splitTabWidget.currentWidgetChanged.connect(
            self.setWindowTitleForEditor)
        self.splitTabWidget.tabCloseRequest.connect(self.closeEditor)
        self.splitTabWidget.tabCreateRequest.connect(self.addEmptyEditor)
        self.application.supportManager.bundleItemTriggered.connect(
            self.on_bundleItemTriggered)

        center_widget(self, scale=(0.9, 0.8))
        self.dockers = []
        self.customEditorActions = {}
        self.customDockActions = {}

        self.setAcceptDrops(True)

        #self.setMainWindowAsActionParent()
        self.setupHelpMenuMiscConnections()

        self.popupMessage = PopupMessageWidget(self)

        #Processor de comandos local a la main window
        self.commandProcessor = MainWindowCommandProcessor(self)
        self.bundleItem_handler = self.insertBundleItem