KiCad PCB EDA Suite
Loading...
Searching...
No Matches
json_settings.h File Reference
#include <core/wx_stl_compat.h>
#include <gal/gal_display_options.h>
#include <utility>
#include <wx/string.h>
#include <functional>
#include <optional>
#include <settings/json_settings_internals.h>
#include <json_conversions.h>
#include <kicommon.h>

Go to the source code of this file.

Classes

class  JSON_SETTINGS
 

Namespaces

namespace  KIGFX
 The Cairo implementation of the graphics abstraction layer.
 

Macros

#define traceSettings   wxT( "KICAD_SETTINGS" )
 

Enumerations

enum class  SETTINGS_LOC {
  USER , PROJECT , COLORS , TOOLBARS ,
  NESTED , NONE
}
 

Functions

KICOMMON_API void to_json (nlohmann::json &aJson, const wxString &aString)
 
KICOMMON_API void from_json (const nlohmann::json &aJson, wxString &aString)
 
template std::optional< std::string > JSON_SETTINGS::Get< std::string > (const std::string &aPath) const
 
template std::optional< nlohmann::json > JSON_SETTINGS::Get< nlohmann::json > (const std::string &aPath) const
 
template std::optional< KIGFX::COLOR4DJSON_SETTINGS::Get< KIGFX::COLOR4D > (const std::string &aPath) const
 
template std::optional< KIGFX::CROSS_HAIR_MODEJSON_SETTINGS::Get< KIGFX::CROSS_HAIR_MODE > (const std::string &aPath) const
 

Macro Definition Documentation

◆ traceSettings

Enumeration Type Documentation

◆ SETTINGS_LOC

enum class SETTINGS_LOC
strong
Enumerator
USER 

The main config directory (e.g. ~/.config/kicad/)

PROJECT 

The settings directory inside a project folder.

COLORS 

The color scheme directory (e.g. ~/.config/kicad/colors/)

TOOLBARS 

The toolbar directory (e.g. ~/.config/kicad/toolbars/)

NESTED 

Not stored in a file, but inside another JSON_SETTINGS.

NONE 

No directory prepended, full path in filename (used for PROJECT_FILE)

Definition at line 55 of file json_settings.h.

Function Documentation

◆ from_json()

KICOMMON_API void from_json ( const nlohmann::json & aJson,
wxString & aString )

Definition at line 30 of file json_conversions.cpp.

◆ JSON_SETTINGS::Get< KIGFX::COLOR4D >()

template std::optional< KIGFX::COLOR4D > JSON_SETTINGS::Get< KIGFX::COLOR4D > ( const std::string & aPath) const
extern

References JSON_SETTINGS::Get().

◆ JSON_SETTINGS::Get< KIGFX::CROSS_HAIR_MODE >()

template std::optional< KIGFX::CROSS_HAIR_MODE > JSON_SETTINGS::Get< KIGFX::CROSS_HAIR_MODE > ( const std::string & aPath) const
extern

References JSON_SETTINGS::Get().

◆ JSON_SETTINGS::Get< nlohmann::json >()

template std::optional< nlohmann::json > JSON_SETTINGS::Get< nlohmann::json > ( const std::string & aPath) const
extern

References JSON_SETTINGS::Get().

◆ JSON_SETTINGS::Get< std::string >()

template std::optional< std::string > JSON_SETTINGS::Get< std::string > ( const std::string & aPath) const
extern

References JSON_SETTINGS::Get().

◆ to_json()

KICOMMON_API void to_json ( nlohmann::json & aJson,
const wxString & aString )

Definition at line 24 of file json_conversions.cpp.