def __init__(self, pos, curve, parent):
     Curve2DEditor.__init__(self, parent)
     self.pos = pos
     self.accessorType[NurbsCurve]=ProfileEditor.NurbsAccessor
     self.setFixedSize(100, 90)
     self.setEnabled(True)
     self.setAutoFillBackground(True)
     self.bkgdColor = self.backgroundColor()
     if curve:
         self.setCurve(curve)
 def __init__(self, pos, curve, parent):
     Curve2DEditor.__init__(self, parent)
     self.pos = pos
     self.accessorType[NurbsCurve] = ProfileEditor.NurbsAccessor
     self.setFixedSize(100, 90)
     self.setEnabled(True)
     self.setAutoFillBackground(True)
     self.bkgdColor = self.backgroundColor()
     if curve:
         self.setCurve(curve)
 def __init__(self, node, parent):
     """
     """
     Curve2DEditor.__init__(self, parent)
     NodeWidget.__init__(self, node)
     
     self.notify(node, ('input_modified',))
     
     self.connect(self, QtCore.SIGNAL("valueChanged()"), \
                  self.valueChanged)
     
     self.window().setWindowTitle(node.get_caption())
Beispiel #4
0
 def __init__(self, node, parent):
     """
     """
     Curve2DEditor.__init__(self, parent)
     NodeWidget.__init__(self, node)
     
     self.notify(node, ('input_modified',))
     
     self.connect(self, QtCore.SIGNAL("valueChanged()"), \
                  self.valueChanged)
     
     self.window().setWindowTitle(node.get_caption())
    def __init__(self, parent=None, editingCentral=False):
        QtGui.QSplitter.__init__(self, QtCore.Qt.Vertical, parent)
        self.__splitter = QtGui.QSplitter(QtCore.Qt.Horizontal, self)

        self.__profileExplorer = ProfileViewer(None)
        self.__curveOverview = CurvePanel()
        self.__curveEdit = Curve2DEditor(self.__splitter)
        self.__curveEdit.position = 0.0  #additional attribute needed to refresh the edited curve.

        self.__addonConf = AddOnControlWidget(self.__profileExplorer, self)

        # -- curve panel conf --
        self.__curveEdit.sphere = interpolated_profile.sg.Sphere(radius=0.002)
        self.__curveEdit.accessorType[NurbsCurve] = ProfileEditor.NurbsAccessor

        # -- profile explorer conf --
        self.__profileExplorer.factor = [1, 1, 2]
        self.__profileExplorer.userSlices.enabled = True
        self.__profileExplorer.visualSections.enabled = True
        self.__profileExplorer.visualSections.baseAlpha = 0.5
        self.__profileExplorer.grids.enabled = True
        self.__profileExplorer.grids.xzGrid = True
        self.__profileExplorer.grids.zScale = True

        # -- signal binding --
        self.__curveOverview.curveEditRequested.connect(
            self.__on_curve_edit_request)
        self.__curveOverview.curveDeleteRequested.connect(
            self.__on_curve_delete_request)
        self.__curveOverview.curveMoveRequested.connect(
            self.__on_curve_move_request)
        self.__profileExplorer.positionChanged.connect(
            self.__on_position_changed)
        self.__profileExplorer.userSectionHighlighted.connect(
            self.__on_user_section_highlight)
        self.__profileExplorer.userSectionHighlighted.connect(
            self.__curveOverview.highlight_curve_at_position)
        # !!! Do not bind this one as valueChanged can be anything
        # !!! and that our custom curvePanel.curveAccessor directly
        # !!! edits the interpolated profile.
        # self.__curveEdit.connect(self.__curveEdit, QtCore.SIGNAL("valueChanged()"), self.__on_curve_edited)

        # -- layout --
        l = QtGui.QBoxLayout(QtGui.QBoxLayout.TopToBottom)
        l.addWidget(
            self.__profileExplorer if not editingCentral else self.__curveEdit)
        l.addWidget(self.__curveOverview)
        l.setContentsMargins(0, 0, 0, 0)
        explorerAndCurveOverview = QtGui.QWidget(self.__splitter)
        explorerAndCurveOverview.setLayout(l)
        self.__splitter.addWidget(self.__addonConf)
        self.__splitter.addWidget(explorerAndCurveOverview)
        self.__splitter.addWidget(
            self.__curveEdit if not editingCentral else self.__profileExplorer)
        self.__splitter.setSizes([0, explorerAndCurveOverview.width(), 0])
        self.addWidget(self.__splitter)

        # -- latest position of profile explorer
        # -- cursor that matched a user defined curve.
        self.__editedPosition = None
Beispiel #6
0
 def getEditor(self,parent):
     if Curve2DEditor:
         return Curve2DEditor(parent,Curve2DConstraint())
     else : return None
Beispiel #7
0
try:
Beispiel #8
0
try:
Beispiel #9
0
 def __init__(self):
     AbstractQtControlWidget.__init__(self)
     Curve2DEditor.__init__(self, parent=None)
     self.value_changed_signal = 'valueChanged()'
Beispiel #10
0
 def __init__(self):
     AbstractQtControlWidget.__init__(self)
     Curve2DEditor.__init__(self, parent=None, constraints=FuncConstraint())
     self.value_changed_signal = 'valueChanged()'
Beispiel #11
0
 def __init__(self):
     AbstractQtControlWidget.__init__(self)
     Curve2DEditor.__init__(self, parent=None)
     self.value_changed_signal = "valueChanged()"