def __init__(self, parent=None,item=None): GenericTab.__init__(self, parent=parent, item=None) self.ui = Ui_SummaryTab() self.ui.setupUi(self) self.returnItem = False self.visitanimal = None if type(item) is dict: if 'owner' in item: self.ui.ownerNameLabel.setText(item['owner'].name) else: logERROR(self, "SummaryTab.init: owner not found from dict") if 'visitanimal' in item: self.visitanimal = item['visitanimal'] self.ui.animalNameLabel.setText(item['visitanimal'].animal.name) else: logERROR(self, "SummaryTab.init: owner not found from dict") if 'text' in item: self.addText(item['text']) else: logERROR(self, "SummaryTab.init: text not found from dict") else: logDEBUG(self, "SummaryTab.init: item is not dict it is: "+ item) self.session = SqlHandler.newSession() self.itemSearchEdit = SearchLineEdit(tabcreator=AddNewSummary, session=self.session, parent=self, function=SqlHandler.searchSummary) self.configure() self.configureConnctions()
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)
def __init__(self, parent=None, item=None): GenericTab.__init__(self, parent=parent) self.ui = Ui_SearchTab() self.ui.setupUi(self) self.configure() self.configureConnections() self.setBasicInfo()
def __init__(self, parent=None, item=None): GenericTab.__init__(self, parent=parent, item=item) self.ui = Ui_Animal() self.ui.setupUi(self) self.configure() self.createConnections() self.setBasicInfo()
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)
def __init__(self, parent=None, item=None): GenericTab.__init__(self, parent=parent) self.ui = Ui_VetTab() self.ui.setupUi(self) self.configure() self.configureConnections() self.setVets()
def __init__(self, parent=None,item=None): GenericTab.__init__(self, parent=parent) self.ui = Ui_VetTab() self.ui.setupUi(self) self.configure() self.configureConnections() self.setVets()
def __init__(self, parent=None,item=None): GenericTab.__init__(self, parent=parent, item=item) self.ui = Ui_ItemCreatorTab() self.ui.setupUi(self) self.session = SqlHandler.newSession() self.itemSearchEdit = SearchLineEdit(tabcreator=ItemCreatorDialog, session=self.session, parent=self, function=SqlHandler.searchItem) self.configure() self.configureConnctions() self.modifyItemCreator()
def __init__(self, parent=None, item=None): GenericTab.__init__(self, parent=parent, item=item) self.ui = Ui_ItemCreatorTab() self.ui.setupUi(self) self.session = SqlHandler.newSession() self.itemSearchEdit = SearchLineEdit(tabcreator=ItemCreatorDialog, session=self.session, parent=self, function=SqlHandler.searchItem) self.configure() self.configureConnctions() self.modifyItemCreator()
def __init__(self, parent=None,item=None): GenericTab.__init__(self, parent=parent, item=item) self.ui = Ui_BillTab() self.ui.setupUi(self) self.print_format_path = "print_formating.html" self.payment_methods = ['Käteinen','Pankkikortti','Luottokortti','Pankkisiirto','Muu'] self.index_number_start = 0 self.creator = PrintFileCreator(path=self.print_format_path) self.configure() self.configureConnection() self.setBasicInfo() if self.item.getType() == 'Visit': self.visit = self.item self.item = None self.ui.indexNumberLabel.setText(str(self.calcIndexNumber())) else: self.visit = self.item.visit self.setDefaultClinicPrice()
def __init__(self, parent=None, item=None): GenericTab.__init__(self, parent=parent) self.ui = Ui_MainMenu() self.ui.setupUi(self) self.createConnections() self.configure()