mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
refactor cardframe as a parent of a text card frame and a picture card frame
cardframe is now a stacked widget that prefers to show the card picture only so that the screen can be more space efficient and the card pixel map can be displayed as a larger size. however if the card pixel map can not be loaded for some reason, the cardframe class will automatically switch to the text version of the card. a menu item was added under the database menu to allow for users to prefer card text only.
This commit is contained in:
parent
5d223b5917
commit
f77054f20d
9 changed files with 231 additions and 34 deletions
|
|
@ -87,7 +87,11 @@ TabDeckEditor::TabDeckEditor(TabSupervisor *_tabSupervisor, QWidget *parent)
|
|||
leftFrame->addLayout(searchLayout);
|
||||
leftFrame->addWidget(databaseView);
|
||||
|
||||
cardInfo = new CardFrame();
|
||||
cardInfo = new CardFrame(250, 356);
|
||||
aCardTextOnly = new QAction(QString(), this);
|
||||
aCardTextOnly->setCheckable(true);
|
||||
connect(aCardTextOnly, SIGNAL(triggered()), cardInfo, SLOT(toggleCardTextOnly()));
|
||||
|
||||
filterModel = new FilterTreeModel();
|
||||
databaseDisplayModel->setFilterTree(filterModel->filterTree());
|
||||
filterView = new QTreeView;
|
||||
|
|
@ -221,6 +225,7 @@ TabDeckEditor::TabDeckEditor(TabSupervisor *_tabSupervisor, QWidget *parent)
|
|||
dbMenu->addAction(aEditTokens);
|
||||
dbMenu->addSeparator();
|
||||
dbMenu->addAction(aClearSearch);
|
||||
dbMenu->addAction(aCardTextOnly);
|
||||
addTabMenu(dbMenu);
|
||||
|
||||
aAddCard = new QAction(QString(), this);
|
||||
|
|
@ -258,6 +263,7 @@ TabDeckEditor::~TabDeckEditor()
|
|||
|
||||
void TabDeckEditor::retranslateUi()
|
||||
{
|
||||
aCardTextOnly->setText(tr("&Show card text only"));
|
||||
aClearSearch->setText(tr("&Clear search"));
|
||||
searchLabel->setText(tr("&Search for:"));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue