LibrePCB Developers Documentation
Loading...
Searching...
No Matches
newprojectwizardpage_eagleimport.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_NEWPROJECTWIZARDPAGE_EAGLEIMPORT_H
21#define LIBREPCB_EDITOR_NEWPROJECTWIZARDPAGE_EAGLEIMPORT_H
22
23/*******************************************************************************
24 * Includes
25 ******************************************************************************/
26#include <QtCore>
27#include <QtWidgets>
28
29/*******************************************************************************
30 * Namespace / Forward Declarations
31 ******************************************************************************/
32namespace librepcb {
33
34namespace eagleimport {
35class EagleProjectImport;
36}
37
38class Project;
39class FilePath;
40class Workspace;
41
42namespace editor {
43
44namespace Ui {
45class NewProjectWizardPage_EagleImport;
46}
47
48class WaitingSpinnerWidget;
49
50/*******************************************************************************
51 * Class NewProjectWizardPage_EagleImport
52 ******************************************************************************/
53
57class NewProjectWizardPage_EagleImport final : public QWizardPage {
58 Q_OBJECT
59
60 struct ParserResult {
61 std::shared_ptr<eagleimport::EagleProjectImport> import;
62 QStringList messages;
63 };
64
65public:
66 // Constructors / Destructor
68 QWidget* parent = nullptr) noexcept;
70 const NewProjectWizardPage_EagleImport& other) = delete;
72
73 // General Methods
74 void import(Project& project);
75
76 // Operator Overloadings
78 const NewProjectWizardPage_EagleImport& rhs) = delete;
79
80signals:
81 void projectSelected(const QString& name) const;
82
83private: // Methods
84 void updateStatus() noexcept;
86 std::shared_ptr<eagleimport::EagleProjectImport> import,
87 const FilePath& schFp, const FilePath& brdFp) noexcept;
88 bool isComplete() const noexcept override;
89
90private: // Data
97 std::shared_ptr<eagleimport::EagleProjectImport> mImport;
98};
99
100/*******************************************************************************
101 * End of File
102 ******************************************************************************/
103
104} // namespace editor
105} // namespace librepcb
106
107#endif
This class represents absolute, well-formatted paths to files or directories.
Definition filepath.h:127
The Project class represents a whole (opened) project with all its content.
Definition project.h:71
The Workspace class represents a workspace with all its data (library, projects, settings,...
Definition workspace.h:54
The NewProjectWizardPage_EagleImport class.
Definition newprojectwizardpage_eagleimport.h:57
QFuture< ParserResult > mFuture
Definition newprojectwizardpage_eagleimport.h:96
void projectSelected(const QString &name) const
QScopedPointer< Ui::NewProjectWizardPage_EagleImport > mUi
Definition newprojectwizardpage_eagleimport.h:92
void import(Project &project)
Definition newprojectwizardpage_eagleimport.cpp:132
std::shared_ptr< eagleimport::EagleProjectImport > mImport
Definition newprojectwizardpage_eagleimport.h:97
bool isComplete() const noexcept override
Definition newprojectwizardpage_eagleimport.cpp:253
const Workspace & mWorkspace
Definition newprojectwizardpage_eagleimport.h:91
QString mCurrentSchematic
Definition newprojectwizardpage_eagleimport.h:94
QScopedPointer< WaitingSpinnerWidget > mWaitingSpinner
Definition newprojectwizardpage_eagleimport.h:93
QString mCurrentBoard
Definition newprojectwizardpage_eagleimport.h:95
static NewProjectWizardPage_EagleImport::ParserResult parseAsync(std::shared_ptr< eagleimport::EagleProjectImport > import, const FilePath &schFp, const FilePath &brdFp) noexcept
Definition newprojectwizardpage_eagleimport.cpp:230
void updateStatus() noexcept
Definition newprojectwizardpage_eagleimport.cpp:188
A widget drawing a rotating spinner to indicate an ongoing operation.
Definition waitingspinnerwidget.h:52
Definition occmodel.cpp:76
Definition uuid.h:186
Definition newprojectwizardpage_eagleimport.h:60
QStringList messages
Definition newprojectwizardpage_eagleimport.h:62