A widget that controls how deck cards are displayed in the visual deck editor. More...
#include <visual_deck_display_options_widget.h>
Public Slots | |
| void | retranslateUi () |
| Updates all UI text for retranslation/localization. | |
Signals | |
| void | displayTypeChanged (const DisplayType &displayType) |
| Emitted when the display type (flat or overlapping layout) changes. | |
| void | groupCriteriaChanged (const QString &activeGroupCriteria) |
| Emitted when a new grouping criterion is selected. | |
| void | sortCriteriaChanged (const QStringList &activeSortCriteria) |
| Emitted when the order of sort criteria changes. | |
Public Member Functions | |
| VisualDeckDisplayOptionsWidget (QWidget *parent) | |
| Constructs a new VisualDeckDisplayOptionsWidget. | |
| DisplayType | getDisplayType () const |
| Gets the current display type (Overlap or Flat). | |
| QString | getActiveGroupCriteria () const |
| Gets the currently active group-by criterion. | |
| QStringList | getActiveSortCriteria () const |
| Gets the currently active ordered sort criteria. | |
Private Slots | |
| void | onSortCriteriaChange () |
| Slot triggered whenever the sort list is reordered. | |
| void | updateDisplayType () |
| Toggles the display layout between flat and overlapping modes. | |
Private Attributes | |
| QHBoxLayout * | groupAndSortLayout |
| Layout for grouping and sorting UI elements. | |
| DisplayType | currentDisplayType = DisplayType::Overlap |
| Current deck display type. | |
| QPushButton * | displayTypeButton |
| Button used to toggle the display layout. | |
| QLabel * | groupByLabel |
| Label for the group-by selector. | |
| QComboBox * | groupByComboBox |
| Combo box listing group-by criteria. | |
| QString | activeGroupCriteria = "maintype" |
| Currently active group-by criterion. | |
| SettingsButtonWidget * | sortCriteriaButton |
| Encapsulates the sort settings widgets (label + list). | |
| QLabel * | sortByLabel |
| Label for “Sort by”. | |
| QLabel * | sortLabel |
| Descriptive label inside the sort criteria button. | |
| QListWidget * | sortByListWidget |
| Draggable list of sort criteria. | |
| QStringList | activeSortCriteria = {"name", "cmc", "colors", "maintype"} |
| Ordered list of current sort criteria. | |
A widget that controls how deck cards are displayed in the visual deck editor.
This widget provides:
Depending on whether the parent is a VisualDeckEditorWidget, this widget can mirror the original group by checkbox from the main deck editor UI to maintain synchronization.
It emits signals whenever the grouping criterion, sorting criteria, or display mode changes.
|
explicit |
Constructs a new VisualDeckDisplayOptionsWidget.
| parent | The parent QWidget—may trigger cloning of models if the parent is a visual deck editor. |
|
signal |
Emitted when the display type (flat or overlapping layout) changes.
| displayType | The newly selected display layout. |
|
inline |
Gets the currently active group-by criterion.
|
inline |
Gets the currently active ordered sort criteria.
|
inline |
Gets the current display type (Overlap or Flat).
|
signal |
Emitted when a new grouping criterion is selected.
| activeGroupCriteria | Name of the selected group-by criterion. |
|
privateslot |
Slot triggered whenever the sort list is reordered.
Reads the QListWidget’s order and emits sortCriteriaChanged().
|
slot |
Updates all UI text for retranslation/localization.
Called when the application language changes.
|
signal |
Emitted when the order of sort criteria changes.
| activeSortCriteria | Ordered list of sorting keys. |
|
privateslot |
Toggles the display layout between flat and overlapping modes.
Emits displayTypeChanged().
|
private |
Currently active group-by criterion.
|
private |
Ordered list of current sort criteria.
|
private |
Current deck display type.
|
private |
Button used to toggle the display layout.
|
private |
Layout for grouping and sorting UI elements.
|
private |
Combo box listing group-by criteria.
|
private |
Label for the group-by selector.
|
private |
Label for “Sort by”.
|
private |
Draggable list of sort criteria.
|
private |
Encapsulates the sort settings widgets (label + list).
|
private |
Descriptive label inside the sort criteria button.