LibrePCB Developers Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
circlegraphicsitem.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_CIRCLEGRAPHICSITEM_H
21 #define LIBREPCB_CIRCLEGRAPHICSITEM_H
22 
23 /*******************************************************************************
24  * Includes
25  ******************************************************************************/
26 #include "../geometry/circle.h"
28 
29 #include <QtCore>
30 #include <QtWidgets>
31 
32 /*******************************************************************************
33  * Namespace / Forward Declarations
34  ******************************************************************************/
35 namespace librepcb {
36 
37 class IF_GraphicsLayerProvider;
38 
39 /*******************************************************************************
40  * Class CircleGraphicsItem
41  ******************************************************************************/
42 
47 public:
48  // Constructors / Destructor
49  CircleGraphicsItem() = delete;
50  CircleGraphicsItem(const CircleGraphicsItem& other) = delete;
52  QGraphicsItem* parent = nullptr) noexcept;
53  ~CircleGraphicsItem() noexcept;
54 
55  // Getters
56  Circle& getCircle() noexcept { return mCircle; }
57 
58  // Operator Overloadings
59  CircleGraphicsItem& operator=(const CircleGraphicsItem& rhs) = delete;
60 
61 private: // Methods
62  void circleEdited(const Circle& circle, Circle::Event event) noexcept;
63  void updateFillLayer() noexcept;
64 
65 private: // Data
68 
69  // Slots
70  Circle::OnEditedSlot mEditedSlot;
71 };
72 
73 /*******************************************************************************
74  * End of File
75  ******************************************************************************/
76 
77 } // namespace librepcb
78 
79 #endif // LIBREPCB_CIRCLEGRAPHICSITEM_H
Circle & mCircle
Definition: circlegraphicsitem.h:66
void updateFillLayer() noexcept
Definition: circlegraphicsitem.cpp:91
const IF_GraphicsLayerProvider & mLayerProvider
Definition: circlegraphicsitem.h:67
The IF_GraphicsLayerProvider class defines an interface for classes which provide layers...
Definition: graphicslayer.h:227
Event
Definition: circle.h:52
~CircleGraphicsItem() noexcept
Definition: circlegraphicsitem.cpp:57
The Circle class.
Definition: circle.h:47
The CircleGraphicsItem class.
Definition: circlegraphicsitem.h:46
Circle::OnEditedSlot mEditedSlot
Definition: circlegraphicsitem.h:70
The PrimitiveCircleGraphicsItem class.
Definition: primitivecirclegraphicsitem.h:44
CircleGraphicsItem & operator=(const CircleGraphicsItem &rhs)=delete
void circleEdited(const Circle &circle, Circle::Event event) noexcept
Definition: circlegraphicsitem.cpp:64
Circle & getCircle() noexcept
Definition: circlegraphicsitem.h:56