Add pricing from deckbrew.com

* the previous PriceUpdater class has become abstract
* BLPPriceUpdater inherits the old code for blacklotusproject.com
* DBPriceUpdater is a new implementation for deckbrew.com
* add a setting to choose between the two
This commit is contained in:
Fabio Bas 2014-06-29 23:30:32 +02:00
parent ec3690fd29
commit 922e98af67
7 changed files with 222 additions and 12 deletions

View file

@ -644,7 +644,18 @@ void TabDeckEditor::setPriceTagFeatureEnabled(int enabled)
void TabDeckEditor::actUpdatePrices()
{
aUpdatePrices->setDisabled(true);
PriceUpdater *up = new PriceUpdater(deckModel->getDeckList());
AbstractPriceUpdater *up;
switch(settingsCache->getPriceTagSource())
{
case 0:
up = new BLPPriceUpdater(deckModel->getDeckList());
break;
case 1:
up = new DBPriceUpdater(deckModel->getDeckList());
break;
}
connect(up, SIGNAL(finishedUpdate()), this, SLOT(finishedUpdatingPrices()));
up->updatePrices();
}