Loading...
Searching...
No Matches
mesh::CellParamSpec Struct Reference

Describes one editable per-cell parameter: how to label it, how to configure a numeric editor for it, and whether it is live yet. More...

#include <mesh/meshcellparams.h>

Collaboration diagram for mesh::CellParamSpec:

Public Types

enum class  Kind {
  Double ,
  Enum
}
 What kind of value the parameter carries. More...
 

Public Attributes

QByteArray key
 stable id, e.g. "mannings", "initDepth"
 
QString label
 combo / property label, already translated
 
QString prefix
 spin-box prefix, e.g. "n=" ({} for none)
 
bool lengthUnit = false
 true → append the project depth unit
 
double min = 0.0
 Editor minimum in stored units (Kind::Enum: smallest integer).
 
double max = 1.0
 Editor maximum in stored units (Kind::Enum: largest integer).
 
double step = 0.01
 Spin-box single step.
 
double defaultValue = 0.0
 Editor's initial value; never substituted on reads.
 
int decimals = 4
 Spin-box decimal places.
 
bool enabled = true
 false → unavailable in this generic editor
 
QString tooltip
 Translated tooltip text; may be empty.
 
Kind kind = Kind::Double
 Value kind.
 
QStringList enumLabels
 Choice labels for Kind::Enum, in the enumeration's own order.
 

Detailed Description

Describes one editable per-cell parameter: how to label it, how to configure a numeric editor for it, and whether it is live yet.

Member Enumeration Documentation

◆ Kind

enum class mesh::CellParamSpec::Kind
strong

What kind of value the parameter carries.

GUI plan §3.5(1): the infiltration METHOD is an enumeration, not a magic double, so every surface fed by this registry (attribute table, mesh-editing toolbar, property adapter, assign dialog) can pick a combo editor for it from one place.

Enumerator
Double 

Real value edited with a spin box (min, max, step, decimals).

Enum 

Integer code edited with a combo box labelled by enumLabels.

Member Data Documentation

◆ decimals

int mesh::CellParamSpec::decimals = 4

Spin-box decimal places.

◆ defaultValue

double mesh::CellParamSpec::defaultValue = 0.0

Editor's initial value; never substituted on reads.

◆ enabled

bool mesh::CellParamSpec::enabled = true

false → unavailable in this generic editor

◆ enumLabels

QStringList mesh::CellParamSpec::enumLabels

Choice labels for Kind::Enum, in the enumeration's own order.

The stored value is the enum's integer, not the label index — the labels are display-only. Empty for Kind::Double.

◆ key

QByteArray mesh::CellParamSpec::key

stable id, e.g. "mannings", "initDepth"

◆ kind

Kind mesh::CellParamSpec::kind = Kind::Double

Value kind.

New members stay at the END of the struct: the registry builds its entries with positional aggregate initialisers, which fall back to these default member initialisers for anything they omit.

◆ label

QString mesh::CellParamSpec::label

combo / property label, already translated

◆ lengthUnit

bool mesh::CellParamSpec::lengthUnit = false

true → append the project depth unit

◆ max

double mesh::CellParamSpec::max = 1.0

Editor maximum in stored units (Kind::Enum: largest integer).

◆ min

double mesh::CellParamSpec::min = 0.0

Editor minimum in stored units (Kind::Enum: smallest integer).

◆ prefix

QString mesh::CellParamSpec::prefix

spin-box prefix, e.g. "n=" ({} for none)

◆ step

double mesh::CellParamSpec::step = 0.01

Spin-box single step.

◆ tooltip

QString mesh::CellParamSpec::tooltip

Translated tooltip text; may be empty.


The documentation for this struct was generated from the following file: