mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-05 13:03:55 -07:00
Search in "Manage sets" window (#3229)
* search field added; sortfilterproxy displayed in treeview * searching works properly * moving with filter on works; view isnt't updated yet * clangify & view updating figured out * moving disabled when sorting is active * drag&drop disabled when view sorted * clangified * foreach replaced * button rename & SORT_RESET defined * changed variable names * 'x' button added & searchlabel text modified * 'enabled' column won't grow anymore * column resize improvement * button hint & restore original order added * moving with filter on works; view isnt't updated yet * sort disable build in column headers (3 clicks) * codacy fix * typo + wording * background color for warning * buttons moved down a bit * clicking "default order" button will hide the warning text
This commit is contained in:
parent
91b3c7343d
commit
81803e2612
4 changed files with 183 additions and 29 deletions
|
|
@ -4,11 +4,13 @@
|
|||
#include <QDialogButtonBox>
|
||||
#include <QGridLayout>
|
||||
#include <QLabel>
|
||||
#include <QLineEdit>
|
||||
#include <QMainWindow>
|
||||
#include <QSet>
|
||||
|
||||
class SetsModel;
|
||||
class SetsProxyModel;
|
||||
class SetsDisplayModel;
|
||||
class QPushButton;
|
||||
class CardDatabase;
|
||||
class QItemSelection;
|
||||
|
|
@ -19,14 +21,20 @@ class WndSets : public QMainWindow
|
|||
Q_OBJECT
|
||||
private:
|
||||
SetsModel *model;
|
||||
SetsDisplayModel *displayModel;
|
||||
QTreeView *view;
|
||||
QPushButton *toggleAllButton, *toggleSelectedButton;
|
||||
QPushButton *enableAllButton, *disableAllButton, *enableSomeButton, *disableSomeButton;
|
||||
QPushButton *defaultSortButton;
|
||||
QAction *aUp, *aDown, *aBottom, *aTop;
|
||||
QToolBar *setsEditToolBar;
|
||||
QDialogButtonBox *buttonBox;
|
||||
QLabel *labNotes;
|
||||
QLabel *labNotes, *searchLabel, *sortWarning;
|
||||
QLineEdit *searchField;
|
||||
QGridLayout *mainLayout;
|
||||
QHBoxLayout *filterBox;
|
||||
int sortIndex;
|
||||
Qt::SortOrder sortOrder;
|
||||
void rebuildMainLayout(int actionToTake);
|
||||
enum
|
||||
{
|
||||
|
|
@ -52,6 +60,10 @@ private slots:
|
|||
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);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue