diff --git a/cockatrice/src/dlg_cardsearch.cpp b/cockatrice/src/dlg_cardsearch.cpp index 55d9419cf..b7921b313 100644 --- a/cockatrice/src/dlg_cardsearch.cpp +++ b/cockatrice/src/dlg_cardsearch.cpp @@ -1,6 +1,7 @@ #include #include #include +#include #include #include #include @@ -17,6 +18,16 @@ DlgCardSearch::DlgCardSearch(QWidget *parent) QLabel *cardTextLabel = new QLabel(tr("Card text:")); cardTextEdit = new QLineEdit; + + //Adding Set Selector + QLabel *cardSetsLabel = new QLabel(tr("Card Set (AND):")); + cboSetList = new QComboBox(); + cboSetList->addItem(""); + SetList setList = db->getSetList(); + for (int intLoop = 0; intLoop < setList.size(); ++intLoop) { + //Adding Translated Set Name, Just In Case + cboSetList->addItem(tr("%1").arg(setList.at(intLoop)->getLongName()), setList.at(intLoop)->getShortName()); + } QLabel *cardTypesLabel = new QLabel(tr("Card type (OR):")); const QStringList &cardTypes = db->getAllMainCardTypes(); @@ -54,10 +65,12 @@ DlgCardSearch::DlgCardSearch(QWidget *parent) optionsLayout->addWidget(cardNameEdit, 0, 1); optionsLayout->addWidget(cardTextLabel, 1, 0); optionsLayout->addWidget(cardTextEdit, 1, 1); - optionsLayout->addWidget(cardTypesLabel, 2, 0); - optionsLayout->addLayout(cardTypesLayout, 2, 1); - optionsLayout->addWidget(cardColorsLabel, 3, 0); - optionsLayout->addLayout(cardColorsLayout, 3, 1); + optionsLayout->addWidget(cardSetsLabel, 2, 0); + optionsLayout->addWidget(cboSetList, 2, 1); + optionsLayout->addWidget(cardTypesLabel, 3, 0); + optionsLayout->addLayout(cardTypesLayout, 3, 1); + optionsLayout->addWidget(cardColorsLabel, 4, 0); + optionsLayout->addLayout(cardColorsLayout, 4, 1); QVBoxLayout *mainLayout = new QVBoxLayout; mainLayout->addLayout(optionsLayout); diff --git a/cockatrice/src/dlg_cardsearch.h b/cockatrice/src/dlg_cardsearch.h index 4c2ccccfc..bc1ad757f 100644 --- a/cockatrice/src/dlg_cardsearch.h +++ b/cockatrice/src/dlg_cardsearch.h @@ -7,16 +7,19 @@ class QLineEdit; class QCheckBox; +class QComboBox; class DlgCardSearch : public QDialog { Q_OBJECT private: QLineEdit *cardNameEdit, *cardTextEdit; QList cardTypeCheckBoxes, cardColorCheckBoxes; + QComboBox *cboSetList; public: DlgCardSearch(QWidget *parent = 0); QString getCardName() const; QString getCardText() const; + QString getCardSet() const; QSet getCardTypes() const; QSet getCardColors() const; };