LibrePCB Developers Documentation
Loading...
Searching...
No Matches
boardsetupdialog.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_BOARDSETUPDIALOG_H
21#define LIBREPCB_EDITOR_BOARDSETUPDIALOG_H
22
23/*******************************************************************************
24 * Includes
25 ******************************************************************************/
27
28#include <QtCore>
29#include <QtWidgets>
30
31/*******************************************************************************
32 * Namespace / Forward Declarations
33 ******************************************************************************/
34namespace librepcb {
35
36class Board;
37class Layer;
38
39namespace editor {
40
41class GuiApplication;
42class UndoStack;
43
44namespace Ui {
45class BoardSetupDialog;
46}
47
48/*******************************************************************************
49 * Class BoardSetupDialog
50 ******************************************************************************/
51
55class BoardSetupDialog final : public QDialog {
56 Q_OBJECT
57
58public:
59 // Constructors / Destructor
60 BoardSetupDialog() = delete;
61 BoardSetupDialog(const BoardSetupDialog& other) = delete;
62 BoardSetupDialog(GuiApplication& app, Board& board, UndoStack& undoStack,
63 QWidget* parent = 0) noexcept;
65
66 // General Methods
67 void openDrcSettingsTab() noexcept;
68 void hideOtherTabs() noexcept;
69
70 // Operator Overloadings
71 BoardSetupDialog& operator=(const BoardSetupDialog& rhs) = delete;
72
73private: // Methods
74 void buttonBoxClicked(QAbstractButton* button);
75 void load() noexcept;
76 void loadDrcSources(
77 const BoardDesignRuleCheckSettings::SourceSet& set) noexcept;
78 void loadDrcSettings(const BoardDesignRuleCheckSettings& s) noexcept;
79 void loadDrcSettingsPreset() noexcept;
80 void loadDrcSettingsPreset(const Uuid& orgUuid, const Uuid& druUuid) noexcept;
81 bool apply() noexcept;
82 QVector<const Layer*> getTopSilkscreenLayers() const noexcept;
83 QVector<const Layer*> getBotSilkscreenLayers() const noexcept;
84
85private: // Date
89 QScopedPointer<Ui::BoardSetupDialog> mUi;
90
92
93 static const QString sSettingsPrefix;
94};
95
96/*******************************************************************************
97 * End of File
98 ******************************************************************************/
99
100} // namespace editor
101} // namespace librepcb
102
103#endif
The BoardDesignRuleCheckSettings class.
Definition boarddesignrulechecksettings.h:50
The Board class represents a PCB of a project and is always part of a circuit.
Definition board.h:74
The Layer class provides all supported geometry layers.
Definition layer.h:42
The Uuid class is a replacement for QUuid to get UUID strings without {} braces.
Definition uuid.h:56
The BoardSetupDialog class.
Definition boardsetupdialog.h:55
QVector< const Layer * > getBotSilkscreenLayers() const noexcept
Definition boardsetupdialog.cpp:637
void loadDrcSettings(const BoardDesignRuleCheckSettings &s) noexcept
Definition boardsetupdialog.cpp:420
void buttonBoxClicked(QAbstractButton *button)
Definition boardsetupdialog.cpp:299
static const QString sSettingsPrefix
Definition boardsetupdialog.h:93
Board & mBoard
Definition boardsetupdialog.h:87
void hideOtherTabs() noexcept
Definition boardsetupdialog.cpp:288
UndoStack & mUndoStack
Definition boardsetupdialog.h:88
bool apply() noexcept
Definition boardsetupdialog.cpp:537
void loadDrcSettingsPreset() noexcept
Definition boardsetupdialog.cpp:448
void load() noexcept
Definition boardsetupdialog.cpp:318
QVector< const Layer * > getTopSilkscreenLayers() const noexcept
Definition boardsetupdialog.cpp:622
void openDrcSettingsTab() noexcept
Definition boardsetupdialog.cpp:284
BoardDesignRuleCheckSettings::SourceSet mDrcSources
Definition boardsetupdialog.h:91
QScopedPointer< Ui::BoardSetupDialog > mUi
Definition boardsetupdialog.h:89
BoardSetupDialog(const BoardSetupDialog &other)=delete
void loadDrcSources(const BoardDesignRuleCheckSettings::SourceSet &set) noexcept
Definition boardsetupdialog.cpp:372
GuiApplication & mApp
Definition boardsetupdialog.h:86
The GuiApplication class.
Definition guiapplication.h:75
The UndoStack class holds UndoCommand objects and provides undo/redo commands.
Definition undostack.h:106
Definition occmodel.cpp:77