mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-14 14:32:15 -07:00
Re-layout, add instruction label.
This commit is contained in:
parent
5a8dc3ec66
commit
87263b0bc4
4 changed files with 18 additions and 3 deletions
|
|
@ -114,6 +114,7 @@ PrintingSelector::PrintingSelector(QWidget *parent, AbstractTabDeckEditor *_deck
|
|||
void PrintingSelector::retranslateUi()
|
||||
{
|
||||
navigationCheckBox->setText(tr("Display Navigation Buttons"));
|
||||
selectSetForCardsButton->setText(tr("Bulk Selection"));
|
||||
|
||||
if (warningLabel) {
|
||||
warningLabel->setText(
|
||||
|
|
|
|||
|
|
@ -50,7 +50,6 @@ private:
|
|||
QCheckBox *navigationCheckBox;
|
||||
QLabel *warningLabel;
|
||||
PrintingSelectorCardSortingWidget *sortToolBar;
|
||||
QHBoxLayout *searchAndSetLayout;
|
||||
PrintingSelectorCardSearchWidget *searchBar;
|
||||
QPushButton *selectSetForCardsButton;
|
||||
FlowWidget *flowWidget;
|
||||
|
|
|
|||
|
|
@ -25,12 +25,14 @@ DlgSelectSetForCards::DlgSelectSetForCards(QWidget *parent, DeckListModel *_mode
|
|||
setMinimumSize(500, 500);
|
||||
setAcceptDrops(true);
|
||||
|
||||
instructionLabel = new QLabel(this);
|
||||
instructionLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum);
|
||||
|
||||
QVBoxLayout *mainLayout = new QVBoxLayout(this);
|
||||
setLayout(mainLayout);
|
||||
|
||||
// Main vertical splitter
|
||||
QSplitter *splitter = new QSplitter(Qt::Vertical, this);
|
||||
mainLayout->addWidget(splitter);
|
||||
|
||||
// Top scroll area
|
||||
scrollArea = new QScrollArea(this);
|
||||
|
|
@ -100,7 +102,6 @@ DlgSelectSetForCards::DlgSelectSetForCards(QWidget *parent, DeckListModel *_mode
|
|||
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
|
||||
connect(buttonBox, SIGNAL(accepted()), this, SLOT(actOK()));
|
||||
connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
|
||||
splitter->addWidget(buttonBox);
|
||||
|
||||
// Set stretch factors
|
||||
splitter->setStretchFactor(0, 6); // Scroll area gets more space
|
||||
|
|
@ -112,6 +113,18 @@ DlgSelectSetForCards::DlgSelectSetForCards(QWidget *parent, DeckListModel *_mode
|
|||
|
||||
connect(this, &DlgSelectSetForCards::orderChanged, this, &DlgSelectSetForCards::updateLayoutOrder);
|
||||
connect(this, &DlgSelectSetForCards::widgetOrderChanged, this, &DlgSelectSetForCards::updateCardLists);
|
||||
|
||||
mainLayout->addWidget(instructionLabel);
|
||||
mainLayout->addWidget(splitter);
|
||||
mainLayout->addWidget(buttonBox);
|
||||
|
||||
retranslateUi();
|
||||
}
|
||||
|
||||
void DlgSelectSetForCards::retranslateUi()
|
||||
{
|
||||
instructionLabel->setText(tr("Check Sets to enable them. Drag-and-Drop to reorder them and change their "
|
||||
"priority. Cards will use the printing of the highest priority enabled set."));
|
||||
}
|
||||
|
||||
void DlgSelectSetForCards::actOK()
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ class DlgSelectSetForCards : public QDialog
|
|||
|
||||
public:
|
||||
explicit DlgSelectSetForCards(QWidget *parent, DeckListModel *_model);
|
||||
void retranslateUi();
|
||||
void sortSetsByCount();
|
||||
QMap<QString, QStringList> getCardsForSets();
|
||||
QMap<QString, QStringList> getModifiedCards();
|
||||
|
|
@ -40,6 +41,7 @@ public slots:
|
|||
|
||||
private:
|
||||
QVBoxLayout *layout;
|
||||
QLabel *instructionLabel;
|
||||
QScrollArea *scrollArea;
|
||||
QScrollArea *uneditedCardsArea;
|
||||
FlowWidget *uneditedCardsFlowWidget;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue