Ejemplo n.º 1
0
    def __fillPriceModel(self, priceModel, price, checkResult):
        prices = priceModel.getPrice()
        prices.clear()
        for currency, amount in price.iteritems():
            itemPriceModel = PriceItemModel()
            itemPriceModel.setName(currency)
            itemPriceModel.setValue(amount)
            itemPriceModel.setIsEnough(checkResult.result)
            prices.addViewModel(itemPriceModel)

        prices.invalidate()
Ejemplo n.º 2
0
 def _initialize(self):
     super(ExchangePanelModel, self)._initialize()
     self._addViewModelProperty('fromItem', PriceItemModel())
     self._addViewModelProperty('toItem', PriceItemModel())
     self._addViewModelProperty('exchangeRate', ExchangeRateModel())
Ejemplo n.º 3
0
 def _initialize(self):
     super(DialogWithExchange, self)._initialize()
     self._addViewModelProperty('exchangePanel', ExchangePanelModel())
     self._addViewModelProperty('lacksMoney', PriceItemModel())
     self._addStringProperty('bottomContentType', '')
     self._addStringProperty('exchangeState', 'default')
Ejemplo n.º 4
0
 def _createPriceItemModel(cls, name, value):
     priceItemModel = PriceItemModel()
     priceItemModel.setName(name)
     priceItemModel.setValue(value)
     return priceItemModel