LibrePCB Developers Documentation
symbolpainter.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_CORE_SYMBOLPAINTER_H
21#define LIBREPCB_CORE_SYMBOLPAINTER_H
22
23/*******************************************************************************
24 * Includes
25 ******************************************************************************/
26#include "../../export/graphicsexport.h"
27
28#include <QtCore>
29#include <QtGui>
30
31/*******************************************************************************
32 * Namespace / Forward Declarations
33 ******************************************************************************/
34namespace librepcb {
35
36class Circle;
37class Polygon;
38class Symbol;
39class SymbolPin;
40class Text;
41
42/*******************************************************************************
43 * Class SymbolPainter
44 ******************************************************************************/
45
51class SymbolPainter final : public GraphicsPagePainter {
52public:
53 // Constructors / Destructor
54 SymbolPainter() = delete;
55 explicit SymbolPainter(const Symbol& symbol) noexcept;
56 SymbolPainter(const SymbolPainter& other) = delete;
57 ~SymbolPainter() noexcept;
58
59 // General Methods
60 void paint(QPainter& painter,
61 const GraphicsExportSettings& settings) const noexcept override;
62
63 // Operator Overloadings
64 SymbolPainter& operator=(const SymbolPainter& rhs) = delete;
65
66private: // Data
71 QList<Text> mTexts;
72};
73
74/*******************************************************************************
75 * End of File
76 ******************************************************************************/
77
78} // namespace librepcb
79
80#endif
The Circle class.
Definition: circle.h:46
Settings for librepcb::GraphicsExport.
Definition: graphicsexportsettings.h:51
Base class for printing a page for librepcb::GraphicsExport.
Definition: graphicsexport.h:57
The Polygon class.
Definition: polygon.h:45
The Symbol class represents the part of a component which is added to schematics.
Definition: symbol.h:55
Paints a librepcb::Symbol to a QPainter.
Definition: symbolpainter.h:51
QFont mDefaultFont
Definition: symbolpainter.h:67
~SymbolPainter() noexcept
Definition: symbolpainter.cpp:59
SymbolPainter(const SymbolPainter &other)=delete
QList< Polygon > mPolygons
Definition: symbolpainter.h:69
QList< Text > mTexts
Definition: symbolpainter.h:71
QList< SymbolPin > mPins
Definition: symbolpainter.h:68
void paint(QPainter &painter, const GraphicsExportSettings &settings) const noexcept override
Draw page content on a QPainter.
Definition: symbolpainter.cpp:66
QList< Circle > mCircles
Definition: symbolpainter.h:70
The SymbolPin class represents one pin of a symbol.
Definition: symbolpin.h:51
The Text class.
Definition: text.h:48
Definition: occmodel.cpp:77