# Path: drawingDimensioning/py3_helpers.py
# def unicode(*args):
#     return str(args[0])
# 
# def encode_if_py2(unicode_object):
#     '''return unicode for py3 and bytes for py2'''
#     if sys.version_info.major < 3:
#         return unicode_object.encode("utf8")
#     else:
#         return unicode_object


from drawingDimensioning.py3_helpers import unicode, encode_if_py2
from drawingDimensioning.command import *
# This Python file uses the following encoding: utf-8

d = DimensioningCommand()

def textSVG( x, y, text='text', rotation=0.0, textRenderer_addText= defaultTextRenderer):
    return '<g> %s </g>' % textRenderer_addText(x,y,text,rotation=rotation)

d.registerPreference( 'textRenderer_addText', ['inherit','5', 0], 'text properties (AddText)', kind='font' )

class text_widget:
    def valueChanged( self, arg1):
        d.text = arg1
    def generateWidget( self, dimensioningProcess ):
        self.lineEdit = QtGui.QLineEdit()
        self.lineEdit.setText('text')
        d.text = 'text'
        self.lineEdit.textChanged.connect(self.valueChanged)
        return self.lineEdit
    def add_properties_to_dimension_object( self, obj ):
        obj.addProperty("App::PropertyString", 'text', 'Parameters')

# Path: drawingDimensioning/py3_helpers.py
# def unicode(*args):
#     return str(args[0])
# 
# def encode_if_py2(unicode_object):
#     '''return unicode for py3 and bytes for py2'''
#     if sys.version_info.major < 3:
#         return unicode_object.encode("utf8")
#     else:
#         return unicode_object


# Path: drawingDimensioning/textAdd.py
from drawingDimensioning.py3_helpers import unicode, encode_if_py2
from drawingDimensioning.command import *

# This Python file uses the following encoding: utf-8

d = DimensioningCommand()

def textSVG( x, y, text='text', rotation=0.0, textRenderer_addText= defaultTextRenderer):
    return '<g> %s </g>' % textRenderer_addText(x,y,text,rotation=rotation)

d.registerPreference( 'textRenderer_addText', ['inherit','5', 0], 'text properties (AddText)', kind='font' )

class text_widget:
    def valueChanged( self, arg1):
        d.text = arg1
    def generateWidget( self, dimensioningProcess ):
        self.lineEdit = QtGui.QLineEdit()
        self.lineEdit.setText('text')
        d.text = 'text'
        self.lineEdit.textChanged.connect(self.valueChanged)
        return self.lineEdit
    def add_properties_to_dimension_object( self, obj ):
        obj.addProperty("App::PropertyString", 'text', 'Parameters')

        obj.text = encode_if_py2(d.text)