mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-19 08:52:15 -07:00
Visual Deck Storage
This commit is contained in:
parent
0a1e0bcf84
commit
48bcd0a6ec
3 changed files with 12 additions and 6 deletions
|
|
@ -110,11 +110,13 @@ QStringList TabDeckStorageVisual::getBannerCardsForDecks()
|
||||||
//qDebug() << info->getCardType();
|
//qDebug() << info->getCardType();
|
||||||
|
|
||||||
CardInfoPerSetMap setMap = info->getSets();
|
CardInfoPerSetMap setMap = info->getSets();
|
||||||
OverlapWidget *printings_group_widget = new OverlapWidget(80, 0, 0, Qt::Orientation::Vertical, this);
|
OverlapWidget *printings_group_widget =
|
||||||
|
new OverlapWidget(this, 80, 0, 0, Qt::Orientation::Vertical);
|
||||||
for (auto set : setMap) {
|
for (auto set : setMap) {
|
||||||
//qDebug() << set.getPtr()->getLongName();
|
// qDebug() << set.getPtr()->getLongName();
|
||||||
CardInfoPtr set_info = CardDatabaseManager::getInstance()->getCardByNameAndUUID(currentCard->getName(), set.getProperty("uuid"));
|
CardInfoPtr set_info = CardDatabaseManager::getInstance()->getCardByNameAndProviderId(
|
||||||
CardInfoPictureWithTextOverlayWidget* display = new CardInfoPictureWithTextOverlayWidget(printings_group_widget, true);
|
currentCard->getName(), set.getProperty("uuid"));
|
||||||
|
CardInfoPictureWithTextOverlayWidget * display = new CardInfoPictureWithTextOverlayWidget(printings_group_widget, true);
|
||||||
display->setCard(set_info);
|
display->setCard(set_info);
|
||||||
display->setOverlayText(deck_loader->getName());
|
display->setOverlayText(deck_loader->getName());
|
||||||
display->setFontSize(24);
|
display->setFontSize(24);
|
||||||
|
|
|
||||||
|
|
@ -871,6 +871,9 @@ MainWindow::MainWindow(QWidget *parent)
|
||||||
|
|
||||||
connect(&SettingsCache::instance().shortcuts(), SIGNAL(shortCutChanged()), this, SLOT(refreshShortcuts()));
|
connect(&SettingsCache::instance().shortcuts(), SIGNAL(shortCutChanged()), this, SLOT(refreshShortcuts()));
|
||||||
refreshShortcuts();
|
refreshShortcuts();
|
||||||
|
|
||||||
|
connect(CardDatabaseManager::getInstance(), SIGNAL(cardDatabaseLoadingFinished()), tabSupervisor,
|
||||||
|
SLOT(addVisualDeckStorageTab()));
|
||||||
connect(CardDatabaseManager::getInstance(), SIGNAL(cardDatabaseLoadingFailed()), this,
|
connect(CardDatabaseManager::getInstance(), SIGNAL(cardDatabaseLoadingFailed()), this,
|
||||||
SLOT(cardDatabaseLoadingFailed()));
|
SLOT(cardDatabaseLoadingFailed()));
|
||||||
connect(CardDatabaseManager::getInstance(), SIGNAL(cardDatabaseNewSetsFound(int, QStringList)), this,
|
connect(CardDatabaseManager::getInstance(), SIGNAL(cardDatabaseNewSetsFound(int, QStringList)), this,
|
||||||
|
|
|
||||||
|
|
@ -117,14 +117,15 @@ public:
|
||||||
}
|
}
|
||||||
void clearFilterAll();
|
void clearFilterAll();
|
||||||
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||||
|
bool canFetchMore(const QModelIndex &parent) const override;
|
||||||
|
void fetchMore(const QModelIndex &parent) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool lessThan(const QModelIndex &left, const QModelIndex &right) const override;
|
bool lessThan(const QModelIndex &left, const QModelIndex &right) const override;
|
||||||
static int lessThanNumerically(const QString &left, const QString &right);
|
static int lessThanNumerically(const QString &left, const QString &right);
|
||||||
bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override;
|
bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override;
|
||||||
bool rowMatchesCardName(CardInfoPtr info) const;
|
bool rowMatchesCardName(CardInfoPtr info) const;
|
||||||
bool canFetchMore(const QModelIndex &parent) const override;
|
|
||||||
void fetchMore(const QModelIndex &parent) override;
|
|
||||||
private slots:
|
private slots:
|
||||||
void filterTreeChanged();
|
void filterTreeChanged();
|
||||||
/** Will translate all undesirable characters in DIRTYNAME according to the TABLE. */
|
/** Will translate all undesirable characters in DIRTYNAME according to the TABLE. */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue