LibrePCB Developers Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
componentsymbolvarianteditdialog.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_LIBRARY_EDITOR_COMPONENTSYMBOLVARIANTEDITDIALOG_H
21 #define LIBREPCB_LIBRARY_EDITOR_COMPONENTSYMBOLVARIANTEDITDIALOG_H
22 
23 /*******************************************************************************
24  * Includes
25  ******************************************************************************/
28 
29 #include <QtCore>
30 #include <QtWidgets>
31 
32 /*******************************************************************************
33  * Namespace / Forward Declarations
34  ******************************************************************************/
35 namespace librepcb {
36 
37 class DefaultGraphicsLayerProvider;
38 class GraphicsScene;
39 
40 namespace workspace {
41 class Workspace;
42 }
43 
44 namespace library {
45 
46 class Component;
47 class Symbol;
48 class SymbolGraphicsItem;
49 
50 namespace editor {
51 
52 namespace Ui {
53 class ComponentSymbolVariantEditDialog;
54 }
55 
56 /*******************************************************************************
57  * Class ComponentSymbolVariantEditDialog
58  ******************************************************************************/
59 
66 class ComponentSymbolVariantEditDialog final : public QDialog {
67  Q_OBJECT
68 
69 public:
70  // Constructors / Destructor
73  const ComponentSymbolVariantEditDialog& other) = delete;
75  const Component& cmp,
76  ComponentSymbolVariant& symbVar,
77  QWidget* parent = nullptr) noexcept;
79 
80  // Operator Overloadings
82  const ComponentSymbolVariantEditDialog& rhs) = delete;
83 
84 private: // Methods
85  void accept() noexcept override;
86  void updateGraphicsItems() noexcept;
87 
88 private: // Data
93  QScopedPointer<Ui::ComponentSymbolVariantEditDialog> mUi;
94  QScopedPointer<GraphicsScene> mGraphicsScene;
95  QScopedPointer<DefaultGraphicsLayerProvider> mGraphicsLayerProvider;
96 
97  QList<std::shared_ptr<Symbol>> mSymbols;
98  QList<std::shared_ptr<SymbolGraphicsItem>> mGraphicsItems;
99 };
100 
101 /*******************************************************************************
102  * End of File
103  ******************************************************************************/
104 
105 } // namespace editor
106 } // namespace library
107 } // namespace librepcb
108 
109 #endif // LIBREPCB_LIBRARY_EDITOR_COMPONENTSYMBOLVARIANTEDITDIALOG_H
void accept() noexceptoverride
Definition: componentsymbolvarianteditdialog.cpp:94
The Workspace class represents a workspace with all its data (library, projects, settings, ...)
Definition: workspace.h:65
~ComponentSymbolVariantEditDialog() noexcept
Definition: componentsymbolvarianteditdialog.cpp:87
QList< std::shared_ptr< SymbolGraphicsItem > > mGraphicsItems
Definition: componentsymbolvarianteditdialog.h:98
QScopedPointer< Ui::ComponentSymbolVariantEditDialog > mUi
Definition: componentsymbolvarianteditdialog.h:93
The ComponentSymbolVariantEditDialog class.
Definition: componentsymbolvarianteditdialog.h:66
const Component & mComponent
Definition: componentsymbolvarianteditdialog.h:90
void updateGraphicsItems() noexcept
Definition: componentsymbolvarianteditdialog.cpp:108
The Symbol class represents the part of a component which is added to schematics. ...
Definition: symbol.h:57
QScopedPointer< DefaultGraphicsLayerProvider > mGraphicsLayerProvider
Definition: componentsymbolvarianteditdialog.h:95
ComponentSymbolVariantEditDialog & operator=(const ComponentSymbolVariantEditDialog &rhs)=delete
ComponentSymbolVariant & mOriginalSymbVar
Definition: componentsymbolvarianteditdialog.h:91
QList< std::shared_ptr< Symbol > > mSymbols
Definition: componentsymbolvarianteditdialog.h:97
The SymbolGraphicsItem class.
Definition: symbolgraphicsitem.h:61
ComponentSymbolVariant mSymbVar
Definition: componentsymbolvarianteditdialog.h:92
QScopedPointer< GraphicsScene > mGraphicsScene
Definition: componentsymbolvarianteditdialog.h:94
const workspace::Workspace & mWorkspace
Definition: componentsymbolvarianteditdialog.h:89
The ComponentSymbolVariant class represents a symbol variant of a component.
Definition: componentsymbolvariant.h:58
The Component class represents a "generic" device in the library.
Definition: component.h:73