LibrePCB Developers Documentation
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_EDITOR_CIRCLEGRAPHICSITEM_H
21#define LIBREPCB_EDITOR_CIRCLEGRAPHICSITEM_H
22
23/*******************************************************************************
24 * Includes
25 ******************************************************************************/
27
29
30#include <QtCore>
31#include <QtWidgets>
32
33/*******************************************************************************
34 * Namespace / Forward Declarations
35 ******************************************************************************/
36namespace librepcb {
37namespace editor {
38
39class IF_GraphicsLayerProvider;
40
41/*******************************************************************************
42 * Class CircleGraphicsItem
43 ******************************************************************************/
44
49public:
50 // Constructors / Destructor
52 CircleGraphicsItem(const CircleGraphicsItem& other) = delete;
54 QGraphicsItem* parent = nullptr) noexcept;
55 virtual ~CircleGraphicsItem() noexcept;
56
57 // Getters
58 Circle& getCircle() noexcept { return mCircle; }
59
60 // Operator Overloadings
62
63private: // Methods
64 void circleEdited(const Circle& circle, Circle::Event event) noexcept;
65 void updateFillLayer() noexcept;
66 void updateZValue() noexcept;
67
68private: // Data
71
72 // Slots
73 Circle::OnEditedSlot mEditedSlot;
74};
75
76/*******************************************************************************
77 * End of File
78 ******************************************************************************/
79
80} // namespace editor
81} // namespace librepcb
82
83#endif
The Circle class.
Definition: circle.h:46
Event
Definition: circle.h:51
The CircleGraphicsItem class.
Definition: circlegraphicsitem.h:48
void updateFillLayer() noexcept
Definition: circlegraphicsitem.cpp:95
Circle & mCircle
Definition: circlegraphicsitem.h:69
Circle & getCircle() noexcept
Definition: circlegraphicsitem.h:58
const IF_GraphicsLayerProvider & mLayerProvider
Definition: circlegraphicsitem.h:70
CircleGraphicsItem(const CircleGraphicsItem &other)=delete
Circle::OnEditedSlot mEditedSlot
Definition: circlegraphicsitem.h:73
void circleEdited(const Circle &circle, Circle::Event event) noexcept
Definition: circlegraphicsitem.cpp:66
CircleGraphicsItem & operator=(const CircleGraphicsItem &rhs)=delete
void updateZValue() noexcept
Definition: circlegraphicsitem.cpp:105
The IF_GraphicsLayerProvider class defines an interface for classes which provide layers.
Definition: graphicslayer.h:111
The PrimitiveCircleGraphicsItem class.
Definition: primitivecirclegraphicsitem.h:49
Definition: occmodel.cpp:77