Skip to main content

dl::widget::MemorySlotWidget

dl::widget::MemorySlotWidget

Widget for configuring memory frame bindings for one static input slot. More…

#include <MemorySlotWidget.hpp>

Inherits from QWidget

Public Signals

Name
void bindingChanged()
Emitted whenever any parameter in any entry changes.

Public Functions

Name
MemorySlotWidget(dl::TensorSlotDescriptor const & slot, std::shared_ptr< DataManager > dm, std::vector< std::string > output_slot_names, QWidget * parent =[nullptr])
Construct a widget for one memory input slot.
~MemorySlotWidget() override
MemorySlotWidget(MemorySlotWidget const & ) =delete
MemorySlotWidget & operator=(MemorySlotWidget const & ) =delete
MemorySlotWidget(MemorySlotWidget && ) =delete
MemorySlotWidget & operator=(MemorySlotWidget && ) =delete
std::string const & slotName() const
Return the slot name this widget is bound to.
std::vector< MemoryFrameBinding > bindings() const
Memory frame bindings for this slot only.
void setBindings(std::vector< MemoryFrameBinding > const & all_frames)
Restore bindings for this slot from session state.
void refreshDataSources()
Refresh data_key combos from DataManager.
void refreshBankEntries(std::vector< std::string > const & bank_entry_ids)
Refresh bank_entry_id combos with current DataBank entry IDs.
void refreshOutputSlots(std::vector< std::string > const & output_slot_names)
Refresh output_slot_name combos with current model output names.

Detailed Description

class dl::widget::MemorySlotWidget;

Widget for configuring memory frame bindings for one static input slot.

Note: Not thread-safe — must be used from the GUI thread only.

Supports both single-frame (n=1) and sequence (n>1) memory slots. Each position is either static (DataManager/DataBank) or recurrent feedback.

Public Signals Documentation

signal bindingChanged

void bindingChanged()

Emitted whenever any parameter in any entry changes.

Public Functions Documentation

function MemorySlotWidget

explicit MemorySlotWidget(
    dl::TensorSlotDescriptor const & slot,
    std::shared_ptr< DataManager > dm,
    std::vector< std::string > output_slot_names,
    QWidget * parent =nullptr
)

Construct a widget for one memory input slot.

Parameters:

  • slot Descriptor for the slot (name, shape, sequence_dim).
  • dm Shared DataManager for populating data_key combos.
  • output_slot_names Model output slot names for recurrent combo.
  • parent Optional parent widget.

Precondition: dm must not be null.

function ~MemorySlotWidget

~MemorySlotWidget() override

function MemorySlotWidget

MemorySlotWidget(
    MemorySlotWidget const & 
) =delete

function operator=

MemorySlotWidget & operator=(
    MemorySlotWidget const & 
) =delete

function MemorySlotWidget

MemorySlotWidget(
    MemorySlotWidget && 
) =delete

function operator=

MemorySlotWidget & operator=(
    MemorySlotWidget && 
) =delete

function slotName

std::string const & slotName() const

Return the slot name this widget is bound to.

function bindings

std::vector< MemoryFrameBinding > bindings() const

Memory frame bindings for this slot only.

function setBindings

void setBindings(
    std::vector< MemoryFrameBinding > const & all_frames
)

Restore bindings for this slot from session state.

Parameters:

  • all_frames Full session vector; entries for other slots are ignored.

function refreshDataSources

void refreshDataSources()

Refresh data_key combos from DataManager.

function refreshBankEntries

void refreshBankEntries(
    std::vector< std::string > const & bank_entry_ids
)

Refresh bank_entry_id combos with current DataBank entry IDs.

function refreshOutputSlots

void refreshOutputSlots(
    std::vector< std::string > const & output_slot_names
)

Refresh output_slot_name combos with current model output names.


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