libslic3r
Library for generating gcode from 3d models
Public Member Functions | Public Attributes | List of all members
Slic3r::ConfigOptionDef Class Reference

Definition of a configuration value for the purpose of GUI presentation, editing, value mapping and config file handling. More...

#include <ConfigBase.hpp>

Public Member Functions

 ConfigOptionDef ()
 
 ConfigOptionDef (const ConfigOptionDef &other)
 
 ~ConfigOptionDef ()
 

Public Attributes

ConfigOptionType type
 Type of option referenced. More...
 
ConfigOptiondefault_value
 Default value of this option. More...
 
std::string gui_type
 Specialization to indicate to the GUI what kind of control is more appropriate. More...
 
std::string gui_flags
 
std::string label
 
std::string full_label
 
std::string category
 
std::string tooltip
 A tooltip text shown in the GUI. More...
 
std::string sidetext
 Text right from the input field, usually a unit of measurement. More...
 
std::string cli
 Format of this parameter on a command line. More...
 
t_config_option_key ratio_over
 
bool multiline
 True for multiline strings. More...
 
bool full_width
 For text input: If true, the GUI text box spans the complete page width. More...
 
bool readonly
 
int height
 Height of a multiline GUI text box. More...
 
int width
 Optional width of an input field. More...
 
int min
 
int max
 
std::vector< t_config_option_keyaliases
 
std::vector< t_config_option_keyshortcut
 
std::vector< std::string > enum_values
 
std::vector< std::string > enum_labels
 
t_config_enum_values enum_keys_map
 

Detailed Description

Definition of a configuration value for the purpose of GUI presentation, editing, value mapping and config file handling.

Constructor & Destructor Documentation

◆ ConfigOptionDef() [1/2]

Slic3r::ConfigOptionDef::ConfigOptionDef ( )
inline

◆ ConfigOptionDef() [2/2]

Slic3r::ConfigOptionDef::ConfigOptionDef ( const ConfigOptionDef other)

◆ ~ConfigOptionDef()

Slic3r::ConfigOptionDef::~ConfigOptionDef ( )

Member Data Documentation

◆ aliases

std::vector<t_config_option_key> Slic3r::ConfigOptionDef::aliases

Legacy names for this configuration option. Used when parsing legacy configuration file.

◆ category

std::string Slic3r::ConfigOptionDef::category

Category of a configuration field, from the GUI perspective. One of: "Layers and Perimeters", "Infill", "Support material", "Speed", "Extruders", "Advanced", "Extrusion Width"

◆ cli

std::string Slic3r::ConfigOptionDef::cli

Format of this parameter on a command line.

◆ default_value

ConfigOption* Slic3r::ConfigOptionDef::default_value

Default value of this option.

The default value object is owned by ConfigDef, it is released in its destructor.

◆ enum_keys_map

t_config_enum_values Slic3r::ConfigOptionDef::enum_keys_map

For enums (when type == coEnum). Maps enum_values to enums. Initialized by ConfigOptionEnum<xxx>::get_enum_values()

◆ enum_labels

std::vector<std::string> Slic3r::ConfigOptionDef::enum_labels

◆ enum_values

std::vector<std::string> Slic3r::ConfigOptionDef::enum_values

Definition of values / labels for a combo box. Mostly used for enums (when type == coEnum), but may be used for ints resp. floats, if gui_type is set to "i_enum_open" resp. "f_enum_open".

◆ full_label

std::string Slic3r::ConfigOptionDef::full_label

◆ full_width

bool Slic3r::ConfigOptionDef::full_width

For text input: If true, the GUI text box spans the complete page width.

◆ gui_flags

std::string Slic3r::ConfigOptionDef::gui_flags

The flags may be combined. "show_value" - even if enum_values / enum_labels are set, still display the value, not the enum label. "align_label_right" - align label to right

◆ gui_type

std::string Slic3r::ConfigOptionDef::gui_type

Specialization to indicate to the GUI what kind of control is more appropriate.

Usually empty. Special values - "i_enum_open", "f_enum_open" to provide combo box for int or float selection, "select_open" - to open a selection dialog (currently only a serial port selection).

◆ height

int Slic3r::ConfigOptionDef::height

Height of a multiline GUI text box.

◆ label

std::string Slic3r::ConfigOptionDef::label

Label of the GUI input field. In case the GUI input fields are grouped in some views, the label defines a short label of a grouped value, while full_label contains a label of a stand-alone field. The full label is shown, when adding an override parameter for an object or a modified object.

◆ max

int Slic3r::ConfigOptionDef::max

◆ min

int Slic3r::ConfigOptionDef::min

<min, max> limit of a numeric input. If not set, the <min, max> is set to <INT_MIN, INT_MAX> By setting min=0, only nonnegative input is allowed.

◆ multiline

bool Slic3r::ConfigOptionDef::multiline

True for multiline strings.

◆ ratio_over

t_config_option_key Slic3r::ConfigOptionDef::ratio_over

Set for type == coFloatOrPercent. It provides a link to a configuration value, of which this option provides a ratio. For example, For example external_perimeter_speed may be defined as a fraction of perimeter_speed.

◆ readonly

bool Slic3r::ConfigOptionDef::readonly

This configuration item is not editable. Currently only used for the display of the number of threads.

◆ shortcut

std::vector<t_config_option_key> Slic3r::ConfigOptionDef::shortcut

Sometimes a single value may well define multiple values in a "beginner" mode. Currently used for aliasing "solid_layers" to "top_solid_layers", "bottom_solid_layers".

◆ sidetext

std::string Slic3r::ConfigOptionDef::sidetext

Text right from the input field, usually a unit of measurement.

◆ tooltip

std::string Slic3r::ConfigOptionDef::tooltip

A tooltip text shown in the GUI.

◆ type

ConfigOptionType Slic3r::ConfigOptionDef::type

◆ width

int Slic3r::ConfigOptionDef::width

Optional width of an input field.


The documentation for this class was generated from the following files: