def on_actionQuoteEdit_triggered(self): for quote in self.mqtwIntradia.selected: ##Only is one, but i don't know how to refer to quote w = frmQuotesIBM(self.mem, self.product, quote) w.exec_() if w.result() == QDialog.Accepted: self.product.needStatus(2, downgrade_to=0) self.update_due_to_quotes_change()
def on_actionQuoteNew_triggered(self): w = frmQuotesIBM(self.mem, self.product) w.wdgDT.teDate.setSelectedDate(self.calendar.selectedDate()) w.exec_() if w.result() == QDialog.Accepted: self.product.needStatus(2, downgrade_to=0) self.update_due_to_quotes_change()
def on_actionChangeBenchmarkPrice_triggered(self): w = frmQuotesIBM(self.mem, self.mem.data.benchmark, self.investment.op_actual.selected.referenciaindice, self) w.txtQuote.setFocus() w.exec_() self.update_tables()
def on_actionOperationAdd_triggered(self): if self.investment.product.result.basic.last.quote == None: qmessagebox( self. tr("Before adding a operation, you must add the current price of the product." ), ":/xulpymoney/coins.png") w = frmQuotesIBM(self.mem, self.investment.product) w.exec_() if w.result() == QDialog.Accepted: self.investment.product.result.basic.load_from_db() else: return w = frmInvestmentOperationsAdd(self.mem, self.investment, None, self) self.frmInvestmentOperationsAdd_initiated.emit(w) w.exec_() #if num shares after add is 0, changes expiration date to today-1 if self.investment.shares() == 0: self.calExpiration.setSelectedDate(date.today() - timedelta(days=1)) self.on_cmdInvestment_released() self.update_tables()
def on_cmdIRInsertar_pressed(self): w = frmQuotesIBM(self.mem, self.benchmark, None, self) w.exec_() self.benchmark.needStatus(2, downgrade_to=0) self.cmbBenchmarkCurrent_load() self.load_data()
def on_actionProductPrice_triggered(self): w = frmQuotesIBM(self.mem, self.mqtwInvestments.selected.product, None, self) w.exec_() self.mqtwInvestments.selected.product.needStatus(1, downgrade_to=0) self.on_chkInactivas_stateChanged(self.chkInactivas.checkState())
def on_actionQuoteNew_triggered(self): if len(self.mqtwInvestments.selected) > 0: w = frmQuotesIBM(self.mem, self.mqtwInvestments.selected[0]) w.exec_() self.build_array_from_arrInt()
def on_cmdIRInsertar_pressed(self): from xulpymoney.ui.frmQuotesIBM import frmQuotesIBM w=frmQuotesIBM(self.mem, self.product, None, self) w.exec_() self.product.needStatus(2, downgrade_to=0) self.load_data()