本文整理匯總了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))