LibrePCB Developers Documentation
board3doutputjob.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_BOARD3DOUTPUTJOB_H
21#define LIBREPCB_CORE_BOARD3DOUTPUTJOB_H
22
23/*******************************************************************************
24 * Includes
25 ******************************************************************************/
26#include "outputjob.h"
27
28#include <QtCore>
29#include <QtGui>
30
31/*******************************************************************************
32 * Namespace / Forward Declarations
33 ******************************************************************************/
34namespace librepcb {
35
36/*******************************************************************************
37 * Class Board3DOutputJob
38 ******************************************************************************/
39
43class Board3DOutputJob final : public OutputJob {
44 Q_DECLARE_TR_FUNCTIONS(Board3DOutputJob)
45
46public:
49
50 // Constructors / Destructor
51 Board3DOutputJob() noexcept;
52 Board3DOutputJob(const Board3DOutputJob& other) noexcept;
53 explicit Board3DOutputJob(const SExpression& node);
54 virtual ~Board3DOutputJob() noexcept;
55
56 // Getters
57 virtual QString getTypeTr() const noexcept override;
58 virtual QIcon getTypeIcon() const noexcept override;
59 const BoardSet& getBoards() const noexcept { return mBoards; }
60 const AssemblyVariantSet& getAssemblyVariants() const noexcept {
61 return mAssemblyVariants;
62 }
63 const QString& getOutputPath() const noexcept { return mOutputPath; }
64
65 // Setters
66 void setBoards(const BoardSet& boards) noexcept;
67 void setAssemblyVariants(const AssemblyVariantSet& avs) noexcept;
68 void setOutputPath(const QString& path) noexcept;
69
70 // General Methods
71 static QString getTypeName() noexcept { return "3d_model"; }
72 static QString getTypeTrStatic() noexcept {
73 return tr("3D Model") % " (*.step)";
74 }
75 virtual std::shared_ptr<OutputJob> cloneShared() const noexcept override;
76
77 // Operator Overloadings
78 Board3DOutputJob& operator=(const Board3DOutputJob& rhs) = delete;
79
80protected: // Methods
81 virtual void serializeDerived(SExpression& root) const override;
82 virtual bool equals(const OutputJob& rhs) const noexcept override;
83
84private: // Data
87 QString mOutputPath;
88};
89
90/*******************************************************************************
91 * End of File
92 ******************************************************************************/
93
94} // namespace librepcb
95
96#endif
3D board model output job
Definition: board3doutputjob.h:43
BoardSet mBoards
Definition: board3doutputjob.h:85
virtual QString getTypeTr() const noexcept override
Definition: board3doutputjob.cpp:66
void setOutputPath(const QString &path) noexcept
Definition: board3doutputjob.cpp:93
virtual bool equals(const OutputJob &rhs) const noexcept override
Definition: board3doutputjob.cpp:121
static QString getTypeName() noexcept
Definition: board3doutputjob.h:71
const AssemblyVariantSet & getAssemblyVariants() const noexcept
Definition: board3doutputjob.h:60
static QString getTypeTrStatic() noexcept
Definition: board3doutputjob.h:72
QString mOutputPath
Definition: board3doutputjob.h:87
void setAssemblyVariants(const AssemblyVariantSet &avs) noexcept
Definition: board3doutputjob.cpp:85
ObjectSet< tl::optional< Uuid > > AssemblyVariantSet
Definition: board3doutputjob.h:48
Board3DOutputJob() noexcept
Definition: board3doutputjob.cpp:37
const BoardSet & getBoards() const noexcept
Definition: board3doutputjob.h:59
virtual QIcon getTypeIcon() const noexcept override
Definition: board3doutputjob.cpp:70
virtual void serializeDerived(SExpression &root) const override
Definition: board3doutputjob.cpp:112
ObjectSet< Uuid > BoardSet
Definition: board3doutputjob.h:47
const QString & getOutputPath() const noexcept
Definition: board3doutputjob.h:63
virtual std::shared_ptr< OutputJob > cloneShared() const noexcept override
Definition: board3doutputjob.cpp:104
AssemblyVariantSet mAssemblyVariants
Definition: board3doutputjob.h:86
void setBoards(const BoardSet &boards) noexcept
Definition: board3doutputjob.cpp:78
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