Port of WizardShaft to PySide

This commit is contained in:
jrheinlaender 2013-07-22 13:17:35 +02:00 committed by Yorik van Havre
parent 1d709ade42
commit 2954d9a960
4 changed files with 9 additions and 8 deletions

View File

@ -172,7 +172,7 @@ class Shaft:
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

View File

@ -20,7 +20,7 @@
# * *
# ******************************************************************************/
from PyQt4 import QtCore, QtGui
from PySide import QtCore, QtGui
import FreeCAD, FreeCADGui
class Diagram:

View File

@ -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
@ -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

View File

@ -20,7 +20,7 @@
# * *
# ******************************************************************************/
from PyQt4 import QtCore, QtGui
from PySide import QtCore, QtGui
import FreeCAD # Just for debug printing...
class WizardShaftTable:
@ -88,7 +88,7 @@ class WizardShaftTable:
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()):
@ -248,7 +248,7 @@ class WizardShaftTable:
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)
@ -312,7 +312,7 @@ class WizardShaftTable:
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