LibrePCB Developers Documentation
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_PROJECT_SYMBOLINSTANCEPROPERTIESDIALOG_H
21 #define LIBREPCB_PROJECT_SYMBOLINSTANCEPROPERTIESDIALOG_H
22 
23 /*******************************************************************************
24  * Includes
25  ******************************************************************************/
27 
28 #include <QtCore>
29 #include <QtWidgets>
30 
31 /*******************************************************************************
32  * Namespace / Forward Declarations
33  ******************************************************************************/
34 namespace librepcb {
35 
36 class UndoStack;
37 class UndoCommand;
38 
39 namespace workspace {
40 class Workspace;
41 }
42 
43 namespace project {
44 
45 class Project;
46 class ComponentInstance;
47 class SI_Symbol;
48 
49 namespace editor {
50 
51 namespace Ui {
52 class SymbolInstancePropertiesDialog;
53 }
54 
55 /*******************************************************************************
56  * Class SymbolInstancePropertiesDialog
57  ******************************************************************************/
58 
62 class SymbolInstancePropertiesDialog final : public QDialog {
63  Q_OBJECT
64 
65 public:
66  // Constructors / Destructor
69  delete;
71  ComponentInstance& cmp, SI_Symbol& symbol,
72  UndoStack& undoStack,
73  const LengthUnit& lengthUnit,
74  const QString& settingsPrefix,
75  QWidget* parent) noexcept;
77 
78  // Operator Overloadings
80  const SymbolInstancePropertiesDialog& rhs) = delete;
81 
82 private: // Methods
83  void keyPressEvent(QKeyEvent* e);
84  void accept();
85  bool applyChanges() noexcept;
86 
87 private: // Data
94  QScopedPointer<Ui::SymbolInstancePropertiesDialog> mUi;
95 };
96 
97 /*******************************************************************************
98  * End of File
99  ******************************************************************************/
100 
101 } // namespace editor
102 } // namespace project
103 } // namespace librepcb
104 
105 #endif // LIBREPCB_PROJECT_SYMBOLINSTANCEPROPERTIESDIALOG_H
The SI_Symbol class.
Definition: si_symbol.h:57
The Workspace class represents a workspace with all its data (library, projects, settings, ...)
Definition: workspace.h:62
QScopedPointer< Ui::SymbolInstancePropertiesDialog > mUi
Definition: symbolinstancepropertiesdialog.h:94
workspace::Workspace & mWorkspace
Definition: symbolinstancepropertiesdialog.h:88
UndoStack & mUndoStack
Definition: symbolinstancepropertiesdialog.h:92
Definition: mainwindow.h:10
SI_Symbol & mSymbol
Definition: symbolinstancepropertiesdialog.h:91
AttributeList mAttributes
Definition: symbolinstancepropertiesdialog.h:93
Definition: airwiresbuilder.cpp:32
The SymbolInstancePropertiesDialog class.
Definition: symbolinstancepropertiesdialog.h:62
The Project class represents a whole (opened) project with all its content.
Definition: project.h:80
The UndoStack class holds UndoCommand objects and provides undo/redo commands.
Definition: undostack.h:107
ComponentInstance & mComponentInstance
Definition: symbolinstancepropertiesdialog.h:90
Project & mProject
Definition: symbolinstancepropertiesdialog.h:89
The ComponentInstance class.
Definition: componentinstance.h:64
The LengthUnit class represents a length unit (millimeters, inches,...) and provides some useful meth...
Definition: lengthunit.h:62