21#ifndef FOOTPRINT_WIZARD_H
22#define FOOTPRINT_WIZARD_H
25#include <tl/expected.hpp>
28#include <api/common/types/wizards.pb.h>
42 void FromProto(
const kiapi::common::types::WizardMetaInfo& aProto );
58 virtual kiapi::common::types::WizardParameter
Pack(
bool aCompact =
true );
63 kiapi::common::types::WizardParameterCategory
category = kiapi::common::types::WPC_UNKNOWN;
64 kiapi::common::types::WizardParameterDataType
type = kiapi::common::types::WPDT_UNKNOWN;
66 static std::unique_ptr<WIZARD_PARAMETER>
Create(
const kiapi::common::types::WizardParameter& aProto );
75 kiapi::common::types::WizardParameter
Pack(
bool aCompact =
true )
override;
79 std::optional<int>
min;
80 std::optional<int>
max;
83 void FromProto(
const kiapi::common::types::WizardIntParameter& aProto );
90 kiapi::common::types::WizardParameter
Pack(
bool aCompact =
true )
override;
94 std::optional<double>
min;
95 std::optional<double>
max;
97 void FromProto(
const kiapi::common::types::WizardRealParameter& aProto );
104 kiapi::common::types::WizardParameter
Pack(
bool aCompact =
true )
override;
109 void FromProto(
const kiapi::common::types::WizardBoolParameter& aProto );
116 kiapi::common::types::WizardParameter
Pack(
bool aCompact =
true )
override;
122 void FromProto(
const kiapi::common::types::WizardStringParameter& aProto );
131 void FromProto(
const kiapi::common::types::WizardInfo& aProto );
176 std::optional<FOOTPRINT_WIZARD*>
GetWizard(
const wxString& aIdentifier );
178 std::vector<FOOTPRINT_WIZARD*>
Wizards()
const;
197 std::map<wxString, std::unique_ptr<FOOTPRINT_WIZARD>>
m_wizards;
void FromProto(const kiapi::common::types::WizardBoolParameter &aProto)
kiapi::common::types::WizardParameter Pack(bool aCompact=true) override
Packs the current state of this parameter back into a protobuf message.
void FromProto(const kiapi::common::types::WizardIntParameter &aProto)
std::optional< int > multiple
kiapi::common::types::WizardParameter Pack(bool aCompact=true) override
Packs the current state of this parameter back into a protobuf message.
virtual kiapi::common::types::WizardParameter Pack(bool aCompact=true)
Packs the current state of this parameter back into a protobuf message.
kiapi::common::types::WizardParameterDataType type
static wxString ParameterCategoryName(kiapi::common::types::WizardParameterCategory aCategory)
virtual ~WIZARD_PARAMETER()=default
static std::unique_ptr< WIZARD_PARAMETER > Create(const kiapi::common::types::WizardParameter &aProto)
kiapi::common::types::WizardParameterCategory category
WIZARD_PARAMETER()=default
kiapi::common::types::WizardParameter Pack(bool aCompact=true) override
Packs the current state of this parameter back into a protobuf message.
void FromProto(const kiapi::common::types::WizardRealParameter &aProto)
std::optional< double > min
std::optional< double > max
std::optional< wxString > validation_regex
kiapi::common::types::WizardParameter Pack(bool aCompact=true) override
Packs the current state of this parameter back into a protobuf message.
void FromProto(const kiapi::common::types::WizardStringParameter &aProto)
std::vector< std::unique_ptr< WIZARD_PARAMETER > > parameters
void FromProto(const kiapi::common::types::WizardInfo &aProto)