LibrePCB Developers Documentation
netlistoutputjob.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_NETLISTOUTPUTJOB_H
21#define LIBREPCB_CORE_NETLISTOUTPUTJOB_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 NetlistOutputJob
38 ******************************************************************************/
39
43class NetlistOutputJob final : public OutputJob {
44 Q_DECLARE_TR_FUNCTIONS(NetlistOutputJob)
45
46public:
48
49 // Constructors / Destructor
50 NetlistOutputJob() noexcept;
51 NetlistOutputJob(const NetlistOutputJob& other) noexcept;
52 explicit NetlistOutputJob(const SExpression& node);
53 virtual ~NetlistOutputJob() noexcept;
54
55 // Getters
56 virtual QString getTypeTr() const noexcept override;
57 virtual QIcon getTypeIcon() const noexcept override;
58 const BoardSet& getBoards() const noexcept { return mBoards; }
59 const QString& getOutputPath() const noexcept { return mOutputPath; }
60
61 // Setters
62 void setBoards(const BoardSet& boards) noexcept;
63 void setOutputPath(const QString& path) noexcept;
64
65 // General Methods
66 static QString getTypeName() noexcept { return "netlist"; }
67 static QString getTypeTrStatic() noexcept {
68 return tr("Netlist") % " (*.d356)";
69 }
70 virtual std::shared_ptr<OutputJob> cloneShared() const noexcept override;
71
72 // Operator Overloadings
73 NetlistOutputJob& operator=(const NetlistOutputJob& rhs) = delete;
74
75protected: // Methods
76 virtual void serializeDerived(SExpression& root) const override;
77 virtual bool equals(const OutputJob& rhs) const noexcept override;
78
79private: // Data
81 QString mOutputPath;
82};
83
84/*******************************************************************************
85 * End of File
86 ******************************************************************************/
87
88} // namespace librepcb
89
90#endif
Netlist output job.
Definition: netlistoutputjob.h:43
BoardSet mBoards
Definition: netlistoutputjob.h:80
virtual QString getTypeTr() const noexcept override
Definition: netlistoutputjob.cpp:61
void setOutputPath(const QString &path) noexcept
Definition: netlistoutputjob.cpp:80
virtual bool equals(const OutputJob &rhs) const noexcept override
Definition: netlistoutputjob.cpp:106
static QString getTypeName() noexcept
Definition: netlistoutputjob.h:66
static QString getTypeTrStatic() noexcept
Definition: netlistoutputjob.h:67
QString mOutputPath
Definition: netlistoutputjob.h:81
const BoardSet & getBoards() const noexcept
Definition: netlistoutputjob.h:58
virtual QIcon getTypeIcon() const noexcept override
Definition: netlistoutputjob.cpp:65
virtual void serializeDerived(SExpression &root) const override
Definition: netlistoutputjob.cpp:99
ObjectSet< Uuid > BoardSet
Definition: netlistoutputjob.h:47
const QString & getOutputPath() const noexcept
Definition: netlistoutputjob.h:59
virtual std::shared_ptr< OutputJob > cloneShared() const noexcept override
Definition: netlistoutputjob.cpp:91
NetlistOutputJob() noexcept
Definition: netlistoutputjob.cpp:37
void setBoards(const BoardSet &boards) noexcept
Definition: netlistoutputjob.cpp:73
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