LibrePCB Developers Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
patheditorwidget.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_PATHEDITORWIDGET_H
21 #define LIBREPCB_PATHEDITORWIDGET_H
22 
23 /*******************************************************************************
24  * Includes
25  ******************************************************************************/
26 #include "../geometry/path.h"
27 
28 #include <QtCore>
29 #include <QtWidgets>
30 
31 /*******************************************************************************
32  * Namespace / Forward Declarations
33  ******************************************************************************/
34 namespace librepcb {
35 
36 class EditableTableWidget;
37 class PathModel;
38 
39 /*******************************************************************************
40  * Class PathEditorWidget
41  ******************************************************************************/
42 
46 class PathEditorWidget final : public QWidget {
47  Q_OBJECT
48 
49 public:
50  // Constructors / Destructor
51  explicit PathEditorWidget(QWidget* parent = nullptr) noexcept;
52  PathEditorWidget(const PathEditorWidget& other) = delete;
53  ~PathEditorWidget() noexcept;
54 
55  // General Methods
56  void setPath(const Path& path) noexcept;
57  const Path& getPath() const noexcept;
58 
59  // Operator Overloadings
60  PathEditorWidget& operator=(const PathEditorWidget& rhs) = delete;
61 
62 private: // Data
63  QScopedPointer<PathModel> mModel;
64  QScopedPointer<EditableTableWidget> mView;
65 };
66 
67 /*******************************************************************************
68  * End of File
69  ******************************************************************************/
70 
71 } // namespace librepcb
72 
73 #endif // LIBREPCB_PATHEDITORWIDGET_H
The PathEditorWidget class.
Definition: patheditorwidget.h:46
PathEditorWidget & operator=(const PathEditorWidget &rhs)=delete
~PathEditorWidget() noexcept
Definition: patheditorwidget.cpp:71
QScopedPointer< EditableTableWidget > mView
Definition: patheditorwidget.h:64
const Path & getPath() const noexcept
Definition: patheditorwidget.cpp:82
The Path class represents a list of vertices connected by straight lines or circular arc segments...
Definition: path.h:53
PathEditorWidget(QWidget *parent=nullptr) noexcept
Definition: patheditorwidget.cpp:40
void setPath(const Path &path) noexcept
Definition: patheditorwidget.cpp:78
QScopedPointer< PathModel > mModel
Definition: patheditorwidget.h:63