mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-21 22:33:54 -07:00
remove all of pricing
This commit is contained in:
parent
36f6907fa3
commit
16bc8b764b
13 changed files with 10 additions and 445 deletions
|
|
@ -68,9 +68,6 @@ int DeckListModel::rowCount(const QModelIndex &parent) const
|
|||
|
||||
int DeckListModel::columnCount(const QModelIndex &/*parent*/) const
|
||||
{
|
||||
if (settingsCache->getPriceTagFeature())
|
||||
return 3;
|
||||
else
|
||||
return 2;
|
||||
}
|
||||
|
||||
|
|
@ -97,7 +94,6 @@ QVariant DeckListModel::data(const QModelIndex &index, int role) const
|
|||
switch (index.column()) {
|
||||
case 0: return node->recursiveCount(true);
|
||||
case 1: return node->getVisibleName();
|
||||
case 2: return QString().sprintf("$%.2f", node->recursivePrice(true));
|
||||
default: return QVariant();
|
||||
}
|
||||
case Qt::BackgroundRole: {
|
||||
|
|
@ -116,7 +112,6 @@ QVariant DeckListModel::data(const QModelIndex &index, int role) const
|
|||
switch (index.column()) {
|
||||
case 0: return card->getNumber();
|
||||
case 1: return card->getName();
|
||||
case 2: return QString().sprintf("$%.2f", card->getTotalPrice());
|
||||
default: return QVariant();
|
||||
}
|
||||
}
|
||||
|
|
@ -141,7 +136,6 @@ QVariant DeckListModel::headerData(int section, Qt::Orientation orientation, int
|
|||
switch (section) {
|
||||
case 0: return tr("Number");
|
||||
case 1: return tr("Card");
|
||||
case 2: return tr("Price");
|
||||
default: return QVariant();
|
||||
}
|
||||
}
|
||||
|
|
@ -195,7 +189,6 @@ bool DeckListModel::setData(const QModelIndex &index, const QVariant &value, int
|
|||
switch (index.column()) {
|
||||
case 0: node->setNumber(value.toInt()); break;
|
||||
case 1: node->setName(value.toString()); break;
|
||||
case 2: node->setPrice(value.toFloat()); break;
|
||||
default: return false;
|
||||
}
|
||||
emitRecursiveUpdates(index);
|
||||
|
|
@ -347,9 +340,6 @@ void DeckListModel::sort(int column, Qt::SortOrder order)
|
|||
case 1:
|
||||
sortMethod = ByName;
|
||||
break;
|
||||
case 2:
|
||||
sortMethod = ByPrice;
|
||||
break;
|
||||
default:
|
||||
sortMethod = ByName;
|
||||
}
|
||||
|
|
@ -374,7 +364,7 @@ void DeckListModel::setDeckList(DeckLoader *_deck)
|
|||
|
||||
void DeckListModel::printDeckListNode(QTextCursor *cursor, InnerDecklistNode *node)
|
||||
{
|
||||
const int totalColumns = settingsCache->getPriceTagFeature() ? 3 : 2;
|
||||
const int totalColumns = 2;
|
||||
|
||||
if (node->height() == 1) {
|
||||
QTextBlockFormat blockFormat;
|
||||
|
|
@ -382,10 +372,6 @@ void DeckListModel::printDeckListNode(QTextCursor *cursor, InnerDecklistNode *no
|
|||
charFormat.setFontPointSize(11);
|
||||
charFormat.setFontWeight(QFont::Bold);
|
||||
cursor->insertBlock(blockFormat, charFormat);
|
||||
QString priceStr;
|
||||
if (settingsCache->getPriceTagFeature())
|
||||
priceStr = QString().sprintf(": $%.2f", node->recursivePrice(true));
|
||||
cursor->insertText(QString("%1: %2").arg(node->getVisibleName()).arg(node->recursiveCount(true)).append(priceStr));
|
||||
|
||||
QTextTableFormat tableFormat;
|
||||
tableFormat.setCellPadding(0);
|
||||
|
|
@ -408,12 +394,6 @@ void DeckListModel::printDeckListNode(QTextCursor *cursor, InnerDecklistNode *no
|
|||
cellCursor = cell.firstCursorPosition();
|
||||
cellCursor.insertText(card->getName());
|
||||
|
||||
if (settingsCache->getPriceTagFeature()) {
|
||||
cell = table->cellAt(i, 2);
|
||||
cell.setFormat(cellCharFormat);
|
||||
cellCursor = cell.firstCursorPosition();
|
||||
cellCursor.insertText(QString().sprintf("$%.2f ", card->getTotalPrice()));
|
||||
}
|
||||
}
|
||||
} else if (node->height() == 2) {
|
||||
QTextBlockFormat blockFormat;
|
||||
|
|
@ -422,10 +402,6 @@ void DeckListModel::printDeckListNode(QTextCursor *cursor, InnerDecklistNode *no
|
|||
charFormat.setFontWeight(QFont::Bold);
|
||||
|
||||
cursor->insertBlock(blockFormat, charFormat);
|
||||
QString priceStr;
|
||||
if (settingsCache->getPriceTagFeature())
|
||||
priceStr = QString().sprintf(": $%.2f", node->recursivePrice(true));
|
||||
cursor->insertText(QString("%1: %2").arg(node->getVisibleName()).arg(node->recursiveCount(true)).append(priceStr));
|
||||
|
||||
QTextTableFormat tableFormat;
|
||||
tableFormat.setCellPadding(10);
|
||||
|
|
@ -477,9 +453,4 @@ void DeckListModel::printDeckList(QPrinter *printer)
|
|||
}
|
||||
|
||||
doc.print(printer);
|
||||
}
|
||||
|
||||
void DeckListModel::pricesUpdated()
|
||||
{
|
||||
emit layoutChanged();
|
||||
}
|
||||
}
|
||||
|
|
@ -18,8 +18,6 @@ public:
|
|||
DecklistModelCardNode(DecklistCardNode *_dataNode, InnerDecklistNode *_parent) : AbstractDecklistCardNode(_parent), dataNode(_dataNode) { }
|
||||
int getNumber() const { return dataNode->getNumber(); }
|
||||
void setNumber(int _number) { dataNode->setNumber(_number); }
|
||||
float getPrice() const { return dataNode->getPrice(); }
|
||||
void setPrice(const float _price) { dataNode->setPrice(_price); }
|
||||
QString getName() const { return dataNode->getName(); }
|
||||
void setName(const QString &_name) { dataNode->setName(_name); }
|
||||
DecklistCardNode *getDataNode() const { return dataNode; }
|
||||
|
|
@ -51,7 +49,6 @@ public:
|
|||
void cleanList();
|
||||
DeckLoader *getDeckList() const { return deckList; }
|
||||
void setDeckList(DeckLoader *_deck);
|
||||
void pricesUpdated();
|
||||
private:
|
||||
DeckLoader *deckList;
|
||||
InnerDecklistNode *root;
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@
|
|||
#include "main.h"
|
||||
#include "settingscache.h"
|
||||
#include "thememanager.h"
|
||||
#include "priceupdater.h"
|
||||
#include "releasechannel.h"
|
||||
#include "soundengine.h"
|
||||
#include "sequenceEdit/shortcutstab.h"
|
||||
|
|
@ -468,13 +467,7 @@ void UserInterfaceSettingsPage::retranslateUi()
|
|||
|
||||
DeckEditorSettingsPage::DeckEditorSettingsPage()
|
||||
{
|
||||
//priceTagsCheckBox.setChecked(settingsCache->getPriceTagFeature());
|
||||
//connect(&priceTagsCheckBox, SIGNAL(stateChanged(int)), settingsCache, SLOT(setPriceTagFeature(int)));
|
||||
|
||||
//connect(this, SIGNAL(priceTagSourceChanged(int)), settingsCache, SLOT(setPriceTagSource(int)));
|
||||
|
||||
QGridLayout *generalGrid = new QGridLayout;
|
||||
//generalGrid->addWidget(&priceTagsCheckBox, 0, 0);
|
||||
|
||||
generalGrid->addWidget(new QLabel(tr("Nothing is here... yet")), 0, 0);
|
||||
|
||||
|
|
@ -489,21 +482,9 @@ DeckEditorSettingsPage::DeckEditorSettingsPage()
|
|||
|
||||
void DeckEditorSettingsPage::retranslateUi()
|
||||
{
|
||||
//priceTagsCheckBox.setText(tr("Enable &price tag feature from deckbrew.com"));
|
||||
generalGroupBox->setTitle(tr("General"));
|
||||
}
|
||||
|
||||
/*
|
||||
void DeckEditorSettingsPage::radioPriceTagSourceClicked(bool checked)
|
||||
{
|
||||
if(!checked)
|
||||
return;
|
||||
|
||||
int source=AbstractPriceUpdater::DBPriceSource;
|
||||
emit priceTagSourceChanged(source);
|
||||
}
|
||||
*/
|
||||
|
||||
MessagesSettingsPage::MessagesSettingsPage()
|
||||
{
|
||||
chatMentionCheckBox.setChecked(settingsCache->getChatMention());
|
||||
|
|
|
|||
|
|
@ -130,11 +130,8 @@ public:
|
|||
DeckEditorSettingsPage();
|
||||
void retranslateUi();
|
||||
private slots:
|
||||
//void radioPriceTagSourceClicked(bool checked);
|
||||
signals:
|
||||
//void priceTagSourceChanged(int _priceTagSource);
|
||||
private:
|
||||
//QCheckBox priceTagsCheckBox;
|
||||
QGroupBox *generalGroupBox;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,216 +0,0 @@
|
|||
/**
|
||||
* @author Marcio Ribeiro <mmr@b1n.org>, Max-Wilhelm Bruker <brukie@gmx.net>
|
||||
* @version 1.1
|
||||
*/
|
||||
#include <QNetworkAccessManager>
|
||||
#include <QNetworkReply>
|
||||
#include <QMessageBox>
|
||||
|
||||
#include "qt-json/json.h"
|
||||
#include "priceupdater.h"
|
||||
|
||||
#include "main.h"
|
||||
#include "carddatabase.h"
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param _deck deck.
|
||||
*/
|
||||
AbstractPriceUpdater::AbstractPriceUpdater(const DeckList *_deck)
|
||||
{
|
||||
nam = new QNetworkAccessManager(this);
|
||||
deck = _deck;
|
||||
}
|
||||
|
||||
// deckbrew.com
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param _deck deck.
|
||||
*/
|
||||
|
||||
/*
|
||||
DBPriceUpdater::DBPriceUpdater(const DeckList *_deck)
|
||||
: AbstractPriceUpdater(_deck)
|
||||
{
|
||||
}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Update the prices of the cards in deckList.
|
||||
*/
|
||||
|
||||
/*
|
||||
void DBPriceUpdater::updatePrices()
|
||||
{
|
||||
QString base = "https://api.deckbrew.com/mtg/cards", q = "";
|
||||
QStringList cards = deck->getCardList();
|
||||
muidMap.clear();
|
||||
urls.clear();
|
||||
CardInfo * card;
|
||||
int muid;
|
||||
SetList sets;
|
||||
bool bNotFirst=false;
|
||||
|
||||
for (int i = 0; i < cards.size(); ++i) {
|
||||
card = db->getCard(cards[i]);
|
||||
if(!card)
|
||||
continue;
|
||||
sets = card->getSets();
|
||||
for(int j = 0; j < sets.size(); ++j)
|
||||
{
|
||||
muid=card->getMuId(sets[j]->getShortName());
|
||||
|
||||
if (!muid) {
|
||||
continue;
|
||||
}
|
||||
|
||||
//qDebug() << "muid " << muid << " card: " << cards[i] << endl;
|
||||
if(bNotFirst)
|
||||
{
|
||||
q += QString("&m=%1").arg(muid);
|
||||
} else {
|
||||
q += QString("?m=%1").arg(muid);
|
||||
bNotFirst = true;
|
||||
}
|
||||
muidMap.insert(muid, cards[i]);
|
||||
|
||||
if(q.length() > 240)
|
||||
{
|
||||
urls.append(base + q);
|
||||
bNotFirst=false;
|
||||
q = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
if(q.length() > 0)
|
||||
urls.append(base + q);
|
||||
|
||||
requestNext();
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
void DBPriceUpdater::requestNext()
|
||||
{
|
||||
if(urls.empty())
|
||||
return;
|
||||
|
||||
QUrl url(urls.takeFirst(), QUrl::TolerantMode);
|
||||
//qDebug() << "request prices from: " << url.toString() << endl;
|
||||
QNetworkReply *reply = nam->get(QNetworkRequest(url));
|
||||
connect(reply, SIGNAL(finished()), this, SLOT(downloadFinished()));
|
||||
}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Called when the download of the json file with the prices is finished.
|
||||
*/
|
||||
/*
|
||||
void DBPriceUpdater::downloadFinished()
|
||||
{
|
||||
QNetworkReply *reply = static_cast<QNetworkReply *>(sender());
|
||||
bool ok;
|
||||
QString tmp = QString(reply->readAll());
|
||||
|
||||
// Errors are incapsulated in an object, check for them first
|
||||
QVariantMap resultMap = QtJson::Json::parse(tmp, ok).toMap();
|
||||
if (!ok) {
|
||||
QMessageBox::critical(this, tr("Error"), tr("A problem has occured while fetching card prices."));
|
||||
reply->deleteLater();
|
||||
if(urls.isEmpty())
|
||||
{
|
||||
deleteLater();
|
||||
emit finishedUpdate();
|
||||
} else {
|
||||
requestNext();
|
||||
}
|
||||
}
|
||||
|
||||
if(resultMap.contains("errors"))
|
||||
{
|
||||
QMessageBox::critical(this, tr("Error"), tr("A problem has occured while fetching card prices:") +
|
||||
"<br/>" + resultMap["errors"].toList().first().toString().toHtmlEscaped()
|
||||
);
|
||||
reply->deleteLater();
|
||||
if(urls.isEmpty())
|
||||
{
|
||||
deleteLater();
|
||||
emit finishedUpdate();
|
||||
} else {
|
||||
requestNext();
|
||||
}
|
||||
}
|
||||
|
||||
// Good results are a list
|
||||
QVariantList resultList = QtJson::Json::parse(tmp, ok).toList();
|
||||
if (!ok) {
|
||||
QMessageBox::critical(this, tr("Error"), tr("A problem has occured while fetching card prices."));
|
||||
reply->deleteLater();
|
||||
if(urls.isEmpty())
|
||||
{
|
||||
deleteLater();
|
||||
emit finishedUpdate();
|
||||
} else {
|
||||
requestNext();
|
||||
}
|
||||
}
|
||||
|
||||
QMap<QString, float> cardsPrice;
|
||||
QListIterator<QVariant> it(resultList);
|
||||
while (it.hasNext()) {
|
||||
QVariantMap cardMap = it.next().toMap();
|
||||
|
||||
|
||||
// get sets list
|
||||
QList<QVariant> editions = cardMap.value("editions").toList();
|
||||
foreach (QVariant ed, editions)
|
||||
{
|
||||
// retrieve card name "as we know it" from the muid
|
||||
QVariantMap edition = ed.toMap();
|
||||
QString set = edition.value("set_id").toString();
|
||||
|
||||
int muid = edition.value("multiverse_id").toString().toInt();
|
||||
if(!muidMap.contains(muid))
|
||||
continue;
|
||||
|
||||
QString name=muidMap.value(muid);
|
||||
// Prices are in USD cents
|
||||
float price = edition.value("price").toMap().value("median").toString().toFloat() / 100;
|
||||
//qDebug() << "card " << name << " set " << set << " price " << price << endl;
|
||||
|
||||
|
||||
* Make sure Masters Edition (MED) isn't the set, as it doesn't
|
||||
* physically exist. Also check the price to see that the cheapest set
|
||||
* ends up as the final price.
|
||||
|
||||
if (set != "MED" && price > 0 && (!cardsPrice.contains(name) || cardsPrice.value(name) > price))
|
||||
cardsPrice.insert(name, price);
|
||||
}
|
||||
}
|
||||
|
||||
InnerDecklistNode *listRoot = deck->getRoot();
|
||||
for (int i = 0; i < listRoot->size(); i++) {
|
||||
InnerDecklistNode *currentZone = dynamic_cast<InnerDecklistNode *>(listRoot->at(i));
|
||||
for (int j = 0; j < currentZone->size(); j++) {
|
||||
DecklistCardNode *currentCard = dynamic_cast<DecklistCardNode *>(currentZone->at(j));
|
||||
if (!currentCard)
|
||||
continue;
|
||||
float price = cardsPrice[currentCard->getName()];
|
||||
if(price > 0)
|
||||
currentCard->setPrice(price);
|
||||
}
|
||||
}
|
||||
|
||||
reply->deleteLater();
|
||||
if(urls.isEmpty())
|
||||
{
|
||||
deleteLater();
|
||||
emit finishedUpdate();
|
||||
} else {
|
||||
requestNext();
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
|
@ -1,49 +0,0 @@
|
|||
#ifndef PRICEUPDATER_H
|
||||
#define PRICEUPDATER_H
|
||||
|
||||
#include <QNetworkAccessManager>
|
||||
#include "decklist.h"
|
||||
|
||||
class QNetworkAccessManager;
|
||||
|
||||
// If we don't typedef this, won't compile on OS X < 10.9
|
||||
typedef QMap<int, QString> MuidStringMap;
|
||||
|
||||
/**
|
||||
* Price Updater.
|
||||
*
|
||||
* @author Marcio Ribeiro <mmr@b1n.org>
|
||||
*/
|
||||
class AbstractPriceUpdater : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
enum PriceSource { DBPriceSource };
|
||||
protected:
|
||||
const DeckList *deck;
|
||||
QNetworkAccessManager *nam;
|
||||
signals:
|
||||
void finishedUpdate();
|
||||
protected slots:
|
||||
virtual void downloadFinished() = 0;
|
||||
public:
|
||||
AbstractPriceUpdater(const DeckList *deck);
|
||||
virtual void updatePrices() = 0;
|
||||
};
|
||||
|
||||
/*
|
||||
class DBPriceUpdater : public AbstractPriceUpdater
|
||||
{
|
||||
Q_OBJECT
|
||||
protected:
|
||||
MuidStringMap muidMap;
|
||||
QList<QString> urls;
|
||||
protected:
|
||||
virtual void downloadFinished();
|
||||
void requestNext();
|
||||
public:
|
||||
DBPriceUpdater(const DeckList *deck);
|
||||
virtual void updatePrices();
|
||||
};
|
||||
*/
|
||||
#endif
|
||||
|
|
@ -236,9 +236,6 @@ SettingsCache::SettingsCache()
|
|||
|
||||
maxFontSize = settings->value("game/maxfontsize", DEFAULT_FONT_SIZE).toInt();
|
||||
|
||||
priceTagFeature = settings->value("deckeditor/pricetags", false).toBool();
|
||||
priceTagSource = settings->value("deckeditor/pricetagsource", 0).toInt();
|
||||
|
||||
ignoreUnregisteredUsers = settings->value("chat/ignore_unregistered", false).toBool();
|
||||
ignoreUnregisteredUserMessages = settings->value("chat/ignore_unregistered_messages", false).toBool();
|
||||
|
||||
|
|
@ -514,19 +511,6 @@ void SettingsCache::setSoundThemeName(const QString &_soundThemeName)
|
|||
emit soundThemeChanged();
|
||||
}
|
||||
|
||||
void SettingsCache::setPriceTagFeature(int _priceTagFeature)
|
||||
{
|
||||
priceTagFeature = _priceTagFeature;
|
||||
settings->setValue("deckeditor/pricetags", priceTagFeature);
|
||||
emit priceTagFeatureChanged(priceTagFeature);
|
||||
}
|
||||
|
||||
void SettingsCache::setPriceTagSource(int _priceTagSource)
|
||||
{
|
||||
priceTagSource = _priceTagSource;
|
||||
settings->setValue("deckeditor/pricetagsource", priceTagSource);
|
||||
}
|
||||
|
||||
void SettingsCache::setIgnoreUnregisteredUsers(int _ignoreUnregisteredUsers)
|
||||
{
|
||||
ignoreUnregisteredUsers = _ignoreUnregisteredUsers;
|
||||
|
|
|
|||
|
|
@ -43,7 +43,6 @@ signals:
|
|||
void minPlayersForMultiColumnLayoutChanged();
|
||||
void soundEnabledChanged();
|
||||
void soundThemeChanged();
|
||||
void priceTagFeatureChanged(int enabled);
|
||||
void ignoreUnregisteredUsersChanged();
|
||||
void ignoreUnregisteredUserMessagesChanged();
|
||||
void pixmapCacheSizeChanged(int newSizeInMBs);
|
||||
|
|
@ -86,8 +85,6 @@ private:
|
|||
bool zoneViewSortByName, zoneViewSortByType, zoneViewPileView;
|
||||
bool soundEnabled;
|
||||
QString soundThemeName;
|
||||
bool priceTagFeature;
|
||||
int priceTagSource;
|
||||
bool ignoreUnregisteredUsers;
|
||||
bool ignoreUnregisteredUserMessages;
|
||||
QString picUrl;
|
||||
|
|
@ -165,8 +162,6 @@ public:
|
|||
bool getZoneViewPileView() const { return zoneViewPileView; }
|
||||
bool getSoundEnabled() const { return soundEnabled; }
|
||||
QString getSoundThemeName() const { return soundThemeName; }
|
||||
bool getPriceTagFeature() const { return false; /* #859; priceTagFeature;*/ }
|
||||
int getPriceTagSource() const { return priceTagSource; }
|
||||
bool getIgnoreUnregisteredUsers() const { return ignoreUnregisteredUsers; }
|
||||
bool getIgnoreUnregisteredUserMessages() const { return ignoreUnregisteredUserMessages; }
|
||||
QString getPicUrl() const { return picUrl; }
|
||||
|
|
@ -236,8 +231,6 @@ public slots:
|
|||
void setZoneViewPileView(int _zoneViewPileView);
|
||||
void setSoundEnabled(int _soundEnabled);
|
||||
void setSoundThemeName(const QString &_soundThemeName);
|
||||
void setPriceTagFeature(int _priceTagFeature);
|
||||
void setPriceTagSource(int _priceTagSource);
|
||||
void setIgnoreUnregisteredUsers(int _ignoreUnregisteredUsers);
|
||||
void setIgnoreUnregisteredUserMessages(int _ignoreUnregisteredUserMessages);
|
||||
void setPicUrl(const QString &_picUrl);
|
||||
|
|
|
|||
|
|
@ -31,7 +31,6 @@
|
|||
#include "dlg_load_deck_from_clipboard.h"
|
||||
#include "main.h"
|
||||
#include "settingscache.h"
|
||||
#include "priceupdater.h"
|
||||
#include "tab_supervisor.h"
|
||||
#include "deckstats_interface.h"
|
||||
#include "tappedout_interface.h"
|
||||
|
|
@ -536,9 +535,6 @@ void TabDeckEditor::retranslateUi()
|
|||
nameLabel->setText(tr("Deck &name:"));
|
||||
commentsLabel->setText(tr("&Comments:"));
|
||||
hashLabel1->setText(tr("Hash:"));
|
||||
|
||||
//aUpdatePrices->setText(tr("&Update prices"));
|
||||
//aUpdatePrices->setShortcut(QKeySequence("Ctrl+U"));
|
||||
|
||||
aNewDeck->setText(tr("&New deck"));
|
||||
aLoadDeck->setText(tr("&Load deck..."));
|
||||
|
|
@ -926,38 +922,6 @@ void TabDeckEditor::actDecrement()
|
|||
offsetCountAtIndex(currentIndex, -1);
|
||||
}
|
||||
|
||||
void TabDeckEditor::setPriceTagFeatureEnabled(int /* enabled */)
|
||||
{
|
||||
//aUpdatePrices->setVisible(enabled);
|
||||
deckModel->pricesUpdated();
|
||||
}
|
||||
|
||||
/*
|
||||
void TabDeckEditor::actUpdatePrices()
|
||||
{
|
||||
aUpdatePrices->setDisabled(true);
|
||||
AbstractPriceUpdater *up;
|
||||
|
||||
switch(settingsCache->getPriceTagSource())
|
||||
{
|
||||
case AbstractPriceUpdater::DBPriceSource:
|
||||
default:
|
||||
up = new DBPriceUpdater(deckModel->getDeckList());
|
||||
break;
|
||||
}
|
||||
|
||||
connect(up, SIGNAL(finishedUpdate()), this, SLOT(finishedUpdatingPrices()));
|
||||
up->updatePrices();
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
void TabDeckEditor::finishedUpdatingPrices()
|
||||
{
|
||||
//deckModel->pricesUpdated();
|
||||
//setModified(true);
|
||||
//aUpdatePrices->setDisabled(false);
|
||||
}
|
||||
|
||||
void TabDeckEditor::setDeck(DeckLoader *_deck)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -67,13 +67,9 @@ class TabDeckEditor : public Tab {
|
|||
void actDecrementCard();
|
||||
void actDecrementCardFromSideboard();
|
||||
|
||||
//void actUpdatePrices();
|
||||
|
||||
void finishedUpdatingPrices();
|
||||
void saveDeckRemoteFinished(const Response &r);
|
||||
void filterViewCustomContextMenu(const QPoint &point);
|
||||
void filterRemove(QAction *action);
|
||||
void setPriceTagFeatureEnabled(int enabled);
|
||||
|
||||
void loadLayout();
|
||||
void restartLayout();
|
||||
|
|
@ -116,7 +112,7 @@ private:
|
|||
QMenu *deckMenu, *viewMenu, *cardInfoDockMenu, *deckDockMenu, *filterDockMenu, *analyzeDeckMenu;
|
||||
QAction *aNewDeck, *aLoadDeck, *aSaveDeck, *aSaveDeckAs, *aLoadDeckFromClipboard, *aSaveDeckToClipboard, *aPrintDeck, *aAnalyzeDeckDeckstats, *aAnalyzeDeckTappedout, *aClose;
|
||||
QAction *aClearFilterAll, *aClearFilterOne;
|
||||
QAction *aAddCard, *aAddCardToSideboard, *aRemoveCard, *aIncrement, *aDecrement;// *aUpdatePrices;
|
||||
QAction *aAddCard, *aAddCardToSideboard, *aRemoveCard, *aIncrement, *aDecrement;
|
||||
QAction *aResetLayout;
|
||||
QAction *aCardInfoDockVisible, *aCardInfoDockFloating, *aDeckDockVisible, *aDeckDockFloating, *aFilterDockVisible, *aFilterDockFloating;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue