LibrePCB Developers Documentation
copyoutputjob.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_COPYOUTPUTJOB_H
21#define LIBREPCB_CORE_COPYOUTPUTJOB_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/*******************************************************************************
34 * Namespace / Forward Declarations
35 ******************************************************************************/
36namespace librepcb {
37
38/*******************************************************************************
39 * Class CopyOutputJob
40 ******************************************************************************/
41
45class CopyOutputJob final : public OutputJob {
46 Q_DECLARE_TR_FUNCTIONS(CopyOutputJob)
47
48public:
51
52 // Constructors / Destructor
53 CopyOutputJob() noexcept;
54 CopyOutputJob(const CopyOutputJob& other) noexcept;
55 explicit CopyOutputJob(const SExpression& node);
56 virtual ~CopyOutputJob() noexcept;
57
58 // Getters
59 virtual QString getTypeTr() const noexcept override;
60 virtual QIcon getTypeIcon() const noexcept override;
61 bool getSubstituteVariables() const noexcept { return mSubstituteVariables; }
62 const BoardSet& getBoards() const noexcept { return mBoards; }
63 const AssemblyVariantSet& getAssemblyVariants() const noexcept {
64 return mAssemblyVariants;
65 }
66 const QString& getInputPath() const noexcept { return mInputPath; }
67 const QString& getOutputPath() const noexcept { return mOutputPath; }
68
69 // Setters
70 void setSubstituteVariables(bool subst) noexcept;
71 void setBoards(const BoardSet& boards) noexcept;
72 void setAssemblyVariants(const AssemblyVariantSet& avs) noexcept;
73 void setInputPath(const QString& path) noexcept;
74 void setOutputPath(const QString& path) noexcept;
75
76 // General Methods
77 static QString getTypeName() noexcept { return "copy"; }
78 static QString getTypeTrStatic() noexcept { return tr("File Copy"); }
79 virtual std::shared_ptr<OutputJob> cloneShared() const noexcept override;
80
81 // Operator Overloadings
82 CopyOutputJob& operator=(const CopyOutputJob& rhs) = delete;
83
84private: // Methods
85 virtual void serializeDerived(SExpression& root) const override;
86 virtual bool equals(const OutputJob& rhs) const noexcept override;
87
88private: // Data
92 QString mInputPath;
93 QString mOutputPath;
94};
95
96/*******************************************************************************
97 * End of File
98 ******************************************************************************/
99
100} // namespace librepcb
101
102#endif
File copy output job.
Definition: copyoutputjob.h:45
const QString & getInputPath() const noexcept
Definition: copyoutputjob.h:66
bool mSubstituteVariables
Definition: copyoutputjob.h:89
BoardSet mBoards
Definition: copyoutputjob.h:90
virtual QString getTypeTr() const noexcept override
Definition: copyoutputjob.cpp:73
void setOutputPath(const QString &path) noexcept
Definition: copyoutputjob.cpp:114
CopyOutputJob() noexcept
Definition: copyoutputjob.cpp:37
virtual bool equals(const OutputJob &rhs) const noexcept override
Definition: copyoutputjob.cpp:145
static QString getTypeName() noexcept
Definition: copyoutputjob.h:77
const AssemblyVariantSet & getAssemblyVariants() const noexcept
Definition: copyoutputjob.h:63
void setSubstituteVariables(bool subst) noexcept
Definition: copyoutputjob.cpp:85
static QString getTypeTrStatic() noexcept
Definition: copyoutputjob.h:78
QString mOutputPath
Definition: copyoutputjob.h:93
void setAssemblyVariants(const AssemblyVariantSet &avs) noexcept
Definition: copyoutputjob.cpp:99
ObjectSet< tl::optional< Uuid > > AssemblyVariantSet
Definition: copyoutputjob.h:50
QString mInputPath
Definition: copyoutputjob.h:92
const BoardSet & getBoards() const noexcept
Definition: copyoutputjob.h:62
bool getSubstituteVariables() const noexcept
Definition: copyoutputjob.h:61
virtual QIcon getTypeIcon() const noexcept override
Definition: copyoutputjob.cpp:77
virtual void serializeDerived(SExpression &root) const override
Definition: copyoutputjob.cpp:133
const QString & getOutputPath() const noexcept
Definition: copyoutputjob.h:67
void setInputPath(const QString &path) noexcept
Definition: copyoutputjob.cpp:107
virtual std::shared_ptr< OutputJob > cloneShared() const noexcept override
Definition: copyoutputjob.cpp:125
ObjectSet< tl::optional< Uuid > > BoardSet
Definition: copyoutputjob.h:49
AssemblyVariantSet mAssemblyVariants
Definition: copyoutputjob.h:91
void setBoards(const BoardSet &boards) noexcept
Definition: copyoutputjob.cpp:92
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