mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-10 20:33:58 -07:00
[Move refactor] Move dialogs to interface/widgets/ (#6234)
* Move dialogs/ underneath interface/widgets since QDialog inherits from QWidget. --------- Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
parent
b8983f27ab
commit
474c1d0d89
66 changed files with 60 additions and 60 deletions
86
cockatrice/src/interface/widgets/dialogs/dlg_manage_sets.h
Normal file
86
cockatrice/src/interface/widgets/dialogs/dlg_manage_sets.h
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
/**
|
||||
* @file dlg_manage_sets.h
|
||||
* @ingroup Dialogs
|
||||
* @brief TODO: Document this.
|
||||
*/
|
||||
|
||||
#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
|
||||
Loading…
Add table
Add a link
Reference in a new issue