LibrePCB Developers Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
msgwrongfootprinttextlayer.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_MSGWRONGFOOTPRINTTEXTLAYER_H
21 #define LIBREPCB_LIBRARY_MSGWRONGFOOTPRINTTEXTLAYER_H
22 
23 /*******************************************************************************
24  * Includes
25  ******************************************************************************/
26 #include "../../msg/libraryelementcheckmessage.h"
27 
28 #include <QtCore>
29 
30 /*******************************************************************************
31  * Namespace / Forward Declarations
32  ******************************************************************************/
33 namespace librepcb {
34 
35 class StrokeText;
36 
37 namespace library {
38 
39 class Footprint;
40 
41 /*******************************************************************************
42  * Class MsgWrongFootprintTextLayer
43  ******************************************************************************/
44 
49  Q_DECLARE_TR_FUNCTIONS(MsgWrongFootprintTextLayer)
50 
51 public:
52  // Constructors / Destructor
53  MsgWrongFootprintTextLayer() = delete;
54  MsgWrongFootprintTextLayer(std::shared_ptr<const Footprint> footprint,
55  std::shared_ptr<const StrokeText> text,
56  const QString& expectedLayerName) noexcept;
59  mFootprint(other.mFootprint),
60  mText(other.mText),
61  mExpectedLayerName(other.mExpectedLayerName) {}
62  virtual ~MsgWrongFootprintTextLayer() noexcept;
63 
64  // Getters
65  std::shared_ptr<const Footprint> getFootprint() const noexcept {
66  return mFootprint;
67  }
68  std::shared_ptr<const StrokeText> getText() const noexcept { return mText; }
69  QString getExpectedLayerName() const noexcept { return mExpectedLayerName; }
70 
71 private:
72  std::shared_ptr<const Footprint> mFootprint;
73  std::shared_ptr<const StrokeText> mText;
75 };
76 
77 /*******************************************************************************
78  * End of File
79  ******************************************************************************/
80 
81 } // namespace library
82 } // namespace librepcb
83 
84 #endif // LIBREPCB_LIBRARY_MSGWRONGFOOTPRINTTEXTLAYER_H
virtual ~MsgWrongFootprintTextLayer() noexcept
Definition: msgwrongfootprinttextlayer.cpp:57
The LibraryElementCheckMessage class.
Definition: libraryelementcheckmessage.h:44
std::shared_ptr< const StrokeText > mText
Definition: msgwrongfootprinttextlayer.h:73
std::shared_ptr< const Footprint > mFootprint
Definition: msgwrongfootprinttextlayer.h:72
std::shared_ptr< const StrokeText > getText() const noexcept
Definition: msgwrongfootprinttextlayer.h:68
MsgWrongFootprintTextLayer(const MsgWrongFootprintTextLayer &other) noexcept
Definition: msgwrongfootprinttextlayer.h:57
QString getExpectedLayerName() const noexcept
Definition: msgwrongfootprinttextlayer.h:69
std::shared_ptr< const Footprint > getFootprint() const noexcept
Definition: msgwrongfootprinttextlayer.h:65
QString mExpectedLayerName
Definition: msgwrongfootprinttextlayer.h:74
The MsgWrongFootprintTextLayer class.
Definition: msgwrongfootprinttextlayer.h:48
The Footprint class represents one footprint variant of a package.
Definition: footprint.h:61