LibrePCB Developers Documentation
projectsetupdialog.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_PROJECTSETUPDIALOG_H
21#define LIBREPCB_EDITOR_PROJECTSETUPDIALOG_H
22
23/*******************************************************************************
24 * Includes
25 ******************************************************************************/
27
28#include <QtCore>
29#include <QtWidgets>
30
31/*******************************************************************************
32 * Namespace / Forward Declarations
33 ******************************************************************************/
34namespace librepcb {
35
36class Project;
37
38namespace editor {
39
40class UndoStack;
41
42namespace Ui {
43class ProjectSetupDialog;
44}
45
46/*******************************************************************************
47 * Class ProjectSetupDialog
48 ******************************************************************************/
49
53class ProjectSetupDialog final : public QDialog {
54 Q_OBJECT
55
56public:
57 // Constructors / Destructor
59 ProjectSetupDialog(const ProjectSetupDialog& other) = delete;
60 ProjectSetupDialog(Project& project, UndoStack& undoStack,
61 const QString& settingsPrefix,
62 QWidget* parent = nullptr) noexcept;
64
65 // Operator Overloadings
66 ProjectSetupDialog& operator=(const ProjectSetupDialog& rhs) = delete;
67
68private: // Methods
69 void buttonBoxClicked(QAbstractButton* button);
70 void load() noexcept;
71 bool apply() noexcept;
72
73private: // Date
76 const QString mSettingsPrefix;
78 QScopedPointer<Ui::ProjectSetupDialog> mUi;
79};
80
81/*******************************************************************************
82 * End of File
83 ******************************************************************************/
84
85} // namespace editor
86} // namespace librepcb
87
88#endif
The Project class represents a whole (opened) project with all its content.
Definition: project.h:71
The ProjectSetupDialog class.
Definition: projectsetupdialog.h:53
void buttonBoxClicked(QAbstractButton *button)
Definition: projectsetupdialog.cpp:202
const QString mSettingsPrefix
Definition: projectsetupdialog.h:76
UndoStack & mUndoStack
Definition: projectsetupdialog.h:75
bool apply() noexcept
Definition: projectsetupdialog.cpp:253
Project & mProject
Definition: projectsetupdialog.h:74
ProjectSetupDialog(const ProjectSetupDialog &other)=delete
QScopedPointer< Ui::ProjectSetupDialog > mUi
Definition: projectsetupdialog.h:78
void load() noexcept
Definition: projectsetupdialog.cpp:221
AttributeList mAttributes
Definition: projectsetupdialog.h:77
The UndoStack class holds UndoCommand objects and provides undo/redo commands.
Definition: undostack.h:106
Definition: occmodel.cpp:77