A widget that controls how deck cards are displayed in the visual deck editor.
More...
#include <visual_deck_display_options_widget.h>
|
| 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.
|
A widget that controls how deck cards are displayed in the visual deck editor.
This widget provides:
- A group-by selector (QComboBox)
- A sort-by multi-criteria, draggable list (QListWidget within a SettingsButtonWidget)
- A display-type toggler (flat vs. overlap layout)
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.
◆ VisualDeckDisplayOptionsWidget()
| VisualDeckDisplayOptionsWidget::VisualDeckDisplayOptionsWidget |
( |
QWidget * | parent | ) |
|
|
explicit |
Constructs a new VisualDeckDisplayOptionsWidget.
- Parameters
-
| parent | The parent QWidget—may trigger cloning of models if the parent is a visual deck editor. |
◆ compactWidth
| int VisualDeckDisplayOptionsWidget::compactWidth |
( |
| ) |
const |
|
slot |
◆ displayTypeChanged
| void VisualDeckDisplayOptionsWidget::displayTypeChanged |
( |
const DisplayType & | displayType | ) |
|
|
signal |
Emitted when the display type (flat or overlapping layout) changes.
- Parameters
-
| displayType | The newly selected display layout. |
◆ expandedWidth
| int VisualDeckDisplayOptionsWidget::expandedWidth |
( |
| ) |
const |
|
slot |
◆ getActiveGroupCriteria()
| QString VisualDeckDisplayOptionsWidget::getActiveGroupCriteria |
( |
| ) |
const |
|
inline |
Gets the currently active group-by criterion.
◆ getActiveSortCriteria()
| QStringList VisualDeckDisplayOptionsWidget::getActiveSortCriteria |
( |
| ) |
const |
|
inline |
Gets the currently active ordered sort criteria.
◆ getDisplayType()
| DisplayType VisualDeckDisplayOptionsWidget::getDisplayType |
( |
| ) |
const |
|
inline |
Gets the current display type (Overlap or Flat).
◆ groupCriteriaChanged
| void VisualDeckDisplayOptionsWidget::groupCriteriaChanged |
( |
const QString & | activeGroupCriteria | ) |
|
|
signal |
Emitted when a new grouping criterion is selected.
- Parameters
-
| activeGroupCriteria | Name of the selected group-by criterion. |
◆ onSortCriteriaChange
| void VisualDeckDisplayOptionsWidget::onSortCriteriaChange |
( |
| ) |
|
|
privateslot |
Slot triggered whenever the sort list is reordered.
Reads the QListWidget’s order and emits sortCriteriaChanged().
◆ retranslateUi
| void VisualDeckDisplayOptionsWidget::retranslateUi |
( |
| ) |
|
|
slot |
Updates all UI text for retranslation/localization.
Called when the application language changes.
◆ sortCriteriaChanged
| void VisualDeckDisplayOptionsWidget::sortCriteriaChanged |
( |
const QStringList & | activeSortCriteria | ) |
|
|
signal |
Emitted when the order of sort criteria changes.
- Parameters
-
| activeSortCriteria | Ordered list of sorting keys. |
◆ updateCompactMode
| void VisualDeckDisplayOptionsWidget::updateCompactMode |
( |
bool | mode | ) |
|
|
slot |
◆ updateDisplayType
| void VisualDeckDisplayOptionsWidget::updateDisplayType |
( |
| ) |
|
|
privateslot |
◆ activeGroupCriteria
| QString VisualDeckDisplayOptionsWidget::activeGroupCriteria = "maintype" |
|
private |
Currently active group-by criterion.
◆ activeSortCriteria
| QStringList VisualDeckDisplayOptionsWidget::activeSortCriteria = {"name", "cmc", "colors", "maintype"} |
|
private |
Ordered list of current sort criteria.
◆ currentDisplayType
Current deck display type.
◆ displayTypeButton
Button used to toggle the display layout.
◆ groupAndSortLayout
| QHBoxLayout* VisualDeckDisplayOptionsWidget::groupAndSortLayout |
|
private |
Layout for grouping and sorting UI elements.
◆ groupByComboBox
| QComboBox* VisualDeckDisplayOptionsWidget::groupByComboBox |
|
private |
Combo box listing group-by criteria.
◆ groupByLabel
| QLabel* VisualDeckDisplayOptionsWidget::groupByLabel |
|
private |
Label for the group-by selector.
◆ sortByLabel
| QLabel* VisualDeckDisplayOptionsWidget::sortByLabel |
|
private |
◆ sortByListWidget
| QListWidget* VisualDeckDisplayOptionsWidget::sortByListWidget |
|
private |
Draggable list of sort criteria.
◆ sortCriteriaButton
Encapsulates the sort settings widgets (label + list).
◆ sortLabel
| QLabel* VisualDeckDisplayOptionsWidget::sortLabel |
|
private |
Descriptive label inside the sort criteria button.
The documentation for this class was generated from the following files: