mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-10 00:04:48 -07:00
* fix: Use isRebalanced to detect Arena cards In #5759 we introduced a setting (off by default) to disable the use of Arena cards. This was done by checking the `isOnlineOnly` property of the card, which accidentally also disabled online *printings* of cards that otherwise exist in paper (e.g. Vintage Masters). This PR does the same thing but uses the `isRebalanced` property instead, which is `true` for Arena cards only and should have been used from the start. This setting does not impact online-only printings such as Vintage Masters. The settings is still on by default. * Update setting to mention Alchemy rather than Arena
80 lines
2 KiB
C++
80 lines
2 KiB
C++
#ifndef DLG_MANAGE_SETS_H
|
|
#define DLG_MANAGE_SETS_H
|
|
|
|
#include <QDialogButtonBox>
|
|
#include <QGridLayout>
|
|
#include <QLabel>
|
|
#include <QMainWindow>
|
|
#include <QSet>
|
|
|
|
class CardDatabase;
|
|
class LineEditUnfocusable;
|
|
class QGroupBox;
|
|
class QItemSelection;
|
|
class QPushButton;
|
|
class QTreeView;
|
|
class SetsDisplayModel;
|
|
class SetsModel;
|
|
class SetsProxyModel;
|
|
|
|
class WndSets : public QMainWindow
|
|
{
|
|
Q_OBJECT
|
|
private:
|
|
SetsModel *model;
|
|
SetsDisplayModel *displayModel;
|
|
QGroupBox *hintsGroupBox;
|
|
QTreeView *view;
|
|
QPushButton *toggleAllButton, *toggleSelectedButton;
|
|
QPushButton *enableAllButton, *disableAllButton, *enableSomeButton, *disableSomeButton;
|
|
QPushButton *defaultSortButton;
|
|
QAction *aUp, *aDown, *aBottom, *aTop;
|
|
QToolBar *setsEditToolBar;
|
|
QDialogButtonBox *buttonBox;
|
|
QLabel *labNotes, *searchLabel;
|
|
QGroupBox *sortWarning;
|
|
QLabel *sortWarningText;
|
|
QPushButton *sortWarningButton;
|
|
LineEditUnfocusable *searchField;
|
|
QGridLayout *mainLayout;
|
|
QHBoxLayout *filterBox;
|
|
int sortIndex;
|
|
Qt::SortOrder sortOrder;
|
|
void closeEvent(QCloseEvent *ev) override;
|
|
void saveHeaderState();
|
|
void rebuildMainLayout(int actionToTake);
|
|
bool setOrderIsSorted;
|
|
bool includeRebalancedCards;
|
|
enum
|
|
{
|
|
NO_SETS_SELECTED,
|
|
SOME_SETS_SELECTED
|
|
};
|
|
|
|
public:
|
|
explicit WndSets(QWidget *parent = nullptr);
|
|
~WndSets() override;
|
|
|
|
protected:
|
|
void selectRows(QSet<int> rows);
|
|
private slots:
|
|
void actEnableAll();
|
|
void actDisableAll();
|
|
void actEnableSome();
|
|
void actDisableSome();
|
|
void actSave();
|
|
void actRestore();
|
|
void actUp();
|
|
void actDown();
|
|
void actTop();
|
|
void actBottom();
|
|
void actToggleButtons(const QItemSelection &selected, const QItemSelection &deselected);
|
|
void actDisableSortButtons(int index);
|
|
void actRestoreOriginalOrder();
|
|
void actDisableResetButton(const QString &filterText);
|
|
void actSort(int index);
|
|
void actIgnoreWarning();
|
|
void includeRebalancedCardsChanged(bool _includeRebalancedCardsChanged);
|
|
};
|
|
|
|
#endif
|