LibrePCB Developers Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
boardusersettings.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_PROJECT_BOARDUSERSETTINGS_H
21 #define LIBREPCB_PROJECT_BOARDUSERSETTINGS_H
22 
23 /*******************************************************************************
24  * Includes
25  ******************************************************************************/
27 
28 #include <QtCore>
29 
30 /*******************************************************************************
31  * Namespace / Forward Declarations
32  ******************************************************************************/
33 namespace librepcb {
34 
35 class GraphicsLayerStackAppearanceSettings;
36 
37 namespace project {
38 
39 class Board;
40 
41 /*******************************************************************************
42  * Class BoardUserSettings
43  ******************************************************************************/
44 
48 class BoardUserSettings final : public QObject, public SerializableObject {
49  Q_OBJECT
50 
51 public:
52  // Constructors / Destructor
53  BoardUserSettings() = delete;
54  BoardUserSettings(const BoardUserSettings& other) = delete;
55  explicit BoardUserSettings(Board& board) noexcept;
56  BoardUserSettings(Board& board, const BoardUserSettings& other) noexcept;
57  BoardUserSettings(Board& board, const SExpression& node);
58  ~BoardUserSettings() noexcept;
59 
60  // General Methods
61 
63  void serialize(SExpression& root) const override;
64 
65  // Operator Overloadings
66  BoardUserSettings& operator=(const BoardUserSettings& rhs) = delete;
67 
68 private: // Methods
69  // General
71  QScopedPointer<GraphicsLayerStackAppearanceSettings> mLayerSettings;
72 };
73 
74 /*******************************************************************************
75  * End of File
76  ******************************************************************************/
77 
78 } // namespace project
79 } // namespace librepcb
80 
81 #endif // LIBREPCB_PROJECT_BOARDUSERSETTINGS_H
void serialize(SExpression &root) const override
Serialize the object into an existing S-Expression node.
Definition: boardusersettings.cpp:71
Board & mBoard
Definition: boardusersettings.h:70
BoardUserSettings & operator=(const BoardUserSettings &rhs)=delete
QScopedPointer< GraphicsLayerStackAppearanceSettings > mLayerSettings
Definition: boardusersettings.h:71
The SerializableObject class is the base class for all classes which need to be serializable/deserial...
Definition: serializableobject.h:43
~BoardUserSettings() noexcept
Definition: boardusersettings.cpp:64
The BoardUserSettings class.
Definition: boardusersettings.h:48
The Board class represents a PCB of a project and is always part of a circuit.
Definition: board.h:83
The SExpression class.
Definition: sexpression.h:57