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 
50  public IF_CircleObserver {
51 public:
52  // Constructors / Destructor
53  CircleGraphicsItem() = delete;
54  CircleGraphicsItem(const CircleGraphicsItem& other) = delete;
56  QGraphicsItem* parent = nullptr) noexcept;
57  ~CircleGraphicsItem() noexcept;
58 
59  // Getters
60  Circle& getCircle() noexcept { return mCircle; }
61 
62  // Operator Overloadings
63  CircleGraphicsItem& operator=(const CircleGraphicsItem& rhs) = delete;
64 
65 private: // Methods
67  const GraphicsLayerName& newLayerName) noexcept override;
69  const UnsignedLength& newLineWidth) noexcept override;
70  void circleIsFilledChanged(bool newIsFilled) noexcept override;
71  void circleIsGrabAreaChanged(bool newIsGrabArea) noexcept override;
72  void circleCenterChanged(const Point& newCenter) noexcept override;
74  const PositiveLength& newDiameter) noexcept override;
75  void updateFillLayer() noexcept;
76 
77 private: // Data
80 };
81 
82 /*******************************************************************************
83  * End of File
84  ******************************************************************************/
85 
86 } // namespace librepcb
87 
88 #endif // LIBREPCB_CIRCLEGRAPHICSITEM_H
Circle & mCircle
Definition: circlegraphicsitem.h:78
void circleCenterChanged(const Point &newCenter) noexceptoverride
Definition: circlegraphicsitem.cpp:83
type_safe::constrained_type< QString, GraphicsLayerNameConstraint, GraphicsLayerNameVerifier > GraphicsLayerName
Definition: graphicslayername.h:78
void updateFillLayer() noexcept
Definition: circlegraphicsitem.cpp:92
const IF_GraphicsLayerProvider & mLayerProvider
Definition: circlegraphicsitem.h:79
The IF_GraphicsLayerProvider class defines an interface for classes which provide layers...
Definition: graphicslayer.h:250
The Point class is used to represent a point/coordinate/vector, for example (1.2mm; 5...
Definition: point.h:81
void circleIsGrabAreaChanged(bool newIsGrabArea) noexceptoverride
Definition: circlegraphicsitem.cpp:78
~CircleGraphicsItem() noexcept
Definition: circlegraphicsitem.cpp:54
The Circle class.
Definition: circle.h:76
void circleDiameterChanged(const PositiveLength &newDiameter) noexceptoverride
Definition: circlegraphicsitem.cpp:87
The CircleGraphicsItem class.
Definition: circlegraphicsitem.h:49
void circleIsFilledChanged(bool newIsFilled) noexceptoverride
Definition: circlegraphicsitem.cpp:73
The PrimitiveCircleGraphicsItem class.
Definition: primitivecirclegraphicsitem.h:47
type_safe::constrained_type< Length, PositiveLengthConstraint, PositiveLengthVerifier > PositiveLength
Definition: length.h:783
CircleGraphicsItem & operator=(const CircleGraphicsItem &rhs)=delete
void circleLayerNameChanged(const GraphicsLayerName &newLayerName) noexceptoverride
Definition: circlegraphicsitem.cpp:62
void circleLineWidthChanged(const UnsignedLength &newLineWidth) noexceptoverride
Definition: circlegraphicsitem.cpp:68
The IF_CircleObserver class.
Definition: circle.h:50
Circle & getCircle() noexcept
Definition: circlegraphicsitem.h:60
type_safe::constrained_type< Length, UnsignedLengthConstraint, UnsignedLengthVerifier > UnsignedLength
Definition: length.h:662