本文整理汇总了Python中models.SqlHandler.makeCopy方法的典型用法代码示例。如果您正苦于以下问题:Python SqlHandler.makeCopy方法的具体用法?Python SqlHandler.makeCopy怎么用?Python SqlHandler.makeCopy使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类models.SqlHandler
的用法示例。
在下文中一共展示了SqlHandler.makeCopy方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from models import SqlHandler [as 别名]
# 或者: from models.SqlHandler import makeCopy [as 别名]
def __init__(self, parent=None, item=None):
owner = None
animal = None
#check if item is dictionary. So it is called by ownerTab
if(item != None and item.__class__.__name__ == 'dict'):
if("owner" in item):
owner = item["owner"]
if("animal" in item):
animal = item["animal"]
item = None
GenericTab.__init__(self, parent=parent, item=item)
self.ui = Ui_Visit()
self.ui.setupUi(self)
self.ui.stackedWidget.setCurrentIndex(0) #TODO:remove if needed
self.currentVisitAnimal = None
self.currentOperation = None
self.configure()
self.createConnections()
self.setBasicInfo()
if(owner != None):
owner = SqlHandler.makeCopy(self.session,owner)
self.ownerserachline.setCurrentItem(owner)
if(animal != None):
animal = SqlHandler.makeCopy(self.session,animal)
self.animalTreeWidget.addAskedItem(animal) #TODO find function to add animal
self.disableAnimalTree(False)
示例2: __init__
# 需要导入模块: from models import SqlHandler [as 别名]
# 或者: from models.SqlHandler import makeCopy [as 别名]
def __init__(self, parent=None, item=None, animal=None):
from uipy.ui_phonerecipiedialog import Ui_PhoneRecipieDialog
QDialog.__init__(self, parent=parent)
self.ui = Ui_PhoneRecipieDialog()
self.ui.setupUi(self)
self.session = SqlHandler.newSession()
self.item = item
self.animal = None
if animal != None:
self.animal = SqlHandler.makeCopy(self.session, animal)
self.configure()
self.createConnections()
self.setBasicInfo()
示例3: __init__
# 需要导入模块: from models import SqlHandler [as 别名]
# 或者: from models.SqlHandler import makeCopy [as 别名]
def __init__(self, parent, item=None, deftype='Item'):
QDialog.__init__(self,parent=parent)
self.ui = Ui_ItemCreatorDialog()
self.ui.setupUi(self)
self.session = SqlHandler.newSession()
self.deftype = deftype
self.item = item
if self.item != None:
self.item = SqlHandler.makeCopy(self.session, self.item)
self.session.add(self.item)
self.configure()
self.configureConnections()
self.setBasicInfo()
self.selectCorrectItem()
示例4: __init__
# 需要导入模块: from models import SqlHandler [as 别名]
# 或者: from models.SqlHandler import makeCopy [as 别名]
def __init__(self, parent=None, item=None):
QDialog.__init__(self, parent)
self.ui = Ui_OperationCreator()
self.ui.setupUi(self)
self.session = SqlHandler.newSession()
if item != None:
self.item = SqlHandler.makeCopy(self.session, item)
else:
self.item = None
from models.operation import SurgeryBaseItem
self.itemTreeWidget = ItemTreeWidget(session = self.session, parent=self, creator=SurgeryBaseItem)
self.itemTreeWidget.setTitle("Leikkauksen tavarat")
self.ui.itemPageLayout.addWidget(self.itemTreeWidget)
self.itemSearchEdit = SearchLineEdit(tabcreator=ItemCreatorDialog, session=self.session,
parent=self, function=SqlHandler.searchItem)
self.ui.searchLineEditLayout.insertWidget(0,self.itemSearchEdit)
self.configureConnections()
self.setBasicInfo()
示例5: addAskedItem
# 需要导入模块: from models import SqlHandler [as 别名]
# 或者: from models.SqlHandler import makeCopy [as 别名]
def addAskedItem(self, item):
if item != None:
self.addItemToTree(SqlHandler.makeCopy(self.session, item))
示例6: addAskedItem
# 需要导入模块: from models import SqlHandler [as 别名]
# 或者: from models.SqlHandler import makeCopy [as 别名]
def addAskedItem(self, item):
print("DEBUG: SearchLineEdit: addAskedItem() item: ", item)
if item != None:
self.setCurrentItem(SqlHandler.makeCopy(self.session, item))