LibrePCB Developers Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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  QWidget* parent) noexcept;
75 
76  // Operator Overloadings
78  const SymbolInstancePropertiesDialog& rhs) = delete;
79 
80 private: // Methods
81  void keyPressEvent(QKeyEvent* e);
82  void accept();
83  bool applyChanges() noexcept;
84 
85 private: // Data
92  QScopedPointer<Ui::SymbolInstancePropertiesDialog> mUi;
93 };
94 
95 /*******************************************************************************
96  * End of File
97  ******************************************************************************/
98 
99 } // namespace editor
100 } // namespace project
101 } // namespace librepcb
102 
103 #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:92
workspace::Workspace & mWorkspace
Definition: symbolinstancepropertiesdialog.h:86
UndoStack & mUndoStack
Definition: symbolinstancepropertiesdialog.h:90
SI_Symbol & mSymbol
Definition: symbolinstancepropertiesdialog.h:89
AttributeList mAttributes
Definition: symbolinstancepropertiesdialog.h:91
void keyPressEvent(QKeyEvent *e)
Definition: symbolinstancepropertiesdialog.cpp:173
The SymbolInstancePropertiesDialog class.
Definition: symbolinstancepropertiesdialog.h:62
The Project class represents a whole (opened) project with all its content.
Definition: project.h:79
The UndoStack class holds UndoCommand objects and provides undo/redo commands.
Definition: undostack.h:107
ComponentInstance & mComponentInstance
Definition: symbolinstancepropertiesdialog.h:88
void accept()
Definition: symbolinstancepropertiesdialog.cpp:187
SymbolInstancePropertiesDialog & operator=(const SymbolInstancePropertiesDialog &rhs)=delete
Project & mProject
Definition: symbolinstancepropertiesdialog.h:87
bool applyChanges() noexcept
Definition: symbolinstancepropertiesdialog.cpp:193
~SymbolInstancePropertiesDialog() noexcept
Definition: symbolinstancepropertiesdialog.cpp:165
The ComponentInstance class.
Definition: componentinstance.h:64