Cockatrice 2025-11-30-Development-2.11.0-beta.38
A cross-platform virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
deck_editor_deck_dock_widget.h
Go to the documentation of this file.
1
7
8#ifndef DECK_EDITOR_DECK_DOCK_WIDGET_H
9#define DECK_EDITOR_DECK_DOCK_WIDGET_H
10
12#include "../../key_signals.h"
17
18#include <QDockWidget>
19#include <QLabel>
20#include <QTextEdit>
21#include <QTreeView>
23
24class DeckListModel;
26class DeckEditorDeckDockWidget : public QDockWidget
27{
28 Q_OBJECT
29public:
31 DeckLoader *deckLoader;
34 QTreeView *deckView;
36 void createDeckDock();
38 void retranslateUi();
39 QString getDeckName()
40 {
41 return nameEdit->text();
42 }
44 {
45 return nameEdit->text().simplified();
46 }
47 QComboBox *getGroupByComboBox()
48 {
50 }
51
52 [[nodiscard]] QItemSelectionModel *getSelectionModel() const
53 {
54 return deckView->selectionModel();
55 }
56
57public slots:
58 void cleanDeck();
60 void setDeck(DeckLoader *_deck);
63 DeckLoader *getDeckLoader();
65 void actIncrement();
66 bool swapCard(const QModelIndex &idx);
67 void actDecrementCard(const ExactCard &card, QString zoneName);
69 void actSwapCard();
70 void actRemoveCard();
71 void offsetCountAtIndex(const QModelIndex &idx, int offset);
72
73signals:
79 void requestDeckHistorySave(const QString &modificationReason);
81 void cardChanged(const ExactCard &_card);
82
83private:
87 QLabel *nameLabel;
94 QTextEdit *commentsEdit;
98 QLabel *hashLabel1;
102
104
105 void recursiveExpand(const QModelIndex &index);
106 [[nodiscard]] QModelIndexList getSelectedCardNodes() const;
107
108private slots:
109 void decklistCustomMenu(QPoint point);
110 void updateCard(QModelIndex, const QModelIndex &current);
111 void updateName(const QString &name);
112 void updateComments();
113 void setBannerCard(int);
115 void updateHash();
116 void refreshShortcuts();
117 void updateShowBannerCardComboBox(bool visible);
118 void updateShowTagsWidget(bool visible);
120 void expandAll();
121};
122
123#endif // DECK_EDITOR_DECK_DOCK_WIDGET_H
Defines the AbstractTabDeckEditor class, which provides a base for deck editor tabs in the applicatio...
AbstractTabDeckEditor is the base class for all deck editor tabs.
Definition abstract_tab_deck_editor.h:92
void updateHash()
Definition deck_editor_deck_dock_widget.cpp:318
void updateShowBannerCardComboBox(bool visible)
Definition deck_editor_deck_dock_widget.cpp:392
void updateComments()
Definition deck_editor_deck_dock_widget.cpp:306
void cardChanged(const ExactCard &_card)
void actRemoveCard()
Definition deck_editor_deck_dock_widget.cpp:625
void syncDisplayWidgetsToModel()
Definition deck_editor_deck_dock_widget.cpp:437
QItemSelectionModel * getSelectionModel() const
Definition deck_editor_deck_dock_widget.h:52
SettingsButtonWidget * quickSettingsWidget
Definition deck_editor_deck_dock_widget.h:90
QString getSimpleDeckName()
Definition deck_editor_deck_dock_widget.h:43
QLabel * hashLabel1
Definition deck_editor_deck_dock_widget.h:98
DeckLoader * deckLoader
Definition deck_editor_deck_dock_widget.h:31
QCheckBox * showBannerCardCheckBox
Definition deck_editor_deck_dock_widget.h:91
void offsetCountAtIndex(const QModelIndex &idx, int offset)
Definition deck_editor_deck_dock_widget.cpp:656
void setDeck(DeckLoader *_deck)
Definition deck_editor_deck_dock_widget.cpp:421
void retranslateUi()
Definition deck_editor_deck_dock_widget.cpp:709
void updateBannerCardComboBox()
Definition deck_editor_deck_dock_widget.cpp:325
QTimer * commentsDebounceTimer
Definition deck_editor_deck_dock_widget.h:95
void decklistCustomMenu(QPoint point)
Definition deck_editor_deck_dock_widget.cpp:689
void requestDeckHistorySave(const QString &modificationReason)
QTextEdit * commentsEdit
Definition deck_editor_deck_dock_widget.h:94
DeckListStyleProxy * proxy
Definition deck_editor_deck_dock_widget.h:32
QLabel * nameLabel
Definition deck_editor_deck_dock_widget.h:87
QComboBox * getGroupByComboBox()
Definition deck_editor_deck_dock_widget.h:47
void updateName(const QString &name)
Definition deck_editor_deck_dock_widget.cpp:296
void updateShowTagsWidget(bool visible)
Definition deck_editor_deck_dock_widget.cpp:398
DeckEditorDeckDockWidget(AbstractTabDeckEditor *parent)
Definition deck_editor_deck_dock_widget.cpp:40
ExactCard getCurrentCard()
Definition deck_editor_deck_dock_widget.cpp:266
QComboBox * bannerCardComboBox
Definition deck_editor_deck_dock_widget.h:35
DeckLoader * getDeckLoader()
Definition deck_editor_deck_dock_widget.cpp:463
QComboBox * activeGroupCriteriaComboBox
Definition deck_editor_deck_dock_widget.h:101
QString getDeckName()
Definition deck_editor_deck_dock_widget.h:39
QAction * aDecrement
Definition deck_editor_deck_dock_widget.h:103
void refreshShortcuts()
Definition deck_editor_deck_dock_widget.cpp:701
void syncDeckListBannerCardWithComboBox()
Definition deck_editor_deck_dock_widget.cpp:386
void recursiveExpand(const QModelIndex &index)
Definition deck_editor_deck_dock_widget.cpp:491
QAction * aRemoveCard
Definition deck_editor_deck_dock_widget.h:103
QCheckBox * showTagsWidgetCheckBox
Definition deck_editor_deck_dock_widget.h:92
QModelIndexList getSelectedCardNodes() const
Definition deck_editor_deck_dock_widget.cpp:510
QLabel * commentsLabel
Definition deck_editor_deck_dock_widget.h:93
DeckList * getDeckList()
Definition deck_editor_deck_dock_widget.cpp:468
DeckListModel * deckModel
Definition deck_editor_deck_dock_widget.h:33
DeckPreviewDeckTagsDisplayWidget * deckTagsDisplayWidget
Definition deck_editor_deck_dock_widget.h:97
bool swapCard(const QModelIndex &idx)
Definition deck_editor_deck_dock_widget.cpp:564
void updateCard(QModelIndex, const QModelIndex &current)
Definition deck_editor_deck_dock_widget.cpp:289
QLabel * bannerCardLabel
Definition deck_editor_deck_dock_widget.h:96
void syncBannerCardComboBoxSelectionWithDeck()
Definition deck_editor_deck_dock_widget.cpp:403
void actSwapCard()
Definition deck_editor_deck_dock_widget.cpp:532
DeckListHistoryManagerWidget * historyManagerWidget
Definition deck_editor_deck_dock_widget.h:85
void actIncrement()
Definition deck_editor_deck_dock_widget.cpp:523
QTimer * nameDebounceTimer
Definition deck_editor_deck_dock_widget.h:89
LineEditUnfocusable * nameEdit
Definition deck_editor_deck_dock_widget.h:88
void actDecrementSelection()
Definition deck_editor_deck_dock_widget.cpp:608
void actDecrementCard(const ExactCard &card, QString zoneName)
Definition deck_editor_deck_dock_widget.cpp:588
QTreeView * deckView
Definition deck_editor_deck_dock_widget.h:34
LineEditUnfocusable * hashLabel
Definition deck_editor_deck_dock_widget.h:99
QAction * aIncrement
Definition deck_editor_deck_dock_widget.h:103
QAction * aSwapCard
Definition deck_editor_deck_dock_widget.h:103
KeySignals deckViewKeySignals
Definition deck_editor_deck_dock_widget.h:86
void createDeckDock()
Definition deck_editor_deck_dock_widget.cpp:53
void setBannerCard(int)
Definition deck_editor_deck_dock_widget.cpp:378
AbstractTabDeckEditor * deckEditor
Definition deck_editor_deck_dock_widget.h:84
void cleanDeck()
Definition deck_editor_deck_dock_widget.cpp:476
void expandAll()
Definition deck_editor_deck_dock_widget.cpp:498
QLabel * activeGroupCriteriaLabel
Definition deck_editor_deck_dock_widget.h:100
void sortDeckModelToDeckView()
Definition deck_editor_deck_dock_widget.cpp:458
Definition deck_list_history_manager_widget.h:18
Qt model representing a decklist for use in views (tree/table).
Definition deck_list_model.h:200
Definition deck_list_style_proxy.h:7
Represents a complete deck, including metadata, zones, cards, and sideboard plans.
Definition deck_list.h:127
Definition deck_preview_deck_tags_display_widget.h:19
Represents a specific card instance, defined by its CardInfo and a particular printing.
Definition exact_card.h:19
Definition key_signals.h:15
Definition custom_line_edit.h:20
Definition settings_button_widget.h:17
TODO: Document this.
TODO: Document this.