• Settings Framework
  • The settings framework manages application settings, as well as projects. This document explains how to make use of the framework as well as some of its inner workings. Source Code Guide Most of the relevant code is in common/settings and common/project. C++ Class Description SETTINGS_MANAGER Loads and unloads settings files and projects JSON_SETTINGS The base class for all settings objects.

  • Tool Framework
  • This document briefly outlines the structure of the tool system in the GAL canvases. Introduction The GAL (Graphics Abstraction Layer) framework provides a powerful method of easily adding tools to KiCad. Compared to the older "legacy" canvas, GAL tools are more flexible, powerful and much easier to write. A GAL "tool" is a class which provides one or more "actions" to perform. An action can be a simple one-off action (e.

  • Testing
  • Unit tests KiCad has a limited number of unit tests, which can be used to check that certain functionality works. Tests are registered using CTest, part of CMake. CTest gathers all the disparate test programs and runs them. Most C++ unit tests are written using the Boost Unit Test framework, but this is not required to add a test to the testing suite. The test CMake targets generally start with qa_, the names of the tests within CTest are the same but without the qa_ prefix.

  • S-Expressions
  • An s-expression is a text stream or string, in the same vein as XML, consisting of a sequence of elements. Each element is either an atom or list. An atom corresponds to a string, while a list corresponds to an s-expression. The following grammar represents our definition of an s-expression: sexpr ::= ( sx ) sx ::= atom sxtail | sexpr sxtail | NULL sxtail ::= sx | NULL atom :: quoted | value quoted :: "ws_string" value :: nws_string An atom can either be a quoted string, which is a string containing whitespace surrounded by double quotes, or a non-whitespace string that does not require surrounding quotes.