LibrePCB Developers Documentation
Loading...
Searching...
No Matches
cmdorganizationedit.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_EDITOR_CMDORGANIZATIONEDIT_H
21#define LIBREPCB_EDITOR_CMDORGANIZATIONEDIT_H
22
23/*******************************************************************************
24 * Includes
25 ******************************************************************************/
27
30
31#include <QtCore>
32
33/*******************************************************************************
34 * Namespace / Forward Declarations
35 ******************************************************************************/
36namespace librepcb {
37
38class Organization;
39
40namespace editor {
41
42/*******************************************************************************
43 * Class CmdOrganizationEdit
44 ******************************************************************************/
45
50public:
51 // Constructors / Destructor
54 explicit CmdOrganizationEdit(Organization& organization) noexcept;
55 ~CmdOrganizationEdit() noexcept;
56
57 // Setters
58 void setLogoPng(const QByteArray& png) noexcept;
59 void setUrl(const QUrl& url) noexcept;
60 void setPriority(int priority) noexcept;
62 const QVector<OrganizationPcbDesignRules>& list) noexcept;
63 void setPcbOutputJobs(const OutputJobList& jobs) noexcept;
64 void setAssemblyOutputJobs(const OutputJobList& jobs) noexcept;
65
66 // Operator Overloadings
67 CmdOrganizationEdit& operator=(const CmdOrganizationEdit& rhs) = delete;
68
69private: // Methods
71 bool performExecute() override;
72
74 void performUndo() override;
75
77 void performRedo() override;
78
79private: // Data
81
82 QByteArray mOldLogo;
83 QByteArray mNewLogo;
84 QUrl mOldUrl;
85 QUrl mNewUrl;
94};
95
96/*******************************************************************************
97 * End of File
98 ******************************************************************************/
99
100} // namespace editor
101} // namespace librepcb
102
103#endif
The Organization class represents a PCB manufacturer, assembly house etc.
Definition organization.h:47
The OrganizationPcbDesignRules class.
Definition organizationpcbdesignrules.h:43
The CmdLibraryBaseElementEdit class.
Definition cmdlibrarybaseelementedit.h:45
The CmdOrganizationEdit class.
Definition cmdorganizationedit.h:49
void performRedo() override
Redo the command.
Definition cmdorganizationedit.cpp:120
void setUrl(const QUrl &url) noexcept
Definition cmdorganizationedit.cpp:68
QByteArray mNewLogo
Definition cmdorganizationedit.h:83
int mOldPriority
Definition cmdorganizationedit.h:86
QUrl mNewUrl
Definition cmdorganizationedit.h:85
void setLogoPng(const QByteArray &png) noexcept
Definition cmdorganizationedit.cpp:63
void performUndo() override
Undo the command.
Definition cmdorganizationedit.cpp:110
Organization & mOrganization
Definition cmdorganizationedit.h:80
OutputJobList mNewPcbOutputJobs
Definition cmdorganizationedit.h:91
QVector< OrganizationPcbDesignRules > mOldPcbDesignRules
Definition cmdorganizationedit.h:88
void setPcbDesignRules(const QVector< OrganizationPcbDesignRules > &list) noexcept
Definition cmdorganizationedit.cpp:78
QVector< OrganizationPcbDesignRules > mNewPcbDesignRules
Definition cmdorganizationedit.h:89
QUrl mOldUrl
Definition cmdorganizationedit.h:84
void setPcbOutputJobs(const OutputJobList &jobs) noexcept
Definition cmdorganizationedit.cpp:84
int mNewPriority
Definition cmdorganizationedit.h:87
void setPriority(int priority) noexcept
Definition cmdorganizationedit.cpp:73
OutputJobList mOldAssemblyOutputJobs
Definition cmdorganizationedit.h:92
QByteArray mOldLogo
Definition cmdorganizationedit.h:82
OutputJobList mOldPcbOutputJobs
Definition cmdorganizationedit.h:90
bool performExecute() override
Execute the command the first time.
Definition cmdorganizationedit.cpp:99
OutputJobList mNewAssemblyOutputJobs
Definition cmdorganizationedit.h:93
CmdOrganizationEdit(const CmdOrganizationEdit &other)=delete
~CmdOrganizationEdit() noexcept
Definition cmdorganizationedit.cpp:56
void setAssemblyOutputJobs(const OutputJobList &jobs) noexcept
Definition cmdorganizationedit.cpp:89
Definition occmodel.cpp:77