mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-23 15:13:55 -07:00
Refactor: clean up CardDatabase pt2 (#6042)
* findPrintingWithId * remove a param * cleanup up usage of getCardInfo
This commit is contained in:
parent
95190c321c
commit
70b4843bc4
6 changed files with 39 additions and 39 deletions
|
|
@ -15,7 +15,7 @@ EdhrecCommanderResponseCommanderDetailsDisplayWidget::EdhrecCommanderResponseCom
|
|||
setLayout(layout);
|
||||
|
||||
commanderPicture = new CardInfoPictureWidget(this);
|
||||
commanderPicture->setCard(CardDatabaseManager::getInstance()->getCardInfo(commanderDetails.getName()));
|
||||
commanderPicture->setCard(CardDatabaseManager::getInstance()->getCard({commanderDetails.getName()}));
|
||||
|
||||
QWidget *currentParent = parentWidget();
|
||||
TabEdhRecMain *parentTab = nullptr;
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
#include <QVBoxLayout>
|
||||
#include <utility>
|
||||
|
||||
CardInfoFrameWidget::CardInfoFrameWidget(const QString &cardName, QWidget *parent)
|
||||
CardInfoFrameWidget::CardInfoFrameWidget(QWidget *parent)
|
||||
: QTabWidget(parent), info(nullptr), viewTransformationButton(nullptr), cardTextOnly(false)
|
||||
{
|
||||
setContentsMargins(3, 3, 3, 3);
|
||||
|
|
@ -60,9 +60,6 @@ CardInfoFrameWidget::CardInfoFrameWidget(const QString &cardName, QWidget *paren
|
|||
tab3->setLayout(tab3Layout);
|
||||
|
||||
setViewMode(SettingsCache::instance().getCardInfoViewMode());
|
||||
|
||||
// TODO: Change this to be by UUID
|
||||
setCard(CardDatabaseManager::getInstance()->getCardInfo(cardName));
|
||||
}
|
||||
|
||||
void CardInfoFrameWidget::retranslateUi()
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ public:
|
|||
ImageAndTextView
|
||||
};
|
||||
|
||||
explicit CardInfoFrameWidget(const QString &cardName = QString(), QWidget *parent = nullptr);
|
||||
explicit CardInfoFrameWidget(QWidget *parent = nullptr);
|
||||
CardInfoPtr getInfo()
|
||||
{
|
||||
return info;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue