remove UnicodeUTF8
This commit is contained in:
@@ -66,8 +66,7 @@ class Preview(object):
|
||||
text = str(QtGui.QApplication.translate(
|
||||
"ship_create",
|
||||
"Base line",
|
||||
None,
|
||||
QtGui.QApplication.UnicodeUTF8))
|
||||
None))
|
||||
except:
|
||||
text = "Base line"
|
||||
self.baseLineLabel = DrawText('BaseLineText',
|
||||
@@ -83,8 +82,7 @@ class Preview(object):
|
||||
text = str(QtGui.QApplication.translate(
|
||||
"ship_create",
|
||||
"Free surface",
|
||||
None,
|
||||
QtGui.QApplication.UnicodeUTF8))
|
||||
None))
|
||||
except:
|
||||
text = "Free surface"
|
||||
self.fsLineLabel = DrawText('FSText', text, Base.Vector(xEnd, 0, T))
|
||||
@@ -100,8 +98,7 @@ class Preview(object):
|
||||
text = str(QtGui.QApplication.translate(
|
||||
"ship_create",
|
||||
"Forward perpendicular",
|
||||
None,
|
||||
QtGui.QApplication.UnicodeUTF8))
|
||||
None))
|
||||
except:
|
||||
text = "Forward perpendicular"
|
||||
self.fpLineLabel = DrawText('FPText',
|
||||
@@ -117,8 +114,7 @@ class Preview(object):
|
||||
text = str(QtGui.QApplication.translate(
|
||||
"ship_create",
|
||||
"After perpendicular",
|
||||
None,
|
||||
QtGui.QApplication.UnicodeUTF8))
|
||||
None))
|
||||
except:
|
||||
text = "After perpendicular"
|
||||
self.apLineLabel = DrawText('APText',
|
||||
@@ -134,8 +130,7 @@ class Preview(object):
|
||||
text = str(QtGui.QApplication.translate(
|
||||
"ship_create",
|
||||
"Main frame",
|
||||
None,
|
||||
QtGui.QApplication.UnicodeUTF8))
|
||||
None))
|
||||
except:
|
||||
text = "Main frame"
|
||||
self.amLineLabel = DrawText('AMText',
|
||||
|
||||
@@ -133,15 +133,13 @@ class TaskPanel:
|
||||
"ship_console",
|
||||
"Ship objects can only be created on top of hull geometry"
|
||||
" (no objects selected)",
|
||||
None,
|
||||
QtGui.QApplication.UnicodeUTF8)
|
||||
None)
|
||||
App.Console.PrintError(msg + '\n')
|
||||
msg = QtGui.QApplication.translate(
|
||||
"ship_console",
|
||||
"Please create or load a ship hull geometry before using"
|
||||
" this tool",
|
||||
None,
|
||||
QtGui.QApplication.UnicodeUTF8)
|
||||
None)
|
||||
App.Console.PrintError(msg + '\n')
|
||||
return True
|
||||
self.solids = []
|
||||
@@ -154,15 +152,13 @@ class TaskPanel:
|
||||
"ship_console",
|
||||
"Ship objects can only be created on top of hull geometry"
|
||||
" (no solid found at selected objects)",
|
||||
None,
|
||||
QtGui.QApplication.UnicodeUTF8)
|
||||
None)
|
||||
App.Console.PrintError(msg + '\n')
|
||||
msg = QtGui.QApplication.translate(
|
||||
"ship_console",
|
||||
"Please create or load a ship hull geometry before using"
|
||||
" this tool",
|
||||
None,
|
||||
QtGui.QApplication.UnicodeUTF8)
|
||||
None)
|
||||
App.Console.PrintError(msg + '\n')
|
||||
return True
|
||||
# Get the ship bounds. The ship instance can not have dimensions
|
||||
@@ -220,26 +216,22 @@ class TaskPanel:
|
||||
self.form.setWindowTitle(QtGui.QApplication.translate(
|
||||
"ship_create",
|
||||
"Create a new ship",
|
||||
None,
|
||||
QtGui.QApplication.UnicodeUTF8))
|
||||
None))
|
||||
self.widget(QtGui.QLabel, "LengthLabel").setText(
|
||||
QtGui.QApplication.translate(
|
||||
"ship_create",
|
||||
"Length",
|
||||
None,
|
||||
QtGui.QApplication.UnicodeUTF8))
|
||||
None))
|
||||
self.widget(QtGui.QLabel, "BreadthLabel").setText(
|
||||
QtGui.QApplication.translate(
|
||||
"ship_create",
|
||||
"Breadth",
|
||||
None,
|
||||
QtGui.QApplication.UnicodeUTF8))
|
||||
None))
|
||||
self.widget(QtGui.QLabel, "DraftLabel").setText(
|
||||
QtGui.QApplication.translate(
|
||||
"ship_create",
|
||||
"Draft",
|
||||
None,
|
||||
QtGui.QApplication.UnicodeUTF8))
|
||||
None))
|
||||
|
||||
def clampVal(self, widget, val_min, val_max, val):
|
||||
if val >= val_min and val <= val_max:
|
||||
|
||||
Reference in New Issue
Block a user