Skip to content

Commit

Permalink
Port of WizardShaft to PySide
Browse files Browse the repository at this point in the history
  • Loading branch information
jrheinlaender authored and yorikvanhavre committed Jan 6, 2014
1 parent 1d709ad commit 2954d9a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/Mod/PartDesign/WizardShaft/Shaft.py
Expand Up @@ -172,7 +172,7 @@ def updateEdge(self, column, start):
row = rowEndEdgeType
idx = 1

edgeType = self.tableWidget.item(row, column).text().toAscii()[0].upper()
edgeType = self.tableWidget.item(row, column).text()[0].upper()
if not ((edgeType == "C") or (edgeType == "F")):
return # neither chamfer nor fillet defined

Expand Down
2 changes: 1 addition & 1 deletion src/Mod/PartDesign/WizardShaft/ShaftDiagram.py
Expand Up @@ -20,7 +20,7 @@
# * *
# ******************************************************************************/

from PyQt4 import QtCore, QtGui
from PySide import QtCore, QtGui
import FreeCAD, FreeCADGui

class Diagram:
Expand Down
5 changes: 3 additions & 2 deletions src/Mod/PartDesign/WizardShaft/WizardShaft.py
Expand Up @@ -21,7 +21,7 @@
# ******************************************************************************/

import FreeCAD, FreeCADGui
from PyQt4 import QtCore, QtGui
from PySide import QtCore, QtGui
from WizardShaftTable import WizardShaftTable
from Shaft import Shaft

Expand All @@ -32,7 +32,8 @@ class TaskWizardShaft:

def __init__(self, doc):
mw = QtGui.qApp.activeWindow()
cw = mw.centralWidget() # This is a qmdiarea widget
#cw = mw.centralWidget() # This is a qmdiarea widget
cw = mw.findChild(QtGui.QMdiArea)
self.doc = doc

# Get active document or create a new one
Expand Down
8 changes: 4 additions & 4 deletions src/Mod/PartDesign/WizardShaft/WizardShaftTable.py
Expand Up @@ -20,7 +20,7 @@
# * *
# ******************************************************************************/

from PyQt4 import QtCore, QtGui
from PySide import QtCore, QtGui
import FreeCAD # Just for debug printing...

class WizardShaftTable:
Expand Down Expand Up @@ -88,7 +88,7 @@ def __init__(self, w, s):
self.setDiameter(1, 60.0)
self.setConstraintType(1, "Force")

def slotInsertColumn(self, point):
def slotInsertColumn(self):
# FIXME: Allow inserting columns, not just adding at the end
# Note: need to re-name all the following column headers then
# if (column == self.tableWidget.columnCount()):
Expand Down Expand Up @@ -248,7 +248,7 @@ def setInnerDiameter(self, column, d):
def getInnerDiameter(self, column):
return self.getDoubleValue("InnerDiameter", column)

@QtCore.pyqtSlot('QString')
@QtCore.Slot('QString')
def slotConstraintType(self, text):
self.shaft.updateConstraint(self.getFocusedColumn(), text)

Expand Down Expand Up @@ -312,7 +312,7 @@ def setListValue(self, row, column, v):
def getListValue(self, row, column):
widget = self.widget.cellWidget(self.rowDict[row], column)
if widget is not None:
return widget.currentText().toAscii() #[0].upper()
return widget.currentText() #[0].upper()
else:
return None

Expand Down

0 comments on commit 2954d9a

Please sign in to comment.