LibrePCB Developers Documentation
Loading...
Searching...
No Matches
boardpickplacegeneratordialog.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_BOARDPICKPLACEGENERATORDIALOG_H
21#define LIBREPCB_EDITOR_BOARDPICKPLACEGENERATORDIALOG_H
22
23/*******************************************************************************
24 * Includes
25 ******************************************************************************/
28
29#include <QtCore>
30#include <QtWidgets>
31
32#include <memory>
33
34/*******************************************************************************
35 * Namespace / Forward Declarations
36 ******************************************************************************/
37namespace librepcb {
38
39class AssemblyVariant;
40class Board;
41class PickPlaceData;
42class WorkspaceSettings;
43
44namespace editor {
45
46namespace Ui {
47class BoardPickPlaceGeneratorDialog;
48}
49
50/*******************************************************************************
51 * Class BoardPickPlaceGeneratorDialog
52 ******************************************************************************/
53
57class BoardPickPlaceGeneratorDialog final : public QDialog {
58 Q_OBJECT
59
60public:
61 // Constructors / Destructor
64 delete;
65 explicit BoardPickPlaceGeneratorDialog(const WorkspaceSettings& settings,
66 Board& board,
67 QWidget* parent = nullptr);
69
70private: // Methods
71 void setFileExtension(const QString& extension) noexcept;
72 void btnGenerateClicked() noexcept;
73 void updateData() noexcept;
74 std::shared_ptr<AssemblyVariant> getAssemblyVariant() const noexcept;
75 std::optional<Uuid> getAssemblyVariantUuid(bool throwIfNullopt) const;
76 FilePath getOutputFilePath(const QString& text) const noexcept;
77
78private: // Data
80 std::shared_ptr<PickPlaceData> mData;
82 QPointer<QPushButton> mBtnGenerate;
83};
84
85/*******************************************************************************
86 * End of File
87 ******************************************************************************/
88
89} // namespace editor
90} // namespace librepcb
91
92#endif
The AssemblyVariant class.
Definition assemblyvariant.h:44
The Board class represents a PCB of a project and is always part of a circuit.
Definition board.h:73
This class represents absolute, well-formatted paths to files or directories.
Definition filepath.h:127
The librepcb::PickPlaceData class represents the content of a pick&place file.
Definition pickplacedata.h:140
The Uuid class is a replacement for QUuid to get UUID strings without {} braces.
Definition uuid.h:56
Container for all workspace related settings.
Definition workspacesettings.h:60
The BoardPickPlaceGeneratorDialog class.
Definition boardpickplacegeneratordialog.h:57
void setFileExtension(const QString &extension) noexcept
Definition boardpickplacegeneratordialog.cpp:130
~BoardPickPlaceGeneratorDialog()
Definition boardpickplacegeneratordialog.cpp:120
FilePath getOutputFilePath(const QString &text) const noexcept
Definition boardpickplacegeneratordialog.cpp:244
std::optional< Uuid > getAssemblyVariantUuid(bool throwIfNullopt) const
Definition boardpickplacegeneratordialog.cpp:234
Board & mBoard
Definition boardpickplacegeneratordialog.h:79
void updateData() noexcept
Definition boardpickplacegeneratordialog.cpp:188
QScopedPointer< Ui::BoardPickPlaceGeneratorDialog > mUi
Definition boardpickplacegeneratordialog.h:81
BoardPickPlaceGeneratorDialog(const BoardPickPlaceGeneratorDialog &other)=delete
std::shared_ptr< AssemblyVariant > getAssemblyVariant() const noexcept
Definition boardpickplacegeneratordialog.cpp:227
void btnGenerateClicked() noexcept
Definition boardpickplacegeneratordialog.cpp:141
std::shared_ptr< PickPlaceData > mData
Definition boardpickplacegeneratordialog.h:80
QPointer< QPushButton > mBtnGenerate
Definition boardpickplacegeneratordialog.h:82
Definition occmodel.cpp:76
Definition uuid.h:186