class Period_Class(QtGui.QWidget): def __init__(self, parent=None): QtGui.QWidget.__init__(self, parent) self.ui = Ui_ProductPeriod() self.ui.setupUi(self) def getData(self,pid): data = (pid, self.ui.startDate.date().toString('dd-MM'), self.ui.finishDate.date().toString('dd-MM'), self.ui.percent.text()) return data def saveData(self,db,pid): db.insert_val('coefficient',self.getData(pid))
def __init__(self, parent=None): QtGui.QWidget.__init__(self, parent) self.ui = Ui_ProductPeriod() self.ui.setupUi(self)