Cockatrice 2026-09-01-Development-3.1.0-beta.10
A virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
abstract_settings_page.cpp File Reference
#include "abstract_settings_page.h"
#include "settings_search_model.h"
#include <QCheckBox>
#include <QGridLayout>
#include <QGroupBox>
#include <QLabel>
#include <QLayout>
#include <QLineEdit>
#include <QPair>
#include <QSpinBox>
Include dependency graph for abstract_settings_page.cpp:

Functions

static void collectWidgets (QLayout *layout, QList< QPair< QWidget *, QLayout * > > &widgets)
 Recursively collects all widgets within a layout.
static bool isValidSettingLabel (const QLabel *label)
 Rejects QLabels that are not setting names.
static QWidget * controlForLabel (QLabel *label, QLayout *containingLayout)
 Finds the control associated with a setting label.
static QString buildFullSearchText (const QString &groupTitle, const QString &cleanLabel, QWidget *control)
 Builds the extended search text for an entry.

Function Documentation

◆ buildFullSearchText()

QString buildFullSearchText ( const QString & groupTitle,
const QString & cleanLabel,
QWidget * control )
static

Builds the extended search text for an entry.

Combines the group title, label, and any extra searchable text derived from the associated control (placeholder, prefix/suffix, tooltip). Combo values and numeric tooltips are excluded since they change at runtime and would make the search index stale.

Here is the caller graph for this function:

◆ collectWidgets()

void collectWidgets ( QLayout * layout,
QList< QPair< QWidget *, QLayout * > > & widgets )
static

Recursively collects all widgets within a layout.

Parameters
layoutThe layout to walk
widgetsOutput list of (widget, containing layout) pairs
Here is the call graph for this function:
Here is the caller graph for this function:

◆ controlForLabel()

QWidget * controlForLabel ( QLabel * label,
QLayout * containingLayout )
static

Finds the control associated with a setting label.

Uses the explicit buddy if set, otherwise the widget in the cell (or slot) immediately following the label within the same layout. Returns nullptr when no obvious control is found.

Here is the caller graph for this function:

◆ isValidSettingLabel()

bool isValidSettingLabel ( const QLabel * label)
static

Rejects QLabels that are not setting names.

HTML link labels, path values, and excessively long labels are filtered out.

Here is the caller graph for this function: