* @brief Serialise the lib in Kicad format * @param lib lib to serialise */
| 110 | * @param lib lib to serialise |
| 111 | */ |
| 112 | void KicadLibParser::writeLib(Lib *lib) |
| 113 | { |
| 114 | _stream << "EESchema-LIBRARY Version 2.3 Date: " |
| 115 | << QDateTime::currentDateTime().toString("dd/MM/yyyy hh:mm:ss") |
| 116 | << '\n'; |
| 117 | _stream << "#encoding utf-8" << '\n'; |
| 118 | //_stream << "#created with uConfig by Sebastien CAUX (sebcaux)" << '\n'; |
| 119 | //_stream << "#https://github.com/Robotips/uConfig" << '\n'; |
| 120 | |
| 121 | // components |
| 122 | foreach (Component *component, lib->components()) |
| 123 | { |
| 124 | writeComponent(component); |
| 125 | _stream << '\n'; |
| 126 | } |
| 127 | |
| 128 | // footer |
| 129 | _stream << "#" << '\n'; |
| 130 | _stream << "#End Library" << '\n'; |
| 131 | } |
| 132 | |
| 133 | void KicadLibParser::writeComponent(Component *component) |
| 134 | { |
nothing calls this directly
no test coverage detected