Exemplo n.º 1
0
    def __init__(self, parent=None):

        # constructors of base classes
        super(BeamUI, self).__init__(parent)
        self.setObjectName('mainUI')
        self.setWindowIcon(QtGui.QIcon(''))

        self.setWindowTitle("Beam Editor")
        self.setAcceptDrops(True)

        self.graphViewWidget = KGraphViewWidget(parent=self)
        self.nodeLibrary = ComponentLibrary(parent=self)

        self.horizontalSplitter = QtWidgets.QSplitter(QtCore.Qt.Horizontal,
                                                      parent=self)
        self.horizontalSplitter.addWidget(self.nodeLibrary)
        self.horizontalSplitter.addWidget(self.graphViewWidget)

        self.horizontalSplitter.setStretchFactor(0, 0)
        self.horizontalSplitter.setStretchFactor(1, 1)
        self.horizontalSplitter.setSizes([0, 100])
        self.horizontalSplitter.splitterMoved.connect(self.splitterMoved)
        self.nodeLibraryExpandedSize = 175

        grid = QtWidgets.QVBoxLayout(self)
        grid.addWidget(self.horizontalSplitter)
Exemplo n.º 2
0
    def __init__(self, parent=None):

        # constructors of base classes
        super(BeamUI, self).__init__(parent)
        self.setObjectName('mainUI')
        self.setWindowIcon(QtGui.QIcon(''))

        self.setWindowTitle("Beam Editor")
        self.setAcceptDrops(True)
Exemplo n.º 3
0
    def __init__(self, parent=None):
        super(BeamWindow, self).__init__(parent)
        self.setObjectName('BeamMainWindow')
        self.setWindowTitle('Beam Editor')
        self.setWindowIcon(QtGui.QIcon(''))
        self.setAttribute(QtCore.Qt.WA_DeleteOnClose)
        self.installEventFilter(self)

        self.createLayout()
        self.createConnections()
Exemplo n.º 4
0
    def __init__(self, parent=None):

        # constructors of base classes
        super(BeamUI, self).__init__(parent)
        self.setObjectName('mainUI')
        self.setWindowIcon(QtGui.QIcon(''))

        self.setWindowTitle("Beam Editor")
        self.setAcceptDrops(True)

        self.mainVboxLayout = QtGui.QVBoxLayout (self)

        self.guideLayout = QtGui.QVBoxLayout ()
        self.mainVboxLayout.addLayout(self.guideLayout)

        self.build_from_selection = QtGui.QPushButton("build_from_selection")
        self.mainVboxLayout.addWidget(self.build_from_selection)

        compDir = shifter.getComponentDirectories ()

        path = self.current_path ()

        trackLoadComponent = []

        for path, comps in compDir.iteritems ():
            for comp_name in comps:

                if comp_name in trackLoadComponent:
                    pm.displayWarning(
                        "Custom component name: %s, already in default "
                        "components. Names should be unique. This component is"
                        " not loaded" % comp_name)
                    continue
                else:
                    trackLoadComponent.append (comp_name)
                if not os.path.exists(os.path.join(path,
                                                   comp_name, "__init__.py")):
                    continue
                module = shifter.importComponentGuide (comp_name)
                print "BeamUI.__init__.module",module
                reload (module)

                commandbutton = self.loadUiWidget (os.path.join (path.replace("beam_components","widgets"), "commandbutton.ui"))

                icon = QtGui.QPixmap(os.path.join (path,module.TYPE,"icon.jpg"))
                self.guideLayout.addWidget (commandbutton)
                commandbutton.pushButton.setText(module.TYPE)
                commandbutton.label.setPixmap (icon)
                QtCore.QObject.connect (commandbutton.pushButton, QtCore.SIGNAL ("clicked()"),
                                        partial (self.drawComp, module.TYPE))

        self.createConnections()
Exemplo n.º 5
0
    def __init__(self, parent=None):

        # constructors of base classes
        super(BeamUI, self).__init__(parent)
        self.setObjectName('mainUI')
        self.setWindowIcon(QtGui.QIcon(''))

        self.setWindowTitle("Beam Editor")
        self.setAcceptDrops(True)

        grid = QtWidgets.QVBoxLayout(self)

        compDir = general.getComponentDirectories()
Exemplo n.º 6
0
    def __init__(self, parent=None):

        super(BeamUI, self).__init__(parent)
        self.setObjectName('mainUI')
        self.setWindowIcon(QtGui.QIcon(''))

        self.setWindowTitle("Beam Editor")
        self.setAcceptDrops(True)

        layout = QtWidgets.QVBoxLayout (self)

        self.graphViewWidget = KGraphView (parent = self)
        layout.addWidget(self.graphViewWidget)
        self.setLayout(layout)