KiCad PCB EDA Suite
Loading...
Searching...
No Matches
json_settings.h File Reference
#include <core/wx_stl_compat.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 , 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
 

Macro Definition Documentation

◆ traceSettings

#define traceSettings   wxT( "KICAD_SETTINGS" )

Definition at line 52 of file json_settings.h.

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/)

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 54 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

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

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

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

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

◆ to_json()

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

Definition at line 24 of file json_conversions.cpp.