20#ifndef LIBREPCB_CORE_GRAPHICSOUTPUTJOB_H
21#define LIBREPCB_CORE_GRAPHICSOUTPUTJOB_H
26#include "../export/graphicsexportsettings.h"
27#include "../types/simplestring.h"
28#include "../workspace/theme.h"
31#include <optional/tl/optional.hpp>
83 tl::optional<UnsignedRatio>
scale;
95 QMap<QString, QList<SExpression>>
options;
117 QSet<QString> enabledLayers;
120 title = tr(
"Schematic");
141 title = tr(
"Assembly Top");
144 title = tr(
"Assembly Bottom");
189 GraphicsExportSettings defaultSettings;
190 foreach (
const auto& pair, defaultSettings.getColors()) {
191 if (enabledLayers.contains(pair.first)) {
192 layers.insert(pair.first, pair.second);
199 return (
type == rhs.type)
200 && (
title == rhs.title)
209 && (
scale == rhs.scale)
221 return !(*
this == rhs);
231 virtual QString
getTypeTr() const noexcept override;
232 virtual QIcon
getTypeIcon() const noexcept override;
241 void setContent(
const QList<Content>& content)
noexcept;
247 virtual std::shared_ptr<OutputJob>
cloneShared() const noexcept override;
The Board class represents a PCB of a project and is always part of a circuit.
Definition: board.h:73
Orientation
Definition: graphicsexportsettings.h:54
PDF/Image output job.
Definition: graphicsoutputjob.h:50
QList< Content > mContent
Definition: graphicsoutputjob.h:263
SimpleString mDocumentTitle
Definition: graphicsoutputjob.h:262
virtual QString getTypeTr() const noexcept override
Definition: graphicsoutputjob.cpp:137
void setOutputPath(const QString &path) noexcept
Definition: graphicsoutputjob.cpp:169
virtual bool equals(const OutputJob &rhs) const noexcept override
Definition: graphicsoutputjob.cpp:261
void setContent(const QList< Content > &content) noexcept
Definition: graphicsoutputjob.cpp:162
static QString getTypeName() noexcept
Definition: graphicsoutputjob.h:245
const SimpleString & getDocumentTitle() const noexcept
Definition: graphicsoutputjob.h:233
static std::shared_ptr< GraphicsOutputJob > boardAssemblyPdf() noexcept
Definition: graphicsoutputjob.cpp:198
virtual ~GraphicsOutputJob() noexcept
Definition: graphicsoutputjob.cpp:130
static QString getTypeTrStatic() noexcept
Definition: graphicsoutputjob.h:246
QString mOutputPath
Definition: graphicsoutputjob.h:264
virtual QIcon getTypeIcon() const noexcept override
Definition: graphicsoutputjob.cpp:141
virtual void serializeDerived(SExpression &root) const override
Definition: graphicsoutputjob.cpp:212
const QString & getOutputPath() const noexcept
Definition: graphicsoutputjob.h:237
virtual std::shared_ptr< OutputJob > cloneShared() const noexcept override
Definition: graphicsoutputjob.cpp:180
GraphicsOutputJob() noexcept
Definition: graphicsoutputjob.cpp:70
void setDocumentTitle(const SimpleString &title) noexcept
Definition: graphicsoutputjob.cpp:155
const QList< Content > getContent() const noexcept
Definition: graphicsoutputjob.h:236
static std::shared_ptr< GraphicsOutputJob > schematicPdf() noexcept
Definition: graphicsoutputjob.cpp:188
Base class for all output job types.
Definition: outputjob.h:50
The SExpression class.
Definition: sexpression.h:69
The Schematic class represents one schematic page of a project and is always part of a circuit.
Definition: schematic.h:74
Definition: occmodel.cpp:77
type_safe::constrained_type< Length, UnsignedLengthConstraint, UnsignedLengthVerifier > UnsignedLength
Definition: length.h:696
type_safe::constrained_type< QString, SimpleStringConstraint, SimpleStringVerifier > SimpleString
Definition: simplestring.h:80
Definition: graphicsoutputjob.h:57
bool mirror
Definition: graphicsoutputjob.h:82
tl::optional< QString > pageSizeKey
Definition: graphicsoutputjob.h:75
Type
Definition: graphicsoutputjob.h:66
QMap< QString, QList< SExpression > > options
Definition: graphicsoutputjob.h:95
bool rotate
Definition: graphicsoutputjob.h:81
UnsignedLength marginBottom
Definition: graphicsoutputjob.h:80
bool monochrome
Definition: graphicsoutputjob.h:85
QColor backgroundColor
Definition: graphicsoutputjob.h:86
UnsignedLength minLineWidth
Definition: graphicsoutputjob.h:87
AssemblyVariantSet assemblyVariants
Definition: graphicsoutputjob.h:90
Content(Preset preset) noexcept
Definition: graphicsoutputjob.h:97
Content(const Content &other)=default
uint pixmapDpi
Definition: graphicsoutputjob.h:84
bool operator==(const Content &rhs) const noexcept
Definition: graphicsoutputjob.h:198
UnsignedLength marginTop
Definition: graphicsoutputjob.h:78
Content & operator=(const Content &rhs)=default
UnsignedLength marginLeft
Definition: graphicsoutputjob.h:77
QString title
Definition: graphicsoutputjob.h:74
bool operator!=(const Content &rhs) const noexcept
Definition: graphicsoutputjob.h:220
Type type
Definition: graphicsoutputjob.h:73
tl::optional< UnsignedRatio > scale
Definition: graphicsoutputjob.h:83
GraphicsExportSettings::Orientation orientation
Definition: graphicsoutputjob.h:76
QMap< QString, QColor > layers
Definition: graphicsoutputjob.h:88
Preset
Definition: graphicsoutputjob.h:59
BoardSet boards
Definition: graphicsoutputjob.h:89
UnsignedLength marginRight
Definition: graphicsoutputjob.h:79
Definition: outputjob.h:65
static ObjectSet set(const QSet< T > &set) noexcept
Definition: outputjob.h:113
static ObjectSet onlyDefault() noexcept
Definition: outputjob.h:110
static constexpr const char * sBoardPlatedCutouts
Definition: theme.h:86
static constexpr const char * sSchematicPinNumbers
Definition: theme.h:78
static constexpr const char * sBoardCopperTop
Definition: theme.h:123
static constexpr const char * sSchematicComments
Definition: theme.h:67
static constexpr const char * sBoardGrabAreasTop
Definition: theme.h:109
static constexpr const char * sSchematicGrabAreas
Definition: theme.h:70
static constexpr const char * sBoardDocumentationBot
Definition: theme.h:104
static constexpr const char * sBoardValuesTop
Definition: theme.h:99
static constexpr const char * sSchematicDocumentation
Definition: theme.h:66
static constexpr const char * sBoardDocumentationTop
Definition: theme.h:103
static constexpr const char * sSchematicPinNames
Definition: theme.h:77
static constexpr const char * sSchematicPinLines
Definition: theme.h:76
static constexpr const char * sBoardDocumentation
Definition: theme.h:94
static constexpr const char * sBoardValuesBot
Definition: theme.h:100
static constexpr const char * sSchematicNames
Definition: theme.h:72
static constexpr const char * sBoardNamesTop
Definition: theme.h:97
static constexpr const char * sBoardMeasures
Definition: theme.h:92
static constexpr const char * sBoardGrabAreasBot
Definition: theme.h:110
static constexpr const char * sBoardNamesBot
Definition: theme.h:98
static constexpr const char * sBoardPads
Definition: theme.h:88
static constexpr const char * sSchematicNetLabels
Definition: theme.h:64
static constexpr const char * sBoardVias
Definition: theme.h:89
static constexpr const char * sSchematicGuide
Definition: theme.h:68
static constexpr const char * sBoardFrames
Definition: theme.h:84
static constexpr const char * sBoardComments
Definition: theme.h:95
static constexpr const char * sBoardGuide
Definition: theme.h:96
static constexpr const char * sBoardLegendTop
Definition: theme.h:101
static constexpr const char * sBoardOutlines
Definition: theme.h:85
static constexpr const char * sBoardLegendBot
Definition: theme.h:102
static constexpr const char * sSchematicOutlines
Definition: theme.h:69
static constexpr const char * sSchematicFrames
Definition: theme.h:62
static constexpr const char * sSchematicValues
Definition: theme.h:73
static constexpr const char * sBoardCopperBot
Definition: theme.h:125
static constexpr const char * sBoardHoles
Definition: theme.h:87
static constexpr const char * sSchematicWires
Definition: theme.h:63