Merge pull request #3081 from Schildkroet/master
[Path] Added GUI support to PathDeburrOp for direction selection
This commit is contained in:
@@ -6,14 +6,14 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>375</width>
|
||||
<height>303</height>
|
||||
<width>399</width>
|
||||
<height>333</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<layout class="QGridLayout" name="gridLayout_3" rowstretch="0,0,0">
|
||||
<item row="0" column="0">
|
||||
<widget class="QFrame" name="frame">
|
||||
<property name="sizePolicy">
|
||||
@@ -29,28 +29,28 @@
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Tool Controller</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<item row="1" column="1">
|
||||
<widget class="QComboBox" name="toolController">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>The tool and its settings to be used for this operation.</p></body></html></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Coolant Mode</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<item row="2" column="1">
|
||||
<widget class="QComboBox" name="coolantController">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>The tool and its settings to be used for this operation.</p></body></html></string>
|
||||
@@ -60,7 +60,7 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<item row="2" column="0">
|
||||
<widget class="QWidget" name="widget" native="true">
|
||||
<layout class="QGridLayout" name="gridLayout_4">
|
||||
<item row="0" column="0">
|
||||
@@ -236,6 +236,79 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QWidget" name="gridWidget" native="true">
|
||||
<layout class="QGridLayout" name="gridLayout_5">
|
||||
<property name="leftMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>8</number>
|
||||
</property>
|
||||
<item row="1" column="2">
|
||||
<widget class="QComboBox" name="direction">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>The direction in which the profile is performed, clockwise or counter clockwise.</p></body></html></string>
|
||||
</property>
|
||||
<property name="currentText">
|
||||
<string>CW</string>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>CW</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>CCW</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="direction_label">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Direction</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Preferred</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>30</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
|
||||
@@ -32,6 +32,11 @@ import math
|
||||
|
||||
from PySide import QtCore
|
||||
|
||||
__title__ = "Path Deburr Operation"
|
||||
__author__ = "sliptonic (Brad Collette), Schildkroet"
|
||||
__url__ = "http://www.freecadweb.org"
|
||||
__doc__ = "Deburr operation."
|
||||
|
||||
PathLog.setLevel(PathLog.Level.INFO, PathLog.thisModule())
|
||||
#PathLog.trackModule(PathLog.thisModule())
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ import PathScripts.PathOpGui as PathOpGui
|
||||
from PySide import QtCore, QtGui
|
||||
|
||||
__title__ = "Path Deburr Operation UI"
|
||||
__author__ = "sliptonic (Brad Collette)"
|
||||
__author__ = "sliptonic (Brad Collette), Schildkroet"
|
||||
__url__ = "http://www.freecadweb.org"
|
||||
__doc__ = "Deburr operation page controller and command implementation."
|
||||
|
||||
@@ -72,6 +72,9 @@ class TaskPanelOpPage(PathOpGui.TaskPanelPage):
|
||||
obj.Join = 'Round'
|
||||
elif self.form.joinMiter.isChecked():
|
||||
obj.Join = 'Miter'
|
||||
|
||||
if obj.Direction != str(self.form.direction.currentText()):
|
||||
obj.Direction = str(self.form.direction.currentText())
|
||||
|
||||
self.updateToolController(obj, self.form.toolController)
|
||||
self.updateCoolant(obj, self.form.coolantController)
|
||||
@@ -84,6 +87,7 @@ class TaskPanelOpPage(PathOpGui.TaskPanelPage):
|
||||
self.form.joinRound.setChecked('Round' == obj.Join)
|
||||
self.form.joinMiter.setChecked('Miter' == obj.Join)
|
||||
self.form.joinFrame.hide()
|
||||
self.selectInComboBox(obj.Direction, self.form.direction)
|
||||
|
||||
def updateWidth(self):
|
||||
PathGui.updateInputField(self.obj, 'Width', self.form.value_W)
|
||||
@@ -96,6 +100,7 @@ class TaskPanelOpPage(PathOpGui.TaskPanelPage):
|
||||
signals.append(self.form.joinMiter.clicked)
|
||||
signals.append(self.form.joinRound.clicked)
|
||||
signals.append(self.form.coolantController.currentIndexChanged)
|
||||
signals.append(self.form.direction.currentIndexChanged)
|
||||
return signals
|
||||
|
||||
def registerSignalHandlers(self, obj):
|
||||
|
||||
Reference in New Issue
Block a user