Exemplo n.º 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
Exemplo n.º 2
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
Exemplo n.º 3
0
 def createEditor(self, parent, options, index):
     editor = QtWidgets.QColorDialog(parent)
     editor.setOptions(QtWidgets.QColorDialog.ShowAlphaChannel)
     widgets.center_widget(editor)
     return editor
Exemplo n.º 4
0
 def createEditor(self, parent, option, index):
     dialog = QtWidgets.QDialog(parent)
     dialog.setLayout(self.buildFontLayout(index, dialog))
     widgets.center_widget(dialog)      
     return dialog