130 return m_RotationAngle.AsTenthsOfADegree();
135 m_RotationAngle = EDA_ANGLE( aVal, TENTHS_OF_A_DEGREE_T );
149 [&]() -> nlohmann::json
151 nlohmann::json js = nlohmann::json::array();
155 js.push_back( nlohmann::json( { {
"lib", tab.m_lib.ToUTF8() },
156 {
"fp_name", tab.m_fpName.ToUTF8() },
157 {
"preview", tab.m_preview } } ) );
162 [&](
const nlohmann::json& aObj )
166 if( !aObj.is_array() )
169 for(
const nlohmann::json& entry : aObj )
171 if( !entry.is_object() || !entry.contains(
"lib" ) || !entry.contains(
"fp_name" ) )
175 tab.
m_lib = entry.at(
"lib" ).get<wxString>();
176 tab.
m_fpName = entry.at(
"fp_name" ).get<wxString>();
179 if( entry.contains(
"preview" ) )
180 tab.
m_preview = entry.at(
"preview" ).get<
bool>();
185 nlohmann::json::array() ) );
191 "design_settings.default_footprint_text_items",
192 [&] () -> nlohmann::json
194 nlohmann::json js = nlohmann::json::array();
198 js.push_back( nlohmann::json( { item.
m_Text.ToUTF8(),
205 [&] (
const nlohmann::json& aObj )
209 if( !aObj.is_array() )
212 for(
const nlohmann::json& entry : aObj )
214 if( entry.empty() || !entry.is_array() )
219 textInfo.
m_Text = entry.at(0).get<wxString>();
220 textInfo.
m_Visible = entry.at(1).get<
bool>();
221 wxString layerName = entry.at(2).get<wxString>();
223 textInfo.
m_Layer = candidateLayer >= 0
230 nlohmann::json::array( {
240 [
this]() { return m_DesignSettings.GetUserDefinedLayerCount(); },
241 [
this](
int aCount ) { m_DesignSettings.SetUserDefinedLayerCount( aCount ); },
370 [&]() -> nlohmann::json
374 ret[
"lockedItems"] = m_SelectionFilter.lockedItems;
375 ret[
"footprints"] = m_SelectionFilter.footprints;
376 ret[
"text"] = m_SelectionFilter.text;
377 ret[
"tracks"] = m_SelectionFilter.tracks;
378 ret[
"vias"] = m_SelectionFilter.vias;
379 ret[
"pads"] = m_SelectionFilter.pads;
380 ret[
"graphics"] = m_SelectionFilter.graphics;
381 ret[
"zones"] = m_SelectionFilter.zones;
382 ret[
"keepouts"] = m_SelectionFilter.keepouts;
383 ret[
"dimensions"] = m_SelectionFilter.dimensions;
384 ret[
"points"] = m_SelectionFilter.points;
385 ret[
"otherItems"] = m_SelectionFilter.otherItems;
389 [&](
const nlohmann::json& aVal )
391 if( aVal.empty() || !aVal.is_object() )
394 SetIfPresent( aVal,
"lockedItems", m_SelectionFilter.lockedItems );
395 SetIfPresent( aVal,
"footprints", m_SelectionFilter.footprints );
396 SetIfPresent( aVal,
"text", m_SelectionFilter.text );
397 SetIfPresent( aVal,
"tracks", m_SelectionFilter.tracks );
398 SetIfPresent( aVal,
"vias", m_SelectionFilter.vias );
399 SetIfPresent( aVal,
"pads", m_SelectionFilter.pads );
400 SetIfPresent( aVal,
"graphics", m_SelectionFilter.graphics );
401 SetIfPresent( aVal,
"zones", m_SelectionFilter.zones );
402 SetIfPresent( aVal,
"keepouts", m_SelectionFilter.keepouts );
403 SetIfPresent( aVal,
"dimensions", m_SelectionFilter.dimensions );
404 SetIfPresent( aVal,
"points", m_SelectionFilter.points );
405 SetIfPresent( aVal,
"otherItems", m_SelectionFilter.otherItems );
408 {
"lockedItems", false },
409 {
"footprints", true },
414 {
"graphics", true },
416 {
"keepouts", true },
417 {
"dimensions", true },
419 {
"otherItems", true }
424 registerMigration( 1, 2,
428 return migrateLibTreeWidth();
#define TEXT_MIN_SIZE_MM
Minimum text size (1 micron).
#define TEXT_MAX_SIZE_MM
Maximum text size in mm (~10 inches)