Example #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()
Example #2
0
 def _initialize(self):
     super(ExchangePanelModel, self)._initialize()
     self._addViewModelProperty('fromItem', PriceItemModel())
     self._addViewModelProperty('toItem', PriceItemModel())
     self._addViewModelProperty('exchangeRate', ExchangeRateModel())
Example #3
0
 def _initialize(self):
     super(DialogWithExchange, self)._initialize()
     self._addViewModelProperty('exchangePanel', ExchangePanelModel())
     self._addViewModelProperty('lacksMoney', PriceItemModel())
     self._addStringProperty('bottomContentType', '')
     self._addStringProperty('exchangeState', 'default')
Example #4
0
 def _createPriceItemModel(cls, name, value):
     priceItemModel = PriceItemModel()
     priceItemModel.setName(name)
     priceItemModel.setValue(value)
     return priceItemModel