LibrePCB Developers Documentation
gerberexcellonoutputjob.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_CORE_GERBEREXCELLONOUTPUTJOB_H
21#define LIBREPCB_CORE_GERBEREXCELLONOUTPUTJOB_H
22
23/*******************************************************************************
24 * Includes
25 ******************************************************************************/
26#include "outputjob.h"
27
28#include <optional/tl/optional.hpp>
29
30#include <QtCore>
31#include <QtGui>
32
33#include <memory>
34
35/*******************************************************************************
36 * Namespace / Forward Declarations
37 ******************************************************************************/
38namespace librepcb {
39
40/*******************************************************************************
41 * Class GerberExcellonOutputJob
42 ******************************************************************************/
43
47class GerberExcellonOutputJob final : public OutputJob {
48 Q_DECLARE_TR_FUNCTIONS(GerberExcellonOutputJob)
49
50public:
52
53 // Constructors / Destructor
55 explicit GerberExcellonOutputJob(const SExpression& node);
56 virtual ~GerberExcellonOutputJob() noexcept;
57
58 // Getters
59 virtual QString getTypeTr() const noexcept override;
60 virtual QIcon getTypeIcon() const noexcept override;
61 const QString& getSuffixDrills() const noexcept { return mSuffixDrills; }
62 const QString& getSuffixDrillsNpth() const noexcept {
63 return mSuffixDrillsNpth;
64 }
65 const QString& getSuffixDrillsPth() const noexcept {
66 return mSuffixDrillsPth;
67 }
68 const QString& getSuffixDrillsBlindBuried() const noexcept {
70 }
71 const QString& getSuffixOutlines() const noexcept { return mSuffixOutlines; }
72 const QString& getSuffixCopperTop() const noexcept {
73 return mSuffixCopperTop;
74 }
75 const QString& getSuffixCopperInner() const noexcept {
76 return mSuffixCopperInner;
77 }
78 const QString& getSuffixCopperBot() const noexcept {
79 return mSuffixCopperBot;
80 }
81 const QString& getSuffixSolderMaskTop() const noexcept {
83 }
84 const QString& getSuffixSolderMaskBot() const noexcept {
86 }
87 const QString& getSuffixSilkscreenTop() const noexcept {
89 }
90 const QString& getSuffixSilkscreenBot() const noexcept {
92 }
93 const QString& getSuffixSolderPasteTop() const noexcept {
95 }
96 const QString& getSuffixSolderPasteBot() const noexcept {
98 }
99 bool getMergeDrillFiles() const noexcept { return mMergeDrillFiles; }
100 bool getUseG85SlotCommand() const noexcept { return mUseG85SlotCommand; }
101 bool getEnableSolderPasteTop() const noexcept {
103 }
104 bool getEnableSolderPasteBot() const noexcept {
106 }
107 const BoardSet& getBoards() const noexcept { return mBoards; }
108 const QString& getOutputPath() const noexcept { return mOutputPath; }
109
110 // Setters
111 void setSuffixDrills(const QString& s) noexcept;
112 void setSuffixDrillsNpth(const QString& s) noexcept;
113 void setSuffixDrillsPth(const QString& s) noexcept;
114 void setSuffixDrillsBlindBuried(const QString& s) noexcept;
115 void setSuffixOutlines(const QString& s) noexcept;
116 void setSuffixCopperTop(const QString& s) noexcept;
117 void setSuffixCopperInner(const QString& s) noexcept;
118 void setSuffixCopperBot(const QString& s) noexcept;
119 void setSuffixSolderMaskTop(const QString& s) noexcept;
120 void setSuffixSolderMaskBot(const QString& s) noexcept;
121 void setSuffixSilkscreenTop(const QString& s) noexcept;
122 void setSuffixSilkscreenBot(const QString& s) noexcept;
123 void setSuffixSolderPasteTop(const QString& s) noexcept;
124 void setSuffixSolderPasteBot(const QString& s) noexcept;
125 void setMergeDrillFiles(bool m) noexcept;
126 void setUseG85SlotCommand(bool u) noexcept;
127 void setEnableSolderPasteTop(bool e) noexcept;
128 void setEnableSolderPasteBot(bool e) noexcept;
129 void setBoards(const BoardSet& boards) noexcept;
130 void setOutputPath(const QString& path) noexcept;
131
132 // General Methods
133 static QString getTypeName() noexcept { return "gerber_excellon"; }
134 static QString getTypeTrStatic() noexcept { return tr("Gerber/Excellon"); }
135 virtual std::shared_ptr<OutputJob> cloneShared() const noexcept override;
136
137 // Operator Overloadings
139 delete;
140
141 // Static Methods
142 static std::shared_ptr<GerberExcellonOutputJob> defaultStyle() noexcept;
143 static std::shared_ptr<GerberExcellonOutputJob> protelStyle() noexcept;
144
145private: // Methods
146 GerberExcellonOutputJob() noexcept;
147 virtual void serializeDerived(SExpression& root) const override;
148 virtual bool equals(const OutputJob& rhs) const noexcept override;
149
150private: // Data
151 QString mSuffixDrills; // NPTH and PTH combined
154 QString mSuffixDrillsBlindBuried; // Vias (plated)
170 QString mOutputPath;
171};
172
173/*******************************************************************************
174 * End of File
175 ******************************************************************************/
176
177} // namespace librepcb
178
179#endif
Gerber/Excellon output job.
Definition: gerberexcellonoutputjob.h:47
void setEnableSolderPasteBot(bool e) noexcept
Definition: gerberexcellonoutputjob.cpp:264
const QString & getSuffixDrillsPth() const noexcept
Definition: gerberexcellonoutputjob.h:65
void setSuffixCopperInner(const QString &s) noexcept
Definition: gerberexcellonoutputjob.cpp:181
void setSuffixDrillsPth(const QString &s) noexcept
Definition: gerberexcellonoutputjob.cpp:152
bool mEnableSolderPasteBot
Definition: gerberexcellonoutputjob.h:168
QString mSuffixCopperBot
Definition: gerberexcellonoutputjob.h:158
void setSuffixSilkscreenTop(const QString &s) noexcept
Definition: gerberexcellonoutputjob.cpp:211
BoardSet mBoards
Definition: gerberexcellonoutputjob.h:169
const QString & getSuffixDrills() const noexcept
Definition: gerberexcellonoutputjob.h:61
bool getUseG85SlotCommand() const noexcept
Definition: gerberexcellonoutputjob.h:100
bool getEnableSolderPasteBot() const noexcept
Definition: gerberexcellonoutputjob.h:104
void setUseG85SlotCommand(bool u) noexcept
Definition: gerberexcellonoutputjob.cpp:250
virtual QString getTypeTr() const noexcept override
Definition: gerberexcellonoutputjob.cpp:126
const QString & getSuffixSolderMaskBot() const noexcept
Definition: gerberexcellonoutputjob.h:84
void setOutputPath(const QString &path) noexcept
Definition: gerberexcellonoutputjob.cpp:278
static std::shared_ptr< GerberExcellonOutputJob > protelStyle() noexcept
Definition: gerberexcellonoutputjob.cpp:305
void setSuffixSolderMaskBot(const QString &s) noexcept
Definition: gerberexcellonoutputjob.cpp:203
static std::shared_ptr< GerberExcellonOutputJob > defaultStyle() noexcept
Definition: gerberexcellonoutputjob.cpp:299
const QString & getSuffixDrillsNpth() const noexcept
Definition: gerberexcellonoutputjob.h:62
QString mSuffixSolderMaskBot
Definition: gerberexcellonoutputjob.h:160
QString mSuffixCopperTop
Definition: gerberexcellonoutputjob.h:156
void setSuffixSolderMaskTop(const QString &s) noexcept
Definition: gerberexcellonoutputjob.cpp:195
virtual bool equals(const OutputJob &rhs) const noexcept override
Definition: gerberexcellonoutputjob.cpp:378
bool mEnableSolderPasteTop
Definition: gerberexcellonoutputjob.h:167
void setSuffixSilkscreenBot(const QString &s) noexcept
Definition: gerberexcellonoutputjob.cpp:219
static QString getTypeName() noexcept
Definition: gerberexcellonoutputjob.h:133
void setSuffixDrillsNpth(const QString &s) noexcept
Definition: gerberexcellonoutputjob.cpp:145
QString mSuffixDrills
Definition: gerberexcellonoutputjob.h:151
const QString & getSuffixSilkscreenTop() const noexcept
Definition: gerberexcellonoutputjob.h:87
void setSuffixDrills(const QString &s) noexcept
Definition: gerberexcellonoutputjob.cpp:138
void setEnableSolderPasteTop(bool e) noexcept
Definition: gerberexcellonoutputjob.cpp:257
void setSuffixOutlines(const QString &s) noexcept
Definition: gerberexcellonoutputjob.cpp:167
QString mSuffixSolderPasteBot
Definition: gerberexcellonoutputjob.h:164
QString mSuffixSilkscreenBot
Definition: gerberexcellonoutputjob.h:162
virtual ~GerberExcellonOutputJob() noexcept
Definition: gerberexcellonoutputjob.cpp:119
QString mSuffixSilkscreenTop
Definition: gerberexcellonoutputjob.h:161
static QString getTypeTrStatic() noexcept
Definition: gerberexcellonoutputjob.h:134
QString mOutputPath
Definition: gerberexcellonoutputjob.h:170
void setSuffixDrillsBlindBuried(const QString &s) noexcept
Definition: gerberexcellonoutputjob.cpp:159
void setMergeDrillFiles(bool m) noexcept
Definition: gerberexcellonoutputjob.cpp:243
const QString & getSuffixCopperInner() const noexcept
Definition: gerberexcellonoutputjob.h:75
const QString & getSuffixCopperTop() const noexcept
Definition: gerberexcellonoutputjob.h:72
void setSuffixCopperBot(const QString &s) noexcept
Definition: gerberexcellonoutputjob.cpp:188
QString mSuffixSolderPasteTop
Definition: gerberexcellonoutputjob.h:163
QString mSuffixDrillsNpth
Definition: gerberexcellonoutputjob.h:152
const BoardSet & getBoards() const noexcept
Definition: gerberexcellonoutputjob.h:107
const QString & getSuffixSolderPasteTop() const noexcept
Definition: gerberexcellonoutputjob.h:93
QString mSuffixDrillsPth
Definition: gerberexcellonoutputjob.h:153
bool getMergeDrillFiles() const noexcept
Definition: gerberexcellonoutputjob.h:99
const QString & getSuffixDrillsBlindBuried() const noexcept
Definition: gerberexcellonoutputjob.h:68
virtual QIcon getTypeIcon() const noexcept override
Definition: gerberexcellonoutputjob.cpp:130
virtual void serializeDerived(SExpression &root) const override
Definition: gerberexcellonoutputjob.cpp:329
const QString & getSuffixSolderMaskTop() const noexcept
Definition: gerberexcellonoutputjob.h:81
ObjectSet< Uuid > BoardSet
Definition: gerberexcellonoutputjob.h:51
QString mSuffixOutlines
Definition: gerberexcellonoutputjob.h:155
const QString & getOutputPath() const noexcept
Definition: gerberexcellonoutputjob.h:108
QString mSuffixSolderMaskTop
Definition: gerberexcellonoutputjob.h:159
bool mUseG85SlotCommand
Definition: gerberexcellonoutputjob.h:166
const QString & getSuffixCopperBot() const noexcept
Definition: gerberexcellonoutputjob.h:78
void setSuffixSolderPasteBot(const QString &s) noexcept
Definition: gerberexcellonoutputjob.cpp:235
QString mSuffixCopperInner
Definition: gerberexcellonoutputjob.h:157
const QString & getSuffixSolderPasteBot() const noexcept
Definition: gerberexcellonoutputjob.h:96
virtual std::shared_ptr< OutputJob > cloneShared() const noexcept override
Definition: gerberexcellonoutputjob.cpp:289
QString mSuffixDrillsBlindBuried
Definition: gerberexcellonoutputjob.h:154
bool getEnableSolderPasteTop() const noexcept
Definition: gerberexcellonoutputjob.h:101
bool mMergeDrillFiles
Definition: gerberexcellonoutputjob.h:165
const QString & getSuffixOutlines() const noexcept
Definition: gerberexcellonoutputjob.h:71
void setSuffixSolderPasteTop(const QString &s) noexcept
Definition: gerberexcellonoutputjob.cpp:227
const QString & getSuffixSilkscreenBot() const noexcept
Definition: gerberexcellonoutputjob.h:90
void setSuffixCopperTop(const QString &s) noexcept
Definition: gerberexcellonoutputjob.cpp:174
GerberExcellonOutputJob() noexcept
Definition: gerberexcellonoutputjob.cpp:38
void setBoards(const BoardSet &boards) noexcept
Definition: gerberexcellonoutputjob.cpp:271
Base class for all output job types.
Definition: outputjob.h:50
The SExpression class.
Definition: sexpression.h:69
Definition: occmodel.cpp:77
Definition: outputjob.h:65