def press_save(self): core.get_file() engine = core.Calculations(core.not_df) engine.income_data(self.inSource.text(), int(self.inAmount.text()), self.inDate.text()) engine.export() self.inSource.setText("") self.inAmount.setValue(0) self.inDate.setDate(QtCore.QDate(self.year, self.month , self.day)) self.show_balance()
def show_balance(self): core.get_file() engine = core.Calculations(core.not_df) self.balanceCheck.setText(str(engine.df['Total'].values[-1]))
def press_export(self): core.get_file() engine = core.Calculations(core.not_df) engine.export_to_pdf()
engine.expense_data(self.outSource.text(), int(self.outAmount.text()), self.outDate.text()) engine.export() self.outSource.setText("") self.outAmount.setValue(0) self.outDate.setDate(QtCore.QDate(self.year, self.month , self.day)) self.show_balance() def press_export(self): core.get_file() engine = core.Calculations(core.not_df) engine.export_to_pdf() def show_balance(self): core.get_file() engine = core.Calculations(core.not_df) self.balanceCheck.setText(str(engine.df['Total'].values[-1])) if __name__ == "__main__": import sys app = QtWidgets.QApplication(sys.argv) MainWindow = QtWidgets.QMainWindow() ui = Ui_MainWindow() core.get_file() engine = core.Calculations(core.not_df) ui.setupUi(MainWindow, app) MainWindow.show() sys.exit(app.exec_())