RADLib
RADical C++ application framework
RADUi::Slint Namespace Reference

Namespaces

 Detail
 

Classes

class  SlintBackend
 RADUi backend implementation that uses Slint's event loop. More...
 
struct  FramebufferPlatformConfig
 Configuration for the embedded framebuffer-backed Slint platform. More...
 

Functions

std::shared_ptr< SlintBackendinstallBackend ()
 Installs and returns a shared Slint backend for RADUi. More...
 
template<typename Component , typename F >
void postToComponent (const slint::ComponentHandle< Component > &component, F &&action)
 Posts action to the UI thread and invokes it only if component is still alive. More...
 
template<typename Component , typename... Args, typename F >
RADUi::Binding connectEventToComponent (RADCore::Event< void(Args...)> &event, const slint::ComponentHandle< Component > &component, F &&callback)
 Connects a RADCore event to a Slint component callback and returns a binding handle. More...
 
template<typename Component , typename... Args, typename F >
RADUi::Binding bindEventToComponent (RADCore::Event< void(Args...)> &event, const slint::ComponentHandle< Component > &component, F &&callback)
 Alias for connectEventToComponent used by property-oriented bridge code. More...
 
template<typename Component , typename Value , typename Setter >
RADUi::Binding bindProperty (RADCore::Event< void(Value)> &event, const slint::ComponentHandle< Component > &component, Setter setter)
 Binds an event value directly to a generated Slint property setter. More...
 
template<typename Component , typename Value , typename Setter , typename Transform >
RADUi::Binding bindProperty (RADCore::Event< void(Value)> &event, const slint::ComponentHandle< Component > &component, Setter setter, Transform transform)
 Binds an event value to a generated Slint property setter after transform. More...
 
template<typename Component , typename F >
RADUi::Binding bindTheme (RADUi::ThemeManager &manager, const slint::ComponentHandle< Component > &component, F &&callback)
 Binds ThemeManager changes to a generated Slint component callback. More...
 
std::shared_ptr< SlintBackendinstallFramebufferBackend (const FramebufferPlatformConfig &config={})
 
rad_status_t tryInstallFramebufferBackend (const FramebufferPlatformConfig &config, std::shared_ptr< SlintBackend > *backend)
 Embedded-safe variant that reports RAD status instead of throwing on setup errors. More...
 
slint::Image toSlintImage (const RADUi::PlotImage &image)
 Converts a RADUi plot image to a Slint image. More...
 
template<typename Component , typename Setter >
RADUi::Binding bindPlotToImageProperty (RADUi::PlotModel &model, const slint::ComponentHandle< Component > &component, Setter setter, RADUi::PlotViewport viewport, double framesPerSecond=60.0, RADUi::PlotRenderMode renderMode=RADUi::PlotRenderMode::Software)
 Binds model rendering to a generated Slint image property setter. More...
 

Function Documentation

◆ bindEventToComponent()

template<typename Component , typename... Args, typename F >
RADUi::Binding RADUi::Slint::bindEventToComponent ( RADCore::Event< void(Args...)> &  event,
const slint::ComponentHandle< Component > &  component,
F &&  callback 
)

Alias for connectEventToComponent used by property-oriented bridge code.

◆ bindPlotToImageProperty()

template<typename Component , typename Setter >
RADUi::Binding RADUi::Slint::bindPlotToImageProperty ( RADUi::PlotModel model,
const slint::ComponentHandle< Component > &  component,
Setter  setter,
RADUi::PlotViewport  viewport,
double  framesPerSecond = 60.0,
RADUi::PlotRenderMode  renderMode = RADUi::PlotRenderMode::Software 
)

Binds model rendering to a generated Slint image property setter.

◆ bindProperty() [1/2]

template<typename Component , typename Value , typename Setter >
RADUi::Binding RADUi::Slint::bindProperty ( RADCore::Event< void(Value)> &  event,
const slint::ComponentHandle< Component > &  component,
Setter  setter 
)

Binds an event value directly to a generated Slint property setter.

◆ bindProperty() [2/2]

template<typename Component , typename Value , typename Setter , typename Transform >
RADUi::Binding RADUi::Slint::bindProperty ( RADCore::Event< void(Value)> &  event,
const slint::ComponentHandle< Component > &  component,
Setter  setter,
Transform  transform 
)

Binds an event value to a generated Slint property setter after transform.

◆ bindTheme()

template<typename Component , typename F >
RADUi::Binding RADUi::Slint::bindTheme ( RADUi::ThemeManager manager,
const slint::ComponentHandle< Component > &  component,
F &&  callback 
)

Binds ThemeManager changes to a generated Slint component callback.

◆ connectEventToComponent()

template<typename Component , typename... Args, typename F >
RADUi::Binding RADUi::Slint::connectEventToComponent ( RADCore::Event< void(Args...)> &  event,
const slint::ComponentHandle< Component > &  component,
F &&  callback 
)

Connects a RADCore event to a Slint component callback and returns a binding handle.

◆ installBackend()

std::shared_ptr<SlintBackend> RADUi::Slint::installBackend ( )

Installs and returns a shared Slint backend for RADUi.

◆ installFramebufferBackend()

std::shared_ptr<SlintBackend> RADUi::Slint::installFramebufferBackend ( const FramebufferPlatformConfig config = {})

Installs Slint's embedded platform against a RADKernel framebuffer and returns the RADUi Slint backend.

◆ postToComponent()

template<typename Component , typename F >
void RADUi::Slint::postToComponent ( const slint::ComponentHandle< Component > &  component,
F &&  action 
)

Posts action to the UI thread and invokes it only if component is still alive.

◆ toSlintImage()

slint::Image RADUi::Slint::toSlintImage ( const RADUi::PlotImage image)
inline

Converts a RADUi plot image to a Slint image.

◆ tryInstallFramebufferBackend()

rad_status_t RADUi::Slint::tryInstallFramebufferBackend ( const FramebufferPlatformConfig config,
std::shared_ptr< SlintBackend > *  backend 
)

Embedded-safe variant that reports RAD status instead of throwing on setup errors.