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"
82 std::optional<UnsignedRatio>
scale;
94 QMap<QString, QList<SExpression>>
options;
113 boards(BoardSet::set({std::nullopt})),
116 QSet<QString> enabledLayers;
119 title = tr(
"Schematic");
120 boards = BoardSet::set({std::nullopt});
140 title = tr(
"Assembly Top");
143 title = tr(
"Assembly Bottom");
149 boards = BoardSet::onlyDefault();
188 GraphicsExportSettings defaultSettings;
189 foreach (
const auto& pair, defaultSettings.getColors()) {
190 if (enabledLayers.contains(pair.first)) {
191 layers.insert(pair.first, pair.second);
198 return (
type == rhs.type)
199 && (
title == rhs.title)
208 && (
scale == rhs.scale)
220 return !(*
this == rhs);
230 virtual QString
getTypeTr() const noexcept override;
231 virtual QIcon
getTypeIcon() const noexcept override;
240 void setContent(
const QList<Content>& content)
noexcept;
246 virtual std::shared_ptr<OutputJob>
cloneShared() const noexcept override;
Orientation
Definition graphicsexportsettings.h:54
PDF/Image output job.
Definition graphicsoutputjob.h:49
QList< Content > mContent
Definition graphicsoutputjob.h:262
SimpleString mDocumentTitle
Definition graphicsoutputjob.h:261
virtual QString getTypeTr() const noexcept override
Definition graphicsoutputjob.cpp:137
void setOutputPath(const QString &path) noexcept
Definition graphicsoutputjob.cpp:169
ObjectSet< std::optional< Uuid > > BoardSet
Definition graphicsoutputjob.h:53
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:244
const SimpleString & getDocumentTitle() const noexcept
Definition graphicsoutputjob.h:232
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:245
QString mOutputPath
Definition graphicsoutputjob.h:263
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:236
ObjectSet< std::optional< Uuid > > AssemblyVariantSet
Definition graphicsoutputjob.h:54
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:235
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
Definition occmodel.cpp:76
type_safe::constrained_type< Length, UnsignedLengthConstraint, UnsignedLengthVerifier > UnsignedLength
Definition length.h:694
type_safe::constrained_type< QString, SimpleStringConstraint, SimpleStringVerifier > SimpleString
Definition simplestring.h:79
Definition graphicsoutputjob.h:56
bool mirror
Definition graphicsoutputjob.h:81
Type
Definition graphicsoutputjob.h:65
QMap< QString, QList< SExpression > > options
Definition graphicsoutputjob.h:94
bool rotate
Definition graphicsoutputjob.h:80
UnsignedLength marginBottom
Definition graphicsoutputjob.h:79
bool monochrome
Definition graphicsoutputjob.h:84
std::optional< QString > pageSizeKey
Definition graphicsoutputjob.h:74
QColor backgroundColor
Definition graphicsoutputjob.h:85
UnsignedLength minLineWidth
Definition graphicsoutputjob.h:86
std::optional< UnsignedRatio > scale
Definition graphicsoutputjob.h:82
AssemblyVariantSet assemblyVariants
Definition graphicsoutputjob.h:89
Content(Preset preset) noexcept
Definition graphicsoutputjob.h:96
Content(const Content &other)=default
uint pixmapDpi
Definition graphicsoutputjob.h:83
bool operator==(const Content &rhs) const noexcept
Definition graphicsoutputjob.h:197
UnsignedLength marginTop
Definition graphicsoutputjob.h:77
Content & operator=(const Content &rhs)=default
UnsignedLength marginLeft
Definition graphicsoutputjob.h:76
QString title
Definition graphicsoutputjob.h:73
bool operator!=(const Content &rhs) const noexcept
Definition graphicsoutputjob.h:219
Type type
Definition graphicsoutputjob.h:72
GraphicsExportSettings::Orientation orientation
Definition graphicsoutputjob.h:75
QMap< QString, QColor > layers
Definition graphicsoutputjob.h:87
Preset
Definition graphicsoutputjob.h:58
BoardSet boards
Definition graphicsoutputjob.h:88
UnsignedLength marginRight
Definition graphicsoutputjob.h:78
Definition outputjob.h:65
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