LibrePCB Developers Documentation
Loading...
Searching...
No Matches
symbolinstancepropertiesdialog.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_SYMBOLINSTANCEPROPERTIESDIALOG_H
21#define LIBREPCB_EDITOR_SYMBOLINSTANCEPROPERTIESDIALOG_H
22
23/*******************************************************************************
24 * Includes
25 ******************************************************************************/
27
28#include <QtCore>
29#include <QtWidgets>
30
31/*******************************************************************************
32 * Namespace / Forward Declarations
33 ******************************************************************************/
34namespace librepcb {
35
36class ComponentInstance;
37class LengthUnit;
38class Part;
39class Project;
40class SI_Symbol;
41class Workspace;
42
43namespace editor {
44
45class UndoCommand;
46class UndoStack;
47
48namespace Ui {
49class SymbolInstancePropertiesDialog;
50}
51
52/*******************************************************************************
53 * Class SymbolInstancePropertiesDialog
54 ******************************************************************************/
55
59class SymbolInstancePropertiesDialog final : public QDialog {
60 Q_OBJECT
61
62public:
63 // Constructors / Destructor
66 delete;
68 ComponentInstance& cmp, SI_Symbol& symbol,
69 UndoStack& undoStack,
70 const LengthUnit& lengthUnit,
71 const QString& settingsPrefix,
72 QWidget* parent) noexcept;
74
75 // Operator Overloadings
77 const SymbolInstancePropertiesDialog& rhs) = delete;
78
79private: // Methods
80 void setSelectedPart(std::shared_ptr<Part> part) noexcept;
81 void buttonBoxClicked(QAbstractButton* button) noexcept;
82 void accept();
83 bool applyChanges() noexcept;
84
85private: // Data
92 std::shared_ptr<Part> mSelectedPart; // Avoid dangling reference.
94};
95
96/*******************************************************************************
97 * End of File
98 ******************************************************************************/
99
100} // namespace editor
101} // namespace librepcb
102
103#endif
The ComponentInstance class.
Definition componentinstance.h:54
The LengthUnit class represents a length unit (millimeters, inches,...) and provides some useful meth...
Definition lengthunit.h:60
The Part class.
Definition part.h:46
The Project class represents a whole (opened) project with all its content.
Definition project.h:71
The SI_Symbol class.
Definition si_symbol.h:54
The Workspace class represents a workspace with all its data (library, projects, settings,...
Definition workspace.h:54
The SymbolInstancePropertiesDialog class.
Definition symbolinstancepropertiesdialog.h:59
QScopedPointer< Ui::SymbolInstancePropertiesDialog > mUi
Definition symbolinstancepropertiesdialog.h:93
~SymbolInstancePropertiesDialog() noexcept
Definition symbolinstancepropertiesdialog.cpp:155
SymbolInstancePropertiesDialog(const SymbolInstancePropertiesDialog &other)=delete
ComponentInstance & mComponentInstance
Definition symbolinstancepropertiesdialog.h:88
UndoStack & mUndoStack
Definition symbolinstancepropertiesdialog.h:90
Project & mProject
Definition symbolinstancepropertiesdialog.h:87
std::shared_ptr< Part > mSelectedPart
Definition symbolinstancepropertiesdialog.h:92
AttributeList mAttributes
Definition symbolinstancepropertiesdialog.h:91
void accept()
Definition symbolinstancepropertiesdialog.cpp:197
Workspace & mWorkspace
Definition symbolinstancepropertiesdialog.h:86
void setSelectedPart(std::shared_ptr< Part > part) noexcept
Definition symbolinstancepropertiesdialog.cpp:164
bool applyChanges() noexcept
Definition symbolinstancepropertiesdialog.cpp:203
SI_Symbol & mSymbol
Definition symbolinstancepropertiesdialog.h:89
void buttonBoxClicked(QAbstractButton *button) noexcept
Definition symbolinstancepropertiesdialog.cpp:177
The UndoStack class holds UndoCommand objects and provides undo/redo commands.
Definition undostack.h:106
Definition occmodel.cpp:76
Definition uuid.h:186