mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-18 16:32:16 -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();
|
||||
|
||||
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) {
|
||||
//qDebug() << set.getPtr()->getLongName();
|
||||
CardInfoPtr set_info = CardDatabaseManager::getInstance()->getCardByNameAndUUID(currentCard->getName(), set.getProperty("uuid"));
|
||||
CardInfoPictureWithTextOverlayWidget* display = new CardInfoPictureWithTextOverlayWidget(printings_group_widget, true);
|
||||
// qDebug() << set.getPtr()->getLongName();
|
||||
CardInfoPtr set_info = CardDatabaseManager::getInstance()->getCardByNameAndProviderId(
|
||||
currentCard->getName(), set.getProperty("uuid"));
|
||||
CardInfoPictureWithTextOverlayWidget * display = new CardInfoPictureWithTextOverlayWidget(printings_group_widget, true);
|
||||
display->setCard(set_info);
|
||||
display->setOverlayText(deck_loader->getName());
|
||||
display->setFontSize(24);
|
||||
|
|
|
|||
|
|
@ -871,6 +871,9 @@ MainWindow::MainWindow(QWidget *parent)
|
|||
|
||||
connect(&SettingsCache::instance().shortcuts(), SIGNAL(shortCutChanged()), this, SLOT(refreshShortcuts()));
|
||||
refreshShortcuts();
|
||||
|
||||
connect(CardDatabaseManager::getInstance(), SIGNAL(cardDatabaseLoadingFinished()), tabSupervisor,
|
||||
SLOT(addVisualDeckStorageTab()));
|
||||
connect(CardDatabaseManager::getInstance(), SIGNAL(cardDatabaseLoadingFailed()), this,
|
||||
SLOT(cardDatabaseLoadingFailed()));
|
||||
connect(CardDatabaseManager::getInstance(), SIGNAL(cardDatabaseNewSetsFound(int, QStringList)), this,
|
||||
|
|
|
|||
|
|
@ -117,14 +117,15 @@ public:
|
|||
}
|
||||
void clearFilterAll();
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
bool canFetchMore(const QModelIndex &parent) const override;
|
||||
void fetchMore(const QModelIndex &parent) override;
|
||||
|
||||
protected:
|
||||
bool lessThan(const QModelIndex &left, const QModelIndex &right) const override;
|
||||
static int lessThanNumerically(const QString &left, const QString &right);
|
||||
bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override;
|
||||
bool rowMatchesCardName(CardInfoPtr info) const;
|
||||
bool canFetchMore(const QModelIndex &parent) const override;
|
||||
void fetchMore(const QModelIndex &parent) override;
|
||||
|
||||
private slots:
|
||||
void filterTreeChanged();
|
||||
/** Will translate all undesirable characters in DIRTYNAME according to the TABLE. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue