#include <labelexpressiondialog.h>
◆ LabelExpressionDialog()
- Parameters
-
| fields | Themeable attributes for the sublayer being labelled; these become the insertable token list. |
| initial | The expression to seed the editor with. |
◆ expression()
| QString openswmmvis::ui::LabelExpressionDialog::expression |
( |
| ) |
const |
◆ resolve()
| QString openswmmvis::ui::LabelExpressionDialog::resolve |
( |
const QString & |
expr, |
|
|
const QString & |
name, |
|
|
const QVariantMap & |
attrs |
|
) |
| |
|
static |
Resolves expr the same way the paint path does: {name} → name, any other {token} → attrs[token] as a string, unmatched braces kept literally. Mirrors swmmlayeritem.cpp's resolveExpression.
◆ setSampleFeature()
| void openswmmvis::ui::LabelExpressionDialog::setSampleFeature |
( |
const QString & |
name, |
|
|
const QVariantMap & |
attrs |
|
) |
| |
Sample values used by the preview, keyed by attribute name.
Optional: without it the preview substitutes each token's own
placeholder value so the shape of the label is still visible.
◆ unknownTokens()
Every {token} in expr that is neither "name" nor a known field. Empty means the template references nothing that would resolve blank.
The documentation for this class was generated from the following files: