Exemplo n.º 1
0
 def __init__(self,parent,editor):
     QWidget.__init__(self,parent)
     self.editor = editor
     self.showLines = True
     self.markers = {}
     self.markerStack = {}
     self.markerType = {}
Exemplo n.º 2
0
        def __init__(self, orientation, parent, item):
            QWidget.__init__(self, parent)
            self.setFocusPolicy(Qt.StrongFocus)
            self.setMinimumHeight(20)
            horizontalLayout = QHBoxLayout(self)
            horizontalLayout.setContentsMargins(0, 0, 0, 0)
            self.label = QLabel(self)
            horizontalLayout.addWidget(self.label)
            self.slider = QSlider(orientation, self)
            horizontalLayout.addWidget(self.slider)
            self.item = item
            scalar = item.scalar
            self.isfloat = scalar.isFloat()
            if item.scalar.isFloat():
                self.spinBox = QDoubleSpinBox(self)
                self.spinBox.setSingleStep(0.1**scalar.decimals)
            else:
                self.spinBox = QSpinBox(self)
            self.spinBox.setMinimumHeight(20)
            horizontalLayout.addWidget(self.spinBox)
            self.spinBox.hide()
            #self.slider.hide()
            self.chgButton = QPushButton('O', self)
            self.chgButton.setMaximumWidth(15)
            self.chgButton.setMinimumWidth(15)
            horizontalLayout.addWidget(self.chgButton)
            self.setRange(scalar.minvalue, scalar.maxvalue)
            self.label.setMinimumWidth(self.labelwidth)
            self.setValue(scalar.value)
            self.locked = False

            if self.isfloat:
                self.slider.valueChanged.connect(
                    self.updateInt2FloatItem
                )  # QObject.connect(self.slider,SIGNAL('valueChanged(int)'),self.updateInt2FloatItem)
                self.spinBox.valueChanged.connect(
                    self.updateItem
                )  # QObject.connect(self.spinBox,SIGNAL('valueChanged(double)'),self.updateItem)
            else:
                self.slider.valueChanged.connect(
                    self.updateItem
                )  # QObject.connect(self.slider,SIGNAL('valueChanged(int)'),self.updateItem)
                self.spinBox.valueChanged.connect(
                    self.updateItem
                )  # QObject.connect(self.spinBox,SIGNAL('valueChanged(int)'),self.updateItem)
            self.chgButton.pressed.connect(
                self.changeEditor
            )  # QObject.connect(self.chgButton,SIGNAL('pressed()'),self.changeEditor)
Exemplo n.º 3
0
    def __init__(self, parent):
        QWidget.__init__(self, parent)
        self.setObjectName("materialPanelContents")
        self.verticalLayout = QVBoxLayout(self)
        self.verticalLayout.setSpacing(0)
        self.verticalLayout.setContentsMargins(0, 0, 0, 0)
        self.verticalLayout.setObjectName("materialPanelLayout")

        self.materialpanel = QScrollArea(self)
        self.view = MaterialPanelView(self.materialpanel)
        self.materialpanel.setWidget(self.view)
        self.materialpanel.setWidgetResizable(True)
        self.materialpanel.setObjectName("materialPanelArea")
        self.verticalLayout.addWidget(self.materialpanel)

        self.view.valueChanged.connect(self.__updateStatus)
Exemplo n.º 4
0
 def mouseDoubleClickEvent(self,event):
     self.newDocumentRequest.emit()
     QWidget.mouseDoubleClickEvent(self,event)
Exemplo n.º 5
0
 def __init__(self,parent):
     QWidget.__init__(self,parent)
Exemplo n.º 6
0
 def __init__(self, parent):
     QWidget.__init__(self, parent)
     debugger_right_ui.Ui_Form.__init__(self)
     self.setupUi(self)