LibrePCB Developers Documentation
Loading...
Searching...
No Matches
bomreviewdialog.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_BOMREVIEWDIALOG_H
21#define LIBREPCB_EDITOR_BOMREVIEWDIALOG_H
22
23/*******************************************************************************
24 * Includes
25 ******************************************************************************/
27
28#include <QtCore>
29#include <QtWidgets>
30
31#include <memory>
32#include <optional>
33
34/*******************************************************************************
35 * Namespace / Forward Declarations
36 ******************************************************************************/
37namespace librepcb {
38
39class AssemblyVariant;
40class Board;
41class Bom;
42class Project;
43class Uuid;
44class WorkspaceSettings;
45
46namespace editor {
47
48class PartInformationToolTip;
49
50namespace Ui {
51class BomReviewDialog;
52}
53
54/*******************************************************************************
55 * Class BomReviewDialog
56 ******************************************************************************/
57
61class BomReviewDialog final : public QDialog {
62 Q_OBJECT
63
64public:
65 // Constructors / Destructor
66 BomReviewDialog() = delete;
67 BomReviewDialog(const BomReviewDialog& other) = delete;
68 BomReviewDialog(const WorkspaceSettings& settings, Project& project,
69 const Board* board = nullptr,
70 QWidget* parent = nullptr) noexcept;
71 ~BomReviewDialog() noexcept;
72
73 // General Methods
74 virtual bool eventFilter(QObject* obj, QEvent* e) noexcept override;
75
76 // Operator Overloads
77 BomReviewDialog& operator=(const BomReviewDialog& rhs) = delete;
78
79signals:
81
82private: // GUI Event Handlers
83 void cbxBoardCurrentIndexChanged(int index) noexcept;
85 void tableCellDoubleClicked(int row, int column) noexcept;
86
87private: // Methods
88 void updateAttributes() noexcept;
89 void updateBom() noexcept;
90 void updateTable() noexcept;
91 void updatePartsInformation() noexcept;
92 std::shared_ptr<AssemblyVariant> getAssemblyVariant() const noexcept;
93 std::optional<Uuid> getAssemblyVariantUuid(bool throwIfNullopt) const;
94
95private: // Data
98 std::shared_ptr<Bom> mBom;
99 QScopedPointer<Ui::BomReviewDialog> mUi;
103};
104
105/*******************************************************************************
106 * End of File
107 ******************************************************************************/
108
109} // namespace editor
110} // namespace librepcb
111
112#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:74
The Bom class represents a bill of materials list.
Definition bom.h:84
The Project class represents a whole (opened) project with all its content.
Definition project.h:71
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 BomReviewDialog class.
Definition bomreviewdialog.h:61
void updateTable() noexcept
Definition bomreviewdialog.cpp:251
void tableCellDoubleClicked(int row, int column) noexcept
Definition bomreviewdialog.cpp:205
void updateBom() noexcept
Definition bomreviewdialog.cpp:239
QScopedPointer< PartInformationToolTip > mPartToolTip
Definition bomreviewdialog.h:100
uint mPartInfoProgress
Definition bomreviewdialog.h:101
void btnOpenOutputDirectoryClicked() noexcept
QScopedPointer< Ui::BomReviewDialog > mUi
Definition bomreviewdialog.h:99
BomReviewDialog(const BomReviewDialog &other)=delete
std::optional< Uuid > getAssemblyVariantUuid(bool throwIfNullopt) const
Definition bomreviewdialog.cpp:378
void cbxBoardCurrentIndexChanged(int index) noexcept
Project & mProject
Definition bomreviewdialog.h:97
const WorkspaceSettings & mSettings
Definition bomreviewdialog.h:96
std::shared_ptr< AssemblyVariant > getAssemblyVariant() const noexcept
Definition bomreviewdialog.cpp:371
bool mUpdatePartInformationScheduled
Definition bomreviewdialog.h:102
std::shared_ptr< Bom > mBom
Definition bomreviewdialog.h:98
void updateAttributes() noexcept
Definition bomreviewdialog.cpp:220
virtual bool eventFilter(QObject *obj, QEvent *e) noexcept override
Definition bomreviewdialog.cpp:191
void updatePartsInformation() noexcept
Definition bomreviewdialog.cpp:289
The PartInformationToolTip class.
Definition partinformationtooltip.h:56
Definition occmodel.cpp:77
Definition uuid.h:186