Class Widget

Inheritance Relationships

Base Type

Derived Types

Class Documentation

class SmartPeak::Widget : public SmartPeak::IPropertiesHandler

Abstract base class for all panes, windows, and widgets.

Subclassed by SmartPeak::AboutWidget, SmartPeak::CreateSessionWidget, SmartPeak::FilePicker, SmartPeak::GenericGraphicWidget, SmartPeak::GenericTableWidget, SmartPeak::GenericTextWidget, SmartPeak::GenericTreeWidget, SmartPeak::InfoWidget, SmartPeak::LogWidget, SmartPeak::ParameterEditorWidget, SmartPeak::ParametersTableWidget, SmartPeak::Report, SmartPeak::RunWorkflowWidget, SmartPeak::SampleTypeEditorWidget, SmartPeak::SequenceGroupsEditorWidget, SmartPeak::SessionFilesWidget, SmartPeak::SetInputOutputWidget, SmartPeak::SplitWindow, SmartPeak::StatisticsWidget, SmartPeak::WorkflowStepWidget, SmartPeak::WorkflowWidget

Public Functions

inline explicit Widget(std::string title = "")
virtual ~Widget() = default
Widget(const Widget&&) = delete
virtual std::string getPropertiesHandlerName() const override

IPropertiesHandler

virtual std::map<std::string, CastValue::Type> getPropertiesSchema() const override

Returns the list of properties, name of the property, and its type.

Returns

a map of name/type

virtual std::optional<CastValue> getProperty(const std::string &property, const size_t row) const override

Returns the property value based on the name.

Returns

the property value, as CastValue, std::nullopt if the property does not exists.

virtual void setProperty(const std::string &property, const CastValue &value, const size_t row) override

Sets the property value based on the name.

virtual void draw() = 0

Interface to show the widget

NOTE: free to override in inherited implmementations

inline void setWindowSize(float width, float height)

Public Members

bool visible_ = false
std::string title_
float width_ = 0.0
float height_ = 0.0