Skip to main content

LineStyleState

LineStyleState

QObject wrapper for line style settings. More…

#include <LineStyleState.hpp>

Inherits from QObject

Public Signals

Name
void styleChanged()
Emitted when any line style property changes (user action).
void styleUpdated()
Emitted when style is updated programmatically (e.g., deserialization).

Public Functions

Name
LineStyleState(QObject * parent =[nullptr])
~LineStyleState() override =default
std::string const & hexColor() const
void setHexColor(std::string const & color)
float thickness() const
void setThickness(float thickness)
float alpha() const
void setAlpha(float alpha)
void setStyle(CorePlotting::LineStyleData const & style)
Set all style properties at once (emits styleChanged).
void setStyleSilent(CorePlotting::LineStyleData const & style)
Set all style properties silently (emits styleUpdated, not styleChanged).
CorePlotting::LineStyleData const & data() const
CorePlotting::LineStyleData & data()

Detailed Description

class LineStyleState;

QObject wrapper for line style settings.

Wraps CorePlotting::LineStyleData and emits signals on change. Composable into plot state classes as a member variable.

Public Signals Documentation

signal styleChanged

void styleChanged()

Emitted when any line style property changes (user action).

Connect to this to trigger scene rebuilds.

signal styleUpdated

void styleUpdated()

Emitted when style is updated programmatically (e.g., deserialization).

Connect to this for UI refresh without triggering scene rebuilds.

Public Functions Documentation

function LineStyleState

explicit LineStyleState(
    QObject * parent =nullptr
)

function ~LineStyleState

~LineStyleState() override =default

function hexColor

std::string const & hexColor() const

function setHexColor

void setHexColor(
    std::string const & color
)

function thickness

float thickness() const

function setThickness

void setThickness(
    float thickness
)

function alpha

float alpha() const

function setAlpha

void setAlpha(
    float alpha
)

function setStyle

void setStyle(
    CorePlotting::LineStyleData const & style
)

Set all style properties at once (emits styleChanged).

function setStyleSilent

void setStyleSilent(
    CorePlotting::LineStyleData const & style
)

Set all style properties silently (emits styleUpdated, not styleChanged).

Use when loading from serialized state to avoid triggering scene rebuilds.

function data

inline CorePlotting::LineStyleData const & data() const

function data

inline CorePlotting::LineStyleData & data()

Updated on 2026-11-13 at 20:25:40 +0000