LibrePCB Developers Documentation
kicadtypes.h
Go to the documentation of this file.
1/*
2 * LibrePCB - Professional EDA for everyone!
3 * Copyright (C) 2013 LibrePCB Developers, see AUTHORS.md for contributors.
4 * https://librepcb.org/
5 *
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20#ifndef LIBREPCB_KICADIMPORT_KICADTYPES_H
21#define LIBREPCB_KICADIMPORT_KICADTYPES_H
22
23/*******************************************************************************
24 * Includes
25 ******************************************************************************/
26#include <optional/tl/optional.hpp>
27
28#include <QtCore>
29#include <QtGui>
30
31/*******************************************************************************
32 * Namespace / Forward Declarations
33 ******************************************************************************/
34namespace librepcb {
35
36class MessageLogger;
37class SExpression;
38
39namespace kicadimport {
40
41// File format documentation:
42// https://dev-docs.kicad.org/en/file-formats/sexpr-intro/index.html
43
44/*******************************************************************************
45 * Enums
46 ******************************************************************************/
47
48enum class KiCadEdge {
49 Unknown, // Parse error
50 TopLeft,
54};
55
56enum class KiCadStrokeType {
57 Unknown, // Parse error
58 Dash,
59 DashDot,
61 Dot,
62 Default,
63 Solid,
64};
65
67 Unknown, // Parse error
69 Value,
70 User,
71};
72
74 Unknown, // Parse error
75 None,
76 Outline,
78};
79
80enum class KiCadPinType {
81 Unknown, // Parse error
82 Input,
83 Output,
86 Passive,
87 Free,
89 PowerIn,
94};
95
96enum class KiCadPinStyle {
97 Unknown, // Parse error
98 Line,
100 Clock,
102 InputLow,
103 ClockLow,
104 OutputLow,
106 NonLogic,
107};
108
110 Unknown, // Parse error
111 None,
112 Solid,
113};
114
115enum class KiCadPadType {
116 Unknown, // Parse error
117 ThruHole,
118 Smd,
119 Connect, // Edge connector
121};
122
123enum class KiCadPadShape {
124 Unknown, // Parse error
125 Circle,
126 Rect,
127 Oval,
128 Trapezoid,
129 RoundRect,
130 Custom,
131};
132
134 Unknown, // Parse error
136 Circle,
137 Rect,
138};
139
141 Unknown, // Parse error
143 Bga,
146 Testpoint,
147 Heatsink,
149};
150
152 Unknown, // Parse error
153 NoConnect, // Mode 0
154 ThermalReliefs, // Mode 1
155 Solid, // Mode 2
156};
157
158enum class KiCadLayer {
159 Unknown, // Parse error
160 AllCopper, // *.Cu
161 AllSolderMask, // *.Mask
162 AllSilkscreen, // *.SilkS
163 FrontAndBackCopper, // F&B.Cu
205 BackPaste,
211 User1,
212 User2,
213 User3,
214 User4,
215 User5,
216 User6,
217 User7,
218 User8,
219 User9,
220};
221
222/*******************************************************************************
223 * Struct KiCadProperty
224 ******************************************************************************/
225
229struct KiCadProperty final {
230 Q_DECLARE_TR_FUNCTIONS(KiCadProperty)
231
232public:
233 QString key;
234 QString value;
235 QPointF position;
236 qreal rotation = 0; // May not be set.
237 QString layer; // May not be set.
238 QSizeF fontSize; // May not be set.
239 qreal fontThickness = 0; // May not be set.
240 Qt::Alignment alignment = Qt::AlignCenter; // May not be set.
241 bool mirror = false; // May not be set.
242 bool unlocked = false; // May not be set.
243 bool hide = false; // May not be set.
244
245 static KiCadProperty parse(const SExpression& node, MessageLogger& log);
246};
247
248/*******************************************************************************
249 * Struct KiCadGraphicalLine
250 ******************************************************************************/
251
255struct KiCadGraphicalLine final {
256 Q_DECLARE_TR_FUNCTIONS(KiCadGraphicalLine)
257
258public:
259 QPointF start;
260 QPointF end;
261 qreal width = 0;
262
263 static KiCadGraphicalLine parse(const SExpression& node, MessageLogger& log);
264};
265
266/*******************************************************************************
267 * Struct KiCadGraphicalArc
268 ******************************************************************************/
269
273struct KiCadGraphicalArc final {
274 Q_DECLARE_TR_FUNCTIONS(KiCadGraphicalArc)
275
276public:
277 QPointF start;
278 QPointF mid;
279 QPointF end;
280 qreal width = 0;
281
282 static KiCadGraphicalArc parse(const SExpression& node, MessageLogger& log);
283};
284
285/*******************************************************************************
286 * Struct KiCadGraphicalCircle
287 ******************************************************************************/
288
293 Q_DECLARE_TR_FUNCTIONS(KiCadGraphicalCircle)
294
295public:
296 QPointF center;
297 QPointF end;
298 qreal width = 0;
299 bool fill = false; // May not be set.
300
301 static KiCadGraphicalCircle parse(const SExpression& node,
302 MessageLogger& log);
303};
304
305/*******************************************************************************
306 * Struct KiCadGraphicalPolygon
307 ******************************************************************************/
308
313 Q_DECLARE_TR_FUNCTIONS(KiCadGraphicalPolygon)
314
315public:
316 QList<QPointF> coordinates;
317 qreal width = 0;
318 bool fill = false; // May not be set.
319
320 static KiCadGraphicalPolygon parse(const SExpression& node,
321 MessageLogger& log);
322};
323
324/*******************************************************************************
325 * Struct KiCadZone
326 ******************************************************************************/
327
331struct KiCadZone final {
332 Q_DECLARE_TR_FUNCTIONS(KiCadZone)
333
334public:
335 QList<KiCadLayer> layers;
336 bool keepOutTracks = false;
337 bool keepOutVias = false;
338 bool keepOutPads = false;
339 bool keepOutCopperPour = false;
340 bool keepOutFootprints = false;
341 QList<QPointF> polygon;
342
343 static KiCadZone parse(const SExpression& node, MessageLogger& log);
344};
345
346/*******************************************************************************
347 * Struct KiCadSymbolArc
348 ******************************************************************************/
349
353struct KiCadSymbolArc final {
354 Q_DECLARE_TR_FUNCTIONS(KiCadSymbolArc)
355
356public:
357 QPointF start;
358 QPointF mid;
359 QPointF end;
360 qreal strokeWidth = 0;
363
364 static KiCadSymbolArc parse(const SExpression& node, MessageLogger& log);
365};
366
367/*******************************************************************************
368 * Struct KiCadSymbolCircle
369 ******************************************************************************/
370
374struct KiCadSymbolCircle final {
375 Q_DECLARE_TR_FUNCTIONS(KiCadSymbolCircle)
376
377public:
378 QPointF center;
379 qreal radius = 0;
380 qreal strokeWidth = 0;
383
384 static KiCadSymbolCircle parse(const SExpression& node, MessageLogger& log);
385};
386
387/*******************************************************************************
388 * Struct KiCadSymbolRectangle
389 ******************************************************************************/
390
395 Q_DECLARE_TR_FUNCTIONS(KiCadSymbolRectangle)
396
397public:
398 QPointF start;
399 QPointF end;
400 qreal strokeWidth = 0;
403
404 static KiCadSymbolRectangle parse(const SExpression& node,
405 MessageLogger& log);
406};
407
408/*******************************************************************************
409 * Struct KiCadSymbolPolyline
410 ******************************************************************************/
411
416 Q_DECLARE_TR_FUNCTIONS(KiCadSymbolPolyline)
417
418public:
419 QList<QPointF> coordinates;
420 qreal strokeWidth = 0;
423
424 static KiCadSymbolPolyline parse(const SExpression& node, MessageLogger& log);
425};
426
427/*******************************************************************************
428 * Struct KiCadSymbolText
429 ******************************************************************************/
430
434struct KiCadSymbolText final {
435 Q_DECLARE_TR_FUNCTIONS(KiCadSymbolText)
436
437public:
438 QString text;
439 QPointF position;
440 qreal rotation = 0; // May not be set.
441 QSizeF fontSize; // May not be set.
442 qreal fontThickness = 0; // May not be set.
443 Qt::Alignment alignment = Qt::AlignCenter; // May not be set.
444
445 static KiCadSymbolText parse(const SExpression& node, MessageLogger& log);
446};
447
448/*******************************************************************************
449 * Struct KiCadSymbolPin
450 ******************************************************************************/
451
455struct KiCadSymbolPin final {
456 Q_DECLARE_TR_FUNCTIONS(KiCadSymbolPin)
457
458public:
461 QPointF position;
462 qreal rotation = 0; // May not be set.
463 qreal length;
464 QString name;
465 QString number;
466
467 static KiCadSymbolPin parse(const SExpression& node, MessageLogger& log);
468};
469
470/*******************************************************************************
471 * Struct KiCadSymbolGate
472 ******************************************************************************/
473
477struct KiCadSymbolGate final {
478 Q_DECLARE_TR_FUNCTIONS(KiCadSymbolGate)
479
480public:
481 enum class Style { Common, Base, DeMorgan };
482
483 QString name; // Including index and style suffixes.
484 int index = 0; // 0 = common to all gates
486 QList<KiCadSymbolArc> arcs;
487 QList<KiCadSymbolCircle> circles;
488 QList<KiCadSymbolRectangle> rectangles;
489 QList<KiCadSymbolPolyline> polylines;
490 QList<KiCadSymbolText> texts;
491 QList<KiCadSymbolPin> pins;
492
493 static KiCadSymbolGate parse(const SExpression& node, MessageLogger& log);
494};
495
496/*******************************************************************************
497 * Struct KiCadSymbol
498 ******************************************************************************/
499
503struct KiCadSymbol final {
504 Q_DECLARE_TR_FUNCTIONS(KiCadSymbol)
505
506public:
507 QString name;
508 QString extends; // May not be set.
509 qreal pinNamesOffset = 0.508; // May not be set.
510 bool hidePinNumbers = false; // May not be set.
511 bool hidePinNames = false; // May not be set.
512 bool excludeFromSim = false; // May not be set.
513 bool inBom = true; // May not be set.
514 bool onBoard = true; // May not be set.
515 QList<KiCadProperty> properties;
516 QList<KiCadSymbolGate> gates;
517
518 static KiCadSymbol parse(const SExpression& node, MessageLogger& log);
519};
520
521/*******************************************************************************
522 * Struct KiCadSymbolLibrary
523 ******************************************************************************/
524
528struct KiCadSymbolLibrary final {
529 Q_DECLARE_TR_FUNCTIONS(KiCadSymbolLibrary)
530
531public:
533 QString generator;
534 QList<KiCadSymbol> symbols;
535
536 static KiCadSymbolLibrary parse(const SExpression& node, MessageLogger& log);
537};
538
539/*******************************************************************************
540 * Struct KiCadFootprintLine
541 ******************************************************************************/
542
546struct KiCadFootprintLine final {
547 Q_DECLARE_TR_FUNCTIONS(KiCadFootprintLine)
548
549public:
550 QPointF start;
551 QPointF end;
555
556 static KiCadFootprintLine parse(const SExpression& node, MessageLogger& log);
557};
558
559/*******************************************************************************
560 * Struct KiCadFootprintArc
561 ******************************************************************************/
562
566struct KiCadFootprintArc final {
567 Q_DECLARE_TR_FUNCTIONS(KiCadFootprintArc)
568
569public:
570 QPointF start;
571 QPointF mid;
572 QPointF end;
576
577 static KiCadFootprintArc parse(const SExpression& node, MessageLogger& log);
578};
579
580/*******************************************************************************
581 * Struct KiCadFootprintCircle
582 ******************************************************************************/
583
588 Q_DECLARE_TR_FUNCTIONS(KiCadFootprintCircle)
589
590public:
591 QPointF center;
592 QPointF end;
594 qreal strokeWidth = 0;
597 KiCadFootprintFillType::None; // May not be set.
598
599 static KiCadFootprintCircle parse(const SExpression& node,
600 MessageLogger& log);
601};
602
603/*******************************************************************************
604 * Struct KiCadFootprintRectangle
605 ******************************************************************************/
606
611 Q_DECLARE_TR_FUNCTIONS(KiCadFootprintRectangle)
612
613public:
614 QPointF start;
615 QPointF end;
617 qreal strokeWidth = 0;
620 KiCadFootprintFillType::None; // May not be set.
621
622 static KiCadFootprintRectangle parse(const SExpression& node,
623 MessageLogger& log);
624};
625
626/*******************************************************************************
627 * Struct KiCadFootprintPolygon
628 ******************************************************************************/
629
634 Q_DECLARE_TR_FUNCTIONS(KiCadFootprintPolygon)
635
636public:
637 QList<QPointF> coordinates;
639 qreal strokeWidth = 0;
642 KiCadFootprintFillType::None; // May not be set.
643
644 static KiCadFootprintPolygon parse(const SExpression& node,
645 MessageLogger& log);
646};
647
648/*******************************************************************************
649 * Struct KiCadFootprintText
650 ******************************************************************************/
651
655struct KiCadFootprintText final {
656 Q_DECLARE_TR_FUNCTIONS(KiCadFootprintText)
657
658public:
660 QString text;
661 QPointF position;
662 qreal rotation = 0; // May not be set.
664 QSizeF fontSize; // May not be set.
665 qreal fontThickness = 0; // May not be set.
666 Qt::Alignment alignment = Qt::AlignCenter; // May not be set.
667 bool mirror = false; // May not be set.
668 bool unlocked = false; // May not be set.
669
670 static KiCadFootprintText parse(const SExpression& node, MessageLogger& log);
671};
672
673/*******************************************************************************
674 * Struct KiCadFootprintPad
675 ******************************************************************************/
676
680struct KiCadFootprintPad final {
681 Q_DECLARE_TR_FUNCTIONS(KiCadFootprintPad)
682
683public:
684 QString number;
687 QPointF position;
688 QPointF offset; // Offset of shape from drill.
689 qreal rotation = 0; // May not be set.
690 QSizeF size;
691 QSizeF drill; // May not be set.
692 QList<KiCadLayer> layers;
693 KiCadPadProperty property = KiCadPadProperty::Unspecified; // May not be set.
694 qreal solderMaskMargin = 0; // May not be set.
695 qreal solderPasteMargin = 0; // May not be set.
696 qreal solderPasteMarginRatio = 0; // May not be set.
697 qreal thermalBridgeAngle = 0; // May not be set.
698 qreal thermalBridgeWidth = 0; // May not be set.
699 qreal clearance = 0; // May not be set.
700 bool removeUnusedLayers = false; // May not be set.
701 qreal roundRectRRatio = 0; // May not be set.
702 QSizeF rectDelta; // May not be set.
703 qreal chamferRatio = 0; // May not be set.
704 QList<KiCadEdge> chamferEdges; // May not be set.
706 KiCadCustomPadAnchor::Unspecified; // May not be set.
707 QList<KiCadGraphicalLine> graphicalLines; // May not be set.
708 QList<KiCadGraphicalArc> graphicalArcs; // May not be set.
709 QList<KiCadGraphicalCircle> graphicalCircles; // May not be set.
710 QList<KiCadGraphicalPolygon> graphicalPolygons; // May not be set.
711
712 static KiCadFootprintPad parse(const SExpression& node, MessageLogger& log);
713};
714
715/*******************************************************************************
716 * Struct KiCadFootprintModel
717 ******************************************************************************/
718
723 Q_DECLARE_TR_FUNCTIONS(KiCadFootprintModel)
724
725public:
726 QString path;
727 QVector3D offset;
728 QVector3D scale;
729 QVector3D rotate;
730
731 static KiCadFootprintModel parse(const SExpression& node, MessageLogger& log);
732};
733
734/*******************************************************************************
735 * Struct KiCadFootprint
736 ******************************************************************************/
737
741struct KiCadFootprint final {
742 Q_DECLARE_TR_FUNCTIONS(KiCadFootprint)
743
744public:
745 QString name;
746 int version = -1; // May not be set.
747 QString generator; // May not be set.
749 QString description; // May not be set.
750 QString tags; // May not be set.
751 bool isSmd = false; // May not be set.
752 bool isThroughHole = false; // May not be set.
753 bool boardOnly = false; // May not be set.
754 bool excludeFromPosFiles = false; // May not be set.
755 bool excludeFromBom = false; // May not be set.
756 qreal solderMaskMargin = 0; // May not be set.
757 qreal solderPasteMargin = 0; // May not be set.
758 qreal solderPasteRatio = 0; // May not be set.
759 qreal clearance = 0; // May not be set.
760 tl::optional<KiCadZoneConnect> zoneConnect; // May not be set.
761 QList<QStringList> netTiePadGroups; // May not be set.
762 QList<KiCadProperty> properties;
763 QList<KiCadFootprintLine> lines;
764 QList<KiCadFootprintArc> arcs;
765 QList<KiCadFootprintCircle> circles;
766 QList<KiCadFootprintRectangle> rectangles;
767 QList<KiCadFootprintPolygon> polygons;
768 QList<KiCadFootprintText> texts;
769 QList<KiCadFootprintPad> pads;
770 QList<KiCadZone> zones;
771 QList<KiCadFootprintModel> models;
772
773 static KiCadFootprint parse(const SExpression& node, MessageLogger& log);
774};
775
776/*******************************************************************************
777 * End of File
778 ******************************************************************************/
779
780} // namespace kicadimport
781} // namespace librepcb
782
783#endif
The Circle class.
Definition: circle.h:46
Generic logger class to pass messages between objects.
Definition: messagelogger.h:43
The SExpression class.
Definition: sexpression.h:69
KiCadSymbolFillType
Definition: kicadtypes.h:73
KiCadStrokeType
Definition: kicadtypes.h:56
KiCadLayer
Definition: kicadtypes.h:158
KiCadZoneConnect
Definition: kicadtypes.h:151
KiCadPinStyle
Definition: kicadtypes.h:96
KiCadPadType
Definition: kicadtypes.h:115
KiCadFootprintFillType
Definition: kicadtypes.h:109
KiCadCustomPadAnchor
Definition: kicadtypes.h:133
KiCadPadShape
Definition: kicadtypes.h:123
KiCadSymbolTextType
Definition: kicadtypes.h:66
KiCadPinType
Definition: kicadtypes.h:80
KiCadEdge
Definition: kicadtypes.h:48
KiCadPadProperty
Definition: kicadtypes.h:140
Definition: occmodel.cpp:77
Represents a KiCad footprint arc.
Definition: kicadtypes.h:566
static KiCadFootprintArc parse(const SExpression &node, MessageLogger &log)
Definition: kicadtypes.cpp:757
KiCadLayer layer
Definition: kicadtypes.h:575
QPointF start
Definition: kicadtypes.h:570
QPointF mid
Definition: kicadtypes.h:571
qreal strokeWidth
Definition: kicadtypes.h:573
KiCadStrokeType strokeType
Definition: kicadtypes.h:574
QPointF end
Definition: kicadtypes.h:572
Represents a KiCad footprint circle.
Definition: kicadtypes.h:587
KiCadFootprintFillType fillType
Definition: kicadtypes.h:596
KiCadLayer layer
Definition: kicadtypes.h:593
qreal strokeWidth
Definition: kicadtypes.h:594
KiCadStrokeType strokeType
Definition: kicadtypes.h:595
QPointF end
Definition: kicadtypes.h:592
static KiCadFootprintCircle parse(const SExpression &node, MessageLogger &log)
Definition: kicadtypes.cpp:773
QPointF center
Definition: kicadtypes.h:591
Represents a KiCad footprint.
Definition: kicadtypes.h:741
QList< KiCadFootprintRectangle > rectangles
Definition: kicadtypes.h:766
bool excludeFromPosFiles
Definition: kicadtypes.h:754
qreal solderPasteMargin
Definition: kicadtypes.h:757
qreal solderPasteRatio
Definition: kicadtypes.h:758
bool excludeFromBom
Definition: kicadtypes.h:755
QString generator
Definition: kicadtypes.h:747
qreal clearance
Definition: kicadtypes.h:759
QList< KiCadFootprintModel > models
Definition: kicadtypes.h:771
QList< KiCadFootprintPad > pads
Definition: kicadtypes.h:769
bool boardOnly
Definition: kicadtypes.h:753
qreal solderMaskMargin
Definition: kicadtypes.h:756
QList< KiCadFootprintPolygon > polygons
Definition: kicadtypes.h:767
KiCadLayer layer
Definition: kicadtypes.h:748
static KiCadFootprint parse(const SExpression &node, MessageLogger &log)
Definition: kicadtypes.cpp:1000
QString description
Definition: kicadtypes.h:749
QString tags
Definition: kicadtypes.h:750
QList< KiCadFootprintLine > lines
Definition: kicadtypes.h:763
tl::optional< KiCadZoneConnect > zoneConnect
Definition: kicadtypes.h:760
QList< KiCadFootprintArc > arcs
Definition: kicadtypes.h:764
int version
Definition: kicadtypes.h:746
QList< KiCadFootprintCircle > circles
Definition: kicadtypes.h:765
QString name
Definition: kicadtypes.h:745
QList< KiCadFootprintText > texts
Definition: kicadtypes.h:768
bool isThroughHole
Definition: kicadtypes.h:752
QList< KiCadZone > zones
Definition: kicadtypes.h:770
QList< QStringList > netTiePadGroups
Definition: kicadtypes.h:761
bool isSmd
Definition: kicadtypes.h:751
QList< KiCadProperty > properties
Definition: kicadtypes.h:762
Represents a KiCad footprint line.
Definition: kicadtypes.h:546
static KiCadFootprintLine parse(const SExpression &node, MessageLogger &log)
Definition: kicadtypes.cpp:742
KiCadLayer layer
Definition: kicadtypes.h:554
QPointF start
Definition: kicadtypes.h:550
qreal strokeWidth
Definition: kicadtypes.h:552
KiCadStrokeType strokeType
Definition: kicadtypes.h:553
QPointF end
Definition: kicadtypes.h:551
Represents the 3D model of a KiCad footprint.
Definition: kicadtypes.h:722
QVector3D offset
Definition: kicadtypes.h:727
QString path
Definition: kicadtypes.h:726
QVector3D scale
Definition: kicadtypes.h:728
QVector3D rotate
Definition: kicadtypes.h:729
static KiCadFootprintModel parse(const SExpression &node, MessageLogger &log)
Definition: kicadtypes.cpp:982
Represents a KiCad footprint pad.
Definition: kicadtypes.h:680
qreal solderPasteMargin
Definition: kicadtypes.h:695
qreal rotation
Definition: kicadtypes.h:689
KiCadPadShape shape
Definition: kicadtypes.h:686
QList< KiCadLayer > layers
Definition: kicadtypes.h:692
qreal clearance
Definition: kicadtypes.h:699
QList< KiCadGraphicalArc > graphicalArcs
Definition: kicadtypes.h:708
qreal solderMaskMargin
Definition: kicadtypes.h:694
QList< KiCadEdge > chamferEdges
Definition: kicadtypes.h:704
static KiCadFootprintPad parse(const SExpression &node, MessageLogger &log)
Definition: kicadtypes.cpp:859
qreal thermalBridgeAngle
Definition: kicadtypes.h:697
QPointF offset
Definition: kicadtypes.h:688
QSizeF drill
Definition: kicadtypes.h:691
QSizeF rectDelta
Definition: kicadtypes.h:702
QList< KiCadGraphicalCircle > graphicalCircles
Definition: kicadtypes.h:709
qreal roundRectRRatio
Definition: kicadtypes.h:701
QString number
Definition: kicadtypes.h:684
qreal solderPasteMarginRatio
Definition: kicadtypes.h:696
QPointF position
Definition: kicadtypes.h:687
bool removeUnusedLayers
Definition: kicadtypes.h:700
KiCadCustomPadAnchor customPadAnchor
Definition: kicadtypes.h:705
QList< KiCadGraphicalLine > graphicalLines
Definition: kicadtypes.h:707
qreal thermalBridgeWidth
Definition: kicadtypes.h:698
KiCadPadType type
Definition: kicadtypes.h:685
qreal chamferRatio
Definition: kicadtypes.h:703
QList< KiCadGraphicalPolygon > graphicalPolygons
Definition: kicadtypes.h:710
QSizeF size
Definition: kicadtypes.h:690
Represents a KiCad footprint polygon.
Definition: kicadtypes.h:633
QList< QPointF > coordinates
Definition: kicadtypes.h:637
static KiCadFootprintPolygon parse(const SExpression &node, MessageLogger &log)
Definition: kicadtypes.cpp:809
KiCadFootprintFillType fillType
Definition: kicadtypes.h:641
KiCadLayer layer
Definition: kicadtypes.h:638
qreal strokeWidth
Definition: kicadtypes.h:639
KiCadStrokeType strokeType
Definition: kicadtypes.h:640
Represents a KiCad footprint rectangle.
Definition: kicadtypes.h:610
KiCadFootprintFillType fillType
Definition: kicadtypes.h:619
KiCadLayer layer
Definition: kicadtypes.h:616
static KiCadFootprintRectangle parse(const SExpression &node, MessageLogger &log)
Definition: kicadtypes.cpp:791
QPointF start
Definition: kicadtypes.h:614
qreal strokeWidth
Definition: kicadtypes.h:617
KiCadStrokeType strokeType
Definition: kicadtypes.h:618
QPointF end
Definition: kicadtypes.h:615
Represents a KiCad footprint text.
Definition: kicadtypes.h:655
bool mirror
Definition: kicadtypes.h:667
qreal rotation
Definition: kicadtypes.h:662
QString text
Definition: kicadtypes.h:660
bool unlocked
Definition: kicadtypes.h:668
KiCadLayer layer
Definition: kicadtypes.h:663
Qt::Alignment alignment
Definition: kicadtypes.h:666
QPointF position
Definition: kicadtypes.h:661
QSizeF fontSize
Definition: kicadtypes.h:664
KiCadSymbolTextType type
Definition: kicadtypes.h:659
static KiCadFootprintText parse(const SExpression &node, MessageLogger &log)
Definition: kicadtypes.cpp:828
qreal fontThickness
Definition: kicadtypes.h:665
Represents a KiCad graphical arc.
Definition: kicadtypes.h:273
qreal width
Definition: kicadtypes.h:280
static KiCadGraphicalArc parse(const SExpression &node, MessageLogger &log)
Definition: kicadtypes.cpp:438
QPointF start
Definition: kicadtypes.h:277
QPointF mid
Definition: kicadtypes.h:278
QPointF end
Definition: kicadtypes.h:279
Represents a KiCad graphical circle.
Definition: kicadtypes.h:292
qreal width
Definition: kicadtypes.h:298
static KiCadGraphicalCircle parse(const SExpression &node, MessageLogger &log)
Definition: kicadtypes.cpp:452
bool fill
Definition: kicadtypes.h:299
QPointF end
Definition: kicadtypes.h:297
QPointF center
Definition: kicadtypes.h:296
Represents a KiCad graphical line.
Definition: kicadtypes.h:255
qreal width
Definition: kicadtypes.h:261
QPointF start
Definition: kicadtypes.h:259
QPointF end
Definition: kicadtypes.h:260
static KiCadGraphicalLine parse(const SExpression &node, MessageLogger &log)
Definition: kicadtypes.cpp:425
Represents a KiCad graphical polygon.
Definition: kicadtypes.h:312
QList< QPointF > coordinates
Definition: kicadtypes.h:316
qreal width
Definition: kicadtypes.h:317
static KiCadGraphicalPolygon parse(const SExpression &node, MessageLogger &log)
Definition: kicadtypes.cpp:468
bool fill
Definition: kicadtypes.h:318
Represents a KiCad property.
Definition: kicadtypes.h:229
bool mirror
Definition: kicadtypes.h:241
QString value
Definition: kicadtypes.h:234
qreal rotation
Definition: kicadtypes.h:236
bool hide
Definition: kicadtypes.h:243
bool unlocked
Definition: kicadtypes.h:242
static KiCadProperty parse(const SExpression &node, MessageLogger &log)
Definition: kicadtypes.cpp:389
Qt::Alignment alignment
Definition: kicadtypes.h:240
QString key
Definition: kicadtypes.h:233
QPointF position
Definition: kicadtypes.h:235
QSizeF fontSize
Definition: kicadtypes.h:238
QString layer
Definition: kicadtypes.h:237
qreal fontThickness
Definition: kicadtypes.h:239
Represents a KiCad symbol arc.
Definition: kicadtypes.h:353
KiCadSymbolFillType fillType
Definition: kicadtypes.h:362
static KiCadSymbolArc parse(const SExpression &node, MessageLogger &log)
Definition: kicadtypes.cpp:523
QPointF start
Definition: kicadtypes.h:357
QPointF mid
Definition: kicadtypes.h:358
qreal strokeWidth
Definition: kicadtypes.h:360
KiCadStrokeType strokeType
Definition: kicadtypes.h:361
QPointF end
Definition: kicadtypes.h:359
Represents a KiCad symbol circle.
Definition: kicadtypes.h:374
qreal radius
Definition: kicadtypes.h:379
KiCadSymbolFillType fillType
Definition: kicadtypes.h:382
qreal strokeWidth
Definition: kicadtypes.h:380
KiCadStrokeType strokeType
Definition: kicadtypes.h:381
static KiCadSymbolCircle parse(const SExpression &node, MessageLogger &log)
Definition: kicadtypes.cpp:539
QPointF center
Definition: kicadtypes.h:378
Represents a KiCad symbol gate.
Definition: kicadtypes.h:477
QList< KiCadSymbolPolyline > polylines
Definition: kicadtypes.h:489
static KiCadSymbolGate parse(const SExpression &node, MessageLogger &log)
Definition: kicadtypes.cpp:629
Style style
Definition: kicadtypes.h:485
QList< KiCadSymbolArc > arcs
Definition: kicadtypes.h:486
int index
Definition: kicadtypes.h:484
QList< KiCadSymbolText > texts
Definition: kicadtypes.h:490
QList< KiCadSymbolRectangle > rectangles
Definition: kicadtypes.h:488
QString name
Definition: kicadtypes.h:483
QList< KiCadSymbolCircle > circles
Definition: kicadtypes.h:487
QList< KiCadSymbolPin > pins
Definition: kicadtypes.h:491
Style
Definition: kicadtypes.h:481
Represents a KiCad symbol.
Definition: kicadtypes.h:503
QString extends
Definition: kicadtypes.h:508
QList< KiCadSymbolGate > gates
Definition: kicadtypes.h:516
qreal pinNamesOffset
Definition: kicadtypes.h:509
bool excludeFromSim
Definition: kicadtypes.h:512
bool onBoard
Definition: kicadtypes.h:514
bool hidePinNames
Definition: kicadtypes.h:511
static KiCadSymbol parse(const SExpression &node, MessageLogger &log)
Definition: kicadtypes.cpp:677
bool inBom
Definition: kicadtypes.h:513
bool hidePinNumbers
Definition: kicadtypes.h:510
QString name
Definition: kicadtypes.h:507
QList< KiCadProperty > properties
Definition: kicadtypes.h:515
Represents the content of a *.kicad_sym file.
Definition: kicadtypes.h:528
QString generator
Definition: kicadtypes.h:533
QList< KiCadSymbol > symbols
Definition: kicadtypes.h:534
int version
Definition: kicadtypes.h:532
static KiCadSymbolLibrary parse(const SExpression &node, MessageLogger &log)
Definition: kicadtypes.cpp:714
Represents a KiCad symbol pin.
Definition: kicadtypes.h:455
qreal rotation
Definition: kicadtypes.h:462
qreal length
Definition: kicadtypes.h:463
KiCadPinType type
Definition: kicadtypes.h:459
static KiCadSymbolPin parse(const SExpression &node, MessageLogger &log)
Definition: kicadtypes.cpp:610
QString number
Definition: kicadtypes.h:465
QPointF position
Definition: kicadtypes.h:461
QString name
Definition: kicadtypes.h:464
KiCadPinStyle shape
Definition: kicadtypes.h:460
Represents a KiCad symbol polyline.
Definition: kicadtypes.h:415
KiCadSymbolFillType fillType
Definition: kicadtypes.h:422
QList< QPointF > coordinates
Definition: kicadtypes.h:419
qreal strokeWidth
Definition: kicadtypes.h:420
KiCadStrokeType strokeType
Definition: kicadtypes.h:421
static KiCadSymbolPolyline parse(const SExpression &node, MessageLogger &log)
Definition: kicadtypes.cpp:569
Represents a KiCad symbol rectangle.
Definition: kicadtypes.h:394
KiCadSymbolFillType fillType
Definition: kicadtypes.h:402
static KiCadSymbolRectangle parse(const SExpression &node, MessageLogger &log)
Definition: kicadtypes.cpp:554
QPointF start
Definition: kicadtypes.h:398
qreal strokeWidth
Definition: kicadtypes.h:400
KiCadStrokeType strokeType
Definition: kicadtypes.h:401
QPointF end
Definition: kicadtypes.h:399
Represents a KiCad symbol text.
Definition: kicadtypes.h:434
qreal rotation
Definition: kicadtypes.h:440
QString text
Definition: kicadtypes.h:438
Qt::Alignment alignment
Definition: kicadtypes.h:443
QPointF position
Definition: kicadtypes.h:439
QSizeF fontSize
Definition: kicadtypes.h:441
static KiCadSymbolText parse(const SExpression &node, MessageLogger &log)
Definition: kicadtypes.cpp:585
qreal fontThickness
Definition: kicadtypes.h:442
Represents a KiCad zone.
Definition: kicadtypes.h:331
bool keepOutCopperPour
Definition: kicadtypes.h:339
bool keepOutTracks
Definition: kicadtypes.h:336
bool keepOutVias
Definition: kicadtypes.h:337
QList< KiCadLayer > layers
Definition: kicadtypes.h:335
bool keepOutFootprints
Definition: kicadtypes.h:340
QList< QPointF > polygon
Definition: kicadtypes.h:341
bool keepOutPads
Definition: kicadtypes.h:338
static KiCadZone parse(const SExpression &node, MessageLogger &log)
Definition: kicadtypes.cpp:485