Arch: use unicode in task panels - fixes #1338
This commit is contained in:
parent
f4254b9e0b
commit
f3a4c36155
|
@ -410,13 +410,13 @@ class _CommandStructure:
|
||||||
"sets up a taskbox widget"
|
"sets up a taskbox widget"
|
||||||
d = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Units").GetInt("Decimals",2)
|
d = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Units").GetInt("Decimals",2)
|
||||||
w = QtGui.QWidget()
|
w = QtGui.QWidget()
|
||||||
w.setWindowTitle(str(translate("Arch","Structure options")))
|
w.setWindowTitle(unicode(translate("Arch","Structure options")))
|
||||||
lay0 = QtGui.QVBoxLayout(w)
|
lay0 = QtGui.QVBoxLayout(w)
|
||||||
|
|
||||||
# presets box
|
# presets box
|
||||||
layp = QtGui.QHBoxLayout()
|
layp = QtGui.QHBoxLayout()
|
||||||
lay0.addLayout(layp)
|
lay0.addLayout(layp)
|
||||||
labelp = QtGui.QLabel(str(translate("Arch","Preset")))
|
labelp = QtGui.QLabel(unicode(translate("Arch","Preset")))
|
||||||
layp.addWidget(labelp)
|
layp.addWidget(labelp)
|
||||||
valuep = QtGui.QComboBox()
|
valuep = QtGui.QComboBox()
|
||||||
fpresets = [" "]
|
fpresets = [" "]
|
||||||
|
@ -428,7 +428,7 @@ class _CommandStructure:
|
||||||
# length
|
# length
|
||||||
lay1 = QtGui.QHBoxLayout()
|
lay1 = QtGui.QHBoxLayout()
|
||||||
lay0.addLayout(lay1)
|
lay0.addLayout(lay1)
|
||||||
label1 = QtGui.QLabel(str(translate("Arch","Length")))
|
label1 = QtGui.QLabel(unicode(translate("Arch","Length")))
|
||||||
lay1.addWidget(label1)
|
lay1.addWidget(label1)
|
||||||
self.vLength = QtGui.QDoubleSpinBox()
|
self.vLength = QtGui.QDoubleSpinBox()
|
||||||
self.vLength.setDecimals(d)
|
self.vLength.setDecimals(d)
|
||||||
|
@ -439,7 +439,7 @@ class _CommandStructure:
|
||||||
# width
|
# width
|
||||||
lay2 = QtGui.QHBoxLayout()
|
lay2 = QtGui.QHBoxLayout()
|
||||||
lay0.addLayout(lay2)
|
lay0.addLayout(lay2)
|
||||||
label2 = QtGui.QLabel(str(translate("Arch","Width")))
|
label2 = QtGui.QLabel(unicode(translate("Arch","Width")))
|
||||||
lay2.addWidget(label2)
|
lay2.addWidget(label2)
|
||||||
self.vWidth = QtGui.QDoubleSpinBox()
|
self.vWidth = QtGui.QDoubleSpinBox()
|
||||||
self.vWidth.setDecimals(d)
|
self.vWidth.setDecimals(d)
|
||||||
|
@ -450,7 +450,7 @@ class _CommandStructure:
|
||||||
# height
|
# height
|
||||||
lay3 = QtGui.QHBoxLayout()
|
lay3 = QtGui.QHBoxLayout()
|
||||||
lay0.addLayout(lay3)
|
lay0.addLayout(lay3)
|
||||||
label3 = QtGui.QLabel(str(translate("Arch","Height")))
|
label3 = QtGui.QLabel(unicode(translate("Arch","Height")))
|
||||||
lay3.addWidget(label3)
|
lay3.addWidget(label3)
|
||||||
self.vHeight = QtGui.QDoubleSpinBox()
|
self.vHeight = QtGui.QDoubleSpinBox()
|
||||||
self.vHeight.setDecimals(d)
|
self.vHeight.setDecimals(d)
|
||||||
|
@ -459,11 +459,11 @@ class _CommandStructure:
|
||||||
lay3.addWidget(self.vHeight)
|
lay3.addWidget(self.vHeight)
|
||||||
|
|
||||||
# horizontal button
|
# horizontal button
|
||||||
value5 = QtGui.QPushButton(str(translate("Arch","Rotate")))
|
value5 = QtGui.QPushButton(unicode(translate("Arch","Rotate")))
|
||||||
lay0.addWidget(value5)
|
lay0.addWidget(value5)
|
||||||
|
|
||||||
# continue button
|
# continue button
|
||||||
value4 = QtGui.QCheckBox(str(translate("Arch","Continue")))
|
value4 = QtGui.QCheckBox(unicode(translate("Arch","Continue")))
|
||||||
lay0.addWidget(value4)
|
lay0.addWidget(value4)
|
||||||
|
|
||||||
QtCore.QObject.connect(valuep,QtCore.SIGNAL("currentIndexChanged(int)"),self.setPreset)
|
QtCore.QObject.connect(valuep,QtCore.SIGNAL("currentIndexChanged(int)"),self.setPreset)
|
||||||
|
|
|
@ -259,12 +259,12 @@ class _CommandWall:
|
||||||
"sets up a taskbox widget"
|
"sets up a taskbox widget"
|
||||||
d = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Units").GetInt("Decimals",2)
|
d = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Units").GetInt("Decimals",2)
|
||||||
w = QtGui.QWidget()
|
w = QtGui.QWidget()
|
||||||
w.setWindowTitle(str(translate("Arch","Wall options")))
|
w.setWindowTitle(unicode(translate("Arch","Wall options")))
|
||||||
lay0 = QtGui.QVBoxLayout(w)
|
lay0 = QtGui.QVBoxLayout(w)
|
||||||
|
|
||||||
lay5 = QtGui.QHBoxLayout()
|
lay5 = QtGui.QHBoxLayout()
|
||||||
lay0.addLayout(lay5)
|
lay0.addLayout(lay5)
|
||||||
label5 = QtGui.QLabel(str(translate("Arch","Length")))
|
label5 = QtGui.QLabel(unicode(translate("Arch","Length")))
|
||||||
lay5.addWidget(label5)
|
lay5.addWidget(label5)
|
||||||
self.Length = QtGui.QDoubleSpinBox()
|
self.Length = QtGui.QDoubleSpinBox()
|
||||||
self.Length.setDecimals(d)
|
self.Length.setDecimals(d)
|
||||||
|
@ -273,7 +273,7 @@ class _CommandWall:
|
||||||
|
|
||||||
lay1 = QtGui.QHBoxLayout()
|
lay1 = QtGui.QHBoxLayout()
|
||||||
lay0.addLayout(lay1)
|
lay0.addLayout(lay1)
|
||||||
label1 = QtGui.QLabel(str(translate("Arch","Width")))
|
label1 = QtGui.QLabel(unicode(translate("Arch","Width")))
|
||||||
lay1.addWidget(label1)
|
lay1.addWidget(label1)
|
||||||
value1 = QtGui.QDoubleSpinBox()
|
value1 = QtGui.QDoubleSpinBox()
|
||||||
value1.setDecimals(d)
|
value1.setDecimals(d)
|
||||||
|
@ -282,7 +282,7 @@ class _CommandWall:
|
||||||
|
|
||||||
lay2 = QtGui.QHBoxLayout()
|
lay2 = QtGui.QHBoxLayout()
|
||||||
lay0.addLayout(lay2)
|
lay0.addLayout(lay2)
|
||||||
label2 = QtGui.QLabel(str(translate("Arch","Height")))
|
label2 = QtGui.QLabel(unicode(translate("Arch","Height")))
|
||||||
lay2.addWidget(label2)
|
lay2.addWidget(label2)
|
||||||
value2 = QtGui.QDoubleSpinBox()
|
value2 = QtGui.QDoubleSpinBox()
|
||||||
value2.setDecimals(d)
|
value2.setDecimals(d)
|
||||||
|
@ -291,7 +291,7 @@ class _CommandWall:
|
||||||
|
|
||||||
lay3 = QtGui.QHBoxLayout()
|
lay3 = QtGui.QHBoxLayout()
|
||||||
lay0.addLayout(lay3)
|
lay0.addLayout(lay3)
|
||||||
label3 = QtGui.QLabel(str(translate("Arch","Alignment")))
|
label3 = QtGui.QLabel(unicode(translate("Arch","Alignment")))
|
||||||
lay3.addWidget(label3)
|
lay3.addWidget(label3)
|
||||||
value3 = QtGui.QComboBox()
|
value3 = QtGui.QComboBox()
|
||||||
items = ["Center","Left","Right"]
|
items = ["Center","Left","Right"]
|
||||||
|
@ -299,7 +299,7 @@ class _CommandWall:
|
||||||
value3.setCurrentIndex(items.index(self.Align))
|
value3.setCurrentIndex(items.index(self.Align))
|
||||||
lay3.addWidget(value3)
|
lay3.addWidget(value3)
|
||||||
|
|
||||||
value4 = QtGui.QCheckBox(str(translate("Arch","Continue")))
|
value4 = QtGui.QCheckBox(unicode(translate("Arch","Continue")))
|
||||||
lay0.addWidget(value4)
|
lay0.addWidget(value4)
|
||||||
QtCore.QObject.connect(value1,QtCore.SIGNAL("valueChanged(double)"),self.setWidth)
|
QtCore.QObject.connect(value1,QtCore.SIGNAL("valueChanged(double)"),self.setWidth)
|
||||||
QtCore.QObject.connect(value2,QtCore.SIGNAL("valueChanged(double)"),self.setHeight)
|
QtCore.QObject.connect(value2,QtCore.SIGNAL("valueChanged(double)"),self.setHeight)
|
||||||
|
|
|
@ -483,13 +483,13 @@ class _CommandWindow:
|
||||||
"sets up a taskbox widget"
|
"sets up a taskbox widget"
|
||||||
d = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Units").GetInt("Decimals",2)
|
d = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Units").GetInt("Decimals",2)
|
||||||
w = QtGui.QWidget()
|
w = QtGui.QWidget()
|
||||||
w.setWindowTitle(str(translate("Arch","Window options")))
|
w.setWindowTitle(unicode(translate("Arch","Window options")))
|
||||||
lay0 = QtGui.QVBoxLayout(w)
|
lay0 = QtGui.QVBoxLayout(w)
|
||||||
|
|
||||||
# presets box
|
# presets box
|
||||||
layp = QtGui.QHBoxLayout()
|
layp = QtGui.QHBoxLayout()
|
||||||
lay0.addLayout(layp)
|
lay0.addLayout(layp)
|
||||||
labelp = QtGui.QLabel(str(translate("Arch","Preset")))
|
labelp = QtGui.QLabel(unicode(translate("Arch","Preset")))
|
||||||
layp.addWidget(labelp)
|
layp.addWidget(labelp)
|
||||||
valuep = QtGui.QComboBox()
|
valuep = QtGui.QComboBox()
|
||||||
valuep.addItems(["Create from scratch"]+WindowPresets)
|
valuep.addItems(["Create from scratch"]+WindowPresets)
|
||||||
|
@ -507,7 +507,7 @@ class _CommandWindow:
|
||||||
for param in self.wparams:
|
for param in self.wparams:
|
||||||
l = QtGui.QHBoxLayout()
|
l = QtGui.QHBoxLayout()
|
||||||
lay0.addLayout(l)
|
lay0.addLayout(l)
|
||||||
lab = QtGui.QLabel(str(translate("Arch",param)))
|
lab = QtGui.QLabel(unicode(translate("Arch",param)))
|
||||||
l.addWidget(lab)
|
l.addWidget(lab)
|
||||||
setattr(self,"val"+param,QtGui.QDoubleSpinBox())
|
setattr(self,"val"+param,QtGui.QDoubleSpinBox())
|
||||||
wid = getattr(self,"val"+param)
|
wid = getattr(self,"val"+param)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user