LibrePCB Developers Documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
InteractiveHtmlBom Class Referencefinal

Zip file reader. More...

#include <interactivehtmlbom.h>

+ Collaboration diagram for InteractiveHtmlBom:

Classes

struct  Pad
 

Public Types

enum class  ViewMode
 
enum class  HighlightPin1Mode
 
enum class  Layer
 
enum class  Sides
 
enum class  DrawingKind
 
enum class  DrawingLayer
 

Public Member Functions

 InteractiveHtmlBom ()=delete
 
 InteractiveHtmlBom (const InteractiveHtmlBom &other)=delete
 
InteractiveHtmlBomoperator= (const InteractiveHtmlBom &rhs)=delete
 
 InteractiveHtmlBom (const QString &title, const QString &company, const QString &revision, const QString &date, const Point &topLeft, const Point &bottomRight)
 Constructor.
 
void setViewConfig (ViewMode mode, HighlightPin1Mode highlightPin1, bool dark) noexcept
 Set view configuration.
 
void setBoardRotation (const Angle &angle, bool offsetBack) noexcept
 Set board rotation.
 
void setShowSilkscreen (bool show) noexcept
 Set silkscreen visibility.
 
void setShowFabrication (bool show) noexcept
 Set fabrication visibility.
 
void setShowPads (bool show) noexcept
 Set pads visibility.
 
void setCheckBoxes (const QStringList &names) noexcept
 Set the BOM checkbox columns.
 
void setFields (const QStringList &fields) noexcept
 Set the fields of BOM lines.
 
void addDrawing (DrawingKind kind, DrawingLayer layer, const Path &path, const UnsignedLength &width, bool filled) noexcept
 Add a PCB drawing.
 
void addTrack (Layer layer, const Point &start, const Point &end, const PositiveLength &width, const std::optional< QString > &netName) noexcept
 Add a track.
 
void addVia (QSet< Layer > layers, const Point &pos, const PositiveLength &diameter, const PositiveLength &drillDiameter, const std::optional< QString > &netName) noexcept
 Add via.
 
void addPlaneFragment (Layer layer, const Path &outline, const std::optional< QString > &netName) noexcept
 Add plane fragment.
 
std::size_t addFootprint (Layer layer, const Point &pos, const Angle &rot, const Point &topLeft, const Point &bottomRight, bool mount, const QStringList &fields, const QList< Pad > &pads) noexcept
 Add footprint.
 
void addBomRow (Sides sides, const QList< std::pair< QString, std::size_t > > &parts) noexcept
 Add a BOM row.
 
QString generateHtml () const
 Generate the HTML.
 

Private Attributes

RustHandle< rs::InteractiveHtmlBom > mHandle
 

Detailed Description

Zip file reader.

Note
This is just a wrapper around its Rust implementation.

Member Enumeration Documentation

◆ ViewMode

enum class ViewMode
strong
Enumerator
BomOnly 
LeftRight 
TopBottom 

◆ HighlightPin1Mode

enum class HighlightPin1Mode
strong
Enumerator
None 
Selected 
All 

◆ Layer

enum class Layer
strong
Enumerator
Top 
Bottom 

◆ Sides

enum class Sides
strong
Enumerator
Top 
Bottom 
Both 

◆ DrawingKind

enum class DrawingKind
strong
Enumerator
Polygon 
ReferenceText 
ValueText 

◆ DrawingLayer

enum class DrawingLayer
strong
Enumerator
Edge 
SilkscreenFront 
SilkscreenBack 
FabricationFront 
FabricationBack 

Constructor & Destructor Documentation

◆ InteractiveHtmlBom() [1/3]

InteractiveHtmlBom ( )
delete

◆ InteractiveHtmlBom() [2/3]

InteractiveHtmlBom ( const InteractiveHtmlBom other)
delete

◆ InteractiveHtmlBom() [3/3]

InteractiveHtmlBom ( const QString &  title,
const QString &  company,
const QString &  revision,
const QString &  date,
const Point topLeft,
const Point bottomRight 
)

Constructor.

Parameters
titleProject title
companyCompany/author name
revisionProject revision
dateExport date/time
topLeftTop left coordinate of PCB bounding box
bottomRightBottom right coordinate of PCB bounding box

Member Function Documentation

◆ operator=()

InteractiveHtmlBom & operator= ( const InteractiveHtmlBom rhs)
delete

◆ setViewConfig()

void setViewConfig ( ViewMode  mode,
HighlightPin1Mode  highlightPin1,
bool  dark 
)
noexcept

Set view configuration.

Parameters
modeView mode
highlightPin1Highlight pin-1 mode
darkDark or not
+ Here is the call graph for this function:

◆ setBoardRotation()

void setBoardRotation ( const Angle angle,
bool  offsetBack 
)
noexcept

Set board rotation.

Parameters
angleRotation angle
offsetBackOffset back side or not
+ Here is the call graph for this function:

◆ setShowSilkscreen()

void setShowSilkscreen ( bool  show)
noexcept

Set silkscreen visibility.

Parameters
showShow or not
+ Here is the call graph for this function:

◆ setShowFabrication()

void setShowFabrication ( bool  show)
noexcept

Set fabrication visibility.

Parameters
showShow or not
+ Here is the call graph for this function:

◆ setShowPads()

void setShowPads ( bool  show)
noexcept

Set pads visibility.

Parameters
showShow or not
+ Here is the call graph for this function:

◆ setCheckBoxes()

void setCheckBoxes ( const QStringList &  names)
noexcept

Set the BOM checkbox columns.

Parameters
namesCheckbox names
+ Here is the call graph for this function:

◆ setFields()

void setFields ( const QStringList &  fields)
noexcept

Set the fields of BOM lines.

Parameters
fieldsField names
+ Here is the call graph for this function:

◆ addDrawing()

void addDrawing ( DrawingKind  kind,
DrawingLayer  layer,
const Path path,
const UnsignedLength width,
bool  filled 
)
noexcept

Add a PCB drawing.

Parameters
kindDrawing kind
layerDrawing layer
pathDrawing path
widthLine width
filledFill or not the shape
+ Here is the call graph for this function:

◆ addTrack()

void addTrack ( Layer  layer,
const Point start,
const Point end,
const PositiveLength width,
const std::optional< QString > &  netName 
)
noexcept

Add a track.

Parameters
layerLayer
startStart position
endEnd position
widthWidth
netNameNet name (if any)
+ Here is the call graph for this function:

◆ addVia()

void addVia ( QSet< Layer layers,
const Point pos,
const PositiveLength diameter,
const PositiveLength drillDiameter,
const std::optional< QString > &  netName 
)
noexcept

Add via.

Parameters
layersLayers this via exists on
posPosition
diameterOuter diameter
drillDiameterDrill diameter
netNamenet name (if any)
+ Here is the call graph for this function:

◆ addPlaneFragment()

void addPlaneFragment ( Layer  layer,
const Path outline,
const std::optional< QString > &  netName 
)
noexcept

Add plane fragment.

Parameters
layerLayer
outlineOutline
netNameNet name (if any)
+ Here is the call graph for this function:

◆ addFootprint()

std::size_t addFootprint ( Layer  layer,
const Point pos,
const Angle rot,
const Point topLeft,
const Point bottomRight,
bool  mount,
const QStringList &  fields,
const QList< Pad > &  pads 
)
noexcept

Add footprint.

Parameters
layerMount layer
posPosition
rotRotation
topLeftTop left of bounding box
bottomRightBottom right of bounding box
mountWhether it will be mounted or not
fieldsField values
padsPads
Returns
Footprint ID
+ Here is the call graph for this function:

◆ addBomRow()

void addBomRow ( Sides  sides,
const QList< std::pair< QString, std::size_t > > &  parts 
)
noexcept

Add a BOM row.

Parameters
sidesBOM sides
partsParts (designators & footprint IDs)
+ Here is the call graph for this function:

◆ generateHtml()

QString generateHtml ( ) const

Generate the HTML.

Returns
HTML file content
Exceptions
Ifsome of the data is invalid
+ Here is the call graph for this function:

Member Data Documentation

◆ mHandle

RustHandle<rs::InteractiveHtmlBom> mHandle
private

The documentation for this class was generated from the following files: