LibrePCB Developers Documentation
footprintpadpropertiesdialog.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_FOOTPRINTPADPROPERTIESDIALOG_H
21#define LIBREPCB_EDITOR_FOOTPRINTPADPROPERTIESDIALOG_H
22
23/*******************************************************************************
24 * Includes
25 ******************************************************************************/
27
28#include <QtCore>
29#include <QtWidgets>
30
31/*******************************************************************************
32 * Namespace / Forward Declarations
33 ******************************************************************************/
34namespace librepcb {
35
36class Footprint;
37class FootprintPad;
38class LengthUnit;
39class Package;
40
41namespace editor {
42
43class UndoStack;
44
45namespace Ui {
46class FootprintPadPropertiesDialog;
47}
48
49/*******************************************************************************
50 * Class FootprintPadPropertiesDialog
51 ******************************************************************************/
52
56class FootprintPadPropertiesDialog final : public QDialog {
57 Q_OBJECT
58
59public:
60 // Constructors / Destructor
63 delete;
65 UndoStack& undoStack,
66 const LengthUnit& lengthUnit,
67 const QString& settingsPrefix,
68 QWidget* parent = nullptr) noexcept;
70
71 // Setters
72 void setReadOnly(bool readOnly) noexcept;
73
74 // Operator Overloadings
76 const FootprintPadPropertiesDialog& rhs) = delete;
77
78private: // Methods
79 void updateShapeDependentWidgets(bool checked) noexcept;
80 void updateAbsoluteRadius() noexcept;
81 void updateRelativeRadius() noexcept;
82 void applyRecommendedRadius() noexcept;
83 void addHole() noexcept;
84 void removeSelectedHole() noexcept;
85 void removeAllHoles() noexcept;
86 void updateGeneralTabHoleWidgets() noexcept;
87 void setSelectedHole(int index) noexcept;
88 void applyTypicalThtProperties() noexcept;
89 void applyTypicalSmtProperties() noexcept;
90 void on_buttonBox_clicked(QAbstractButton* button);
91 bool applyChanges() noexcept;
92
93private: // Data
98 QScopedPointer<Ui::FootprintPadPropertiesDialog> mUi;
100};
101
102/*******************************************************************************
103 * End of File
104 ******************************************************************************/
105
106} // namespace editor
107} // namespace librepcb
108
109#endif
The FootprintPad class represents a pad of a footprint.
Definition: footprintpad.h:55
The LengthUnit class represents a length unit (millimeters, inches,...) and provides some useful meth...
Definition: lengthunit.h:60
The Package class represents a package of a component (including footprint and 3D model)
Definition: package.h:59
The Path class represents a list of vertices connected by straight lines or circular arc segments.
Definition: path.h:58
The FootprintPadPropertiesDialog class.
Definition: footprintpadpropertiesdialog.h:56
FootprintPadPropertiesDialog(const FootprintPadPropertiesDialog &other)=delete
PadHoleList mHoles
Definition: footprintpadpropertiesdialog.h:96
QScopedPointer< Ui::FootprintPadPropertiesDialog > mUi
Definition: footprintpadpropertiesdialog.h:98
void applyTypicalThtProperties() noexcept
Definition: footprintpadpropertiesdialog.cpp:437
void on_buttonBox_clicked(QAbstractButton *button)
Definition: footprintpadpropertiesdialog.cpp:445
void applyTypicalSmtProperties() noexcept
Definition: footprintpadpropertiesdialog.cpp:441
void addHole() noexcept
Definition: footprintpadpropertiesdialog.cpp:374
void setReadOnly(bool readOnly) noexcept
Definition: footprintpadpropertiesdialog.cpp:276
int mSelectedHoleIndex
Definition: footprintpadpropertiesdialog.h:97
void setSelectedHole(int index) noexcept
Definition: footprintpadpropertiesdialog.cpp:420
Path mAutoCustomOutline
Definition: footprintpadpropertiesdialog.h:99
UndoStack & mUndoStack
Definition: footprintpadpropertiesdialog.h:95
void updateRelativeRadius() noexcept
Definition: footprintpadpropertiesdialog.cpp:356
void updateShapeDependentWidgets(bool checked) noexcept
Definition: footprintpadpropertiesdialog.cpp:323
void updateAbsoluteRadius() noexcept
Definition: footprintpadpropertiesdialog.cpp:346
FootprintPad & mPad
Definition: footprintpadpropertiesdialog.h:94
bool applyChanges() noexcept
Definition: footprintpadpropertiesdialog.cpp:465
void applyRecommendedRadius() noexcept
Definition: footprintpadpropertiesdialog.cpp:367
void removeSelectedHole() noexcept
Definition: footprintpadpropertiesdialog.cpp:384
void updateGeneralTabHoleWidgets() noexcept
Definition: footprintpadpropertiesdialog.cpp:400
void removeAllHoles() noexcept
Definition: footprintpadpropertiesdialog.cpp:393
The UndoStack class holds UndoCommand objects and provides undo/redo commands.
Definition: undostack.h:106
Definition: occmodel.cpp:77