Ejemplo n.º 1
0
    def __init__(self, parent=None):
        QtWidgets.QWidget.__init__(self, parent)
        Ui_CompositionPanelBase.__init__(self)
        self.setupUi(self)
        self.CheckBoxVariable = {}
        self.ComboBoxVariable = {}
        self.__key2name = {}

        self.__key = -1

        # connect button
        self.composedButton.clicked.connect(self.emitComposedGridRequest)

        # designer could not assign a layout to empty widgets
        #
        self.dummyFrameLayout = QtWidgets.QVBoxLayout(self.dummyFrame)

        #
        # add scroll view
        #
        self.scrollView = QtWidgets.QScrollArea(self.dummyFrame)
        self.dummyFrameLayout.addWidget(self.scrollView)
        self.scrollView.setFrameShadow(QtWidgets.QFrame.Raised)
        self.scrollView.setFrameShape(QtWidgets.QFrame.StyledPanel)
        self.scrollView.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOn)

        # add a box for the widgets in the scrollview.
        self.box = QtWidgets.QWidget(self.scrollView)
        self.box.resize(
            300, 2000
        )  # workaround: large height, because the automatic resize of self.box is not working
        self.scrollView.setWidget(self.box)
        self.boxLayout = QtWidgets.QGridLayout(self.box)
Ejemplo n.º 2
0
    def __init__(self, parent=None):
        QtWidgets.QWidget.__init__(self, parent)
        Ui_CompositionPanelBase.__init__(self)
        self.setupUi(self)
        self.CheckBoxVariable = {}
        self.ComboBoxVariable = {}
        self.__key2name = {}

        self.__key = -1

        # connect button
        self.composedButton.clicked.connect(self.emitComposedGridRequest)

       # designer could not assign a layout to empty widgets
        #
        self.dummyFrameLayout = QtWidgets.QVBoxLayout(self.dummyFrame)

        #
        # add scroll view
        #
        self.scrollView = QtWidgets.QScrollArea(self.dummyFrame)
        self.dummyFrameLayout.addWidget(self.scrollView)
        self.scrollView.setFrameShadow(QtWidgets.QFrame.Raised)
        self.scrollView.setFrameShape(QtWidgets.QFrame.StyledPanel)
        self.scrollView.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOn)

        # add a box for the widgets in the scrollview. 
        self.box = QtWidgets.QWidget(self.scrollView)
        self.box.resize(300,2000) # workaround: large height, because the automatic resize of self.box is not working
        self.scrollView.setWidget(self.box)
        self.boxLayout = QtWidgets.QGridLayout(self.box)
Ejemplo n.º 3
0
    def __init__(self, parent=None):
        QtWidgets.QWidget.__init__(self, parent)
        Ui_CompositionPanelBase.__init__(self)
        self.setupUi(self)
        self.CheckBoxVariable = {}
        self.ComboBoxVariable = {}
        self.__key2name = {}

        self.cnt = 0
        
        self.__key = -1
        
        # set text of base widget to 2d parts
        self.vrpLabelTitle.setText(self.__tr('Part Composition'))
        self.KnobInstructionText.setText(self.__tr('Create a composed part to define visualization elements on this new 2D part.'))
        self.composedButton.setText(self.__tr('New Composed Part'))

        # connect the button 
        self.composedButton.clicked.connect(self.emitComposedGridRequest)

        # designer could not assign a layout to empty widgets
        self.dummyFrameLayout = QtWidgets.QVBoxLayout(self.dummyFrame)

        # add scroll view
        self.scrollView = QtWidgets.QScrollArea(self.dummyFrame)
        self.dummyFrameLayout.addWidget(self.scrollView)
        self.scrollView.setFrameShadow(QtWidgets.QFrame.Raised)
        self.scrollView.setFrameShape(QtWidgets.QFrame.StyledPanel)
        self.scrollView.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOn)

        # add a box for the widgets in the scrollview. 
        self.box = QtWidgets.QWidget(self.scrollView)
        self.box.resize(300,20000) # workaround: extremely large height, because the automatic resize of self.box is not working
        self.scrollView.setWidget(self.box)
        self.boxLayout = QtWidgets.QGridLayout(self.box)
Ejemplo n.º 4
0
    def __init__(self, parent=None):
        QtWidgets.QWidget.__init__(self, parent)
        Ui_CompositionPanelBase.__init__(self)
        self.setupUi(self)
        self.CheckBoxVariable = {}
        self.ComboBoxVariable = {}
        self.__key2name = {}

        self.cnt = 0

        self.__key = -1

        # set text of base widget to 2d parts
        self.vrpLabelTitle.setText(self.__tr('Part Composition'))
        self.KnobInstructionText.setText(
            self.__tr(
                'Create a composed part to define visualization elements on this new 2D part.'
            ))
        self.composedButton.setText(self.__tr('New Composed Part'))

        # connect the button
        self.composedButton.clicked.connect(self.emitComposedGridRequest)

        # designer could not assign a layout to empty widgets
        self.dummyFrameLayout = QtWidgets.QVBoxLayout(self.dummyFrame)

        # add scroll view
        self.scrollView = QtWidgets.QScrollArea(self.dummyFrame)
        self.dummyFrameLayout.addWidget(self.scrollView)
        self.scrollView.setFrameShadow(QtWidgets.QFrame.Raised)
        self.scrollView.setFrameShape(QtWidgets.QFrame.StyledPanel)
        self.scrollView.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOn)

        # add a box for the widgets in the scrollview.
        self.box = QtWidgets.QWidget(self.scrollView)
        self.box.resize(
            300, 20000
        )  # workaround: extremely large height, because the automatic resize of self.box is not working
        self.scrollView.setWidget(self.box)
        self.boxLayout = QtWidgets.QGridLayout(self.box)