LibrePCB Developers Documentation
initializeworkspacewizard.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_INITIALIZEWORKSPACEWIZARD_H
21#define LIBREPCB_EDITOR_INITIALIZEWORKSPACEWIZARD_H
22
23/*******************************************************************************
24 * Includes
25 ******************************************************************************/
27
28#include <QtCore>
29#include <QtWidgets>
30
31/*******************************************************************************
32 * Namespace / Forward Declarations
33 ******************************************************************************/
34namespace librepcb {
35namespace editor {
36
37namespace Ui {
38class InitializeWorkspaceWizard;
39}
40
41/*******************************************************************************
42 * Class InitializeWorkspaceWizard
43 ******************************************************************************/
44
48class InitializeWorkspaceWizard final : public QWizard {
49 Q_OBJECT
50
51public:
52 // Constructors / Destructor
53 explicit InitializeWorkspaceWizard(bool forceChoosePath,
54 QWidget* parent = nullptr) noexcept;
57
58 // Getters
59 bool getNeedsToBeShown() const noexcept { return mNeedsToBeShown; }
60 const FilePath& getWorkspacePath() const noexcept {
62 }
63 const QString& getDataDir() const noexcept { return mContext.getDataDir(); }
66 }
67
68 // Setters
69 void setWorkspacePath(const FilePath& fp);
70
71 // Operator Overloadings
73 delete;
74
75private: // Methods
76 void updateStartPage() noexcept;
77
78private: // Data
80 QScopedPointer<Ui::InitializeWorkspaceWizard> mUi;
83};
84
85/*******************************************************************************
86 * End of File
87 ******************************************************************************/
88
89} // namespace editor
90} // namespace librepcb
91
92#endif
This class represents absolute, well-formatted paths to files or directories.
Definition: filepath.h:129
The InitializeWorkspaceWizardContext class.
Definition: initializeworkspacewizardcontext.h:45
bool getWorkspaceContainsNewerFileFormats() const noexcept
Definition: initializeworkspacewizardcontext.cpp:65
const QString & getDataDir() const noexcept
Definition: initializeworkspacewizardcontext.h:68
const FilePath & getWorkspacePath() const noexcept
Definition: initializeworkspacewizardcontext.h:65
The InitializeWorkspaceWizard class.
Definition: initializeworkspacewizard.h:48
bool getWorkspaceContainsNewerFileFormats() const noexcept
Definition: initializeworkspacewizard.h:64
InitializeWorkspaceWizard & operator=(const InitializeWorkspaceWizard &rhs)=delete
const QString & getDataDir() const noexcept
Definition: initializeworkspacewizard.h:63
const FilePath & getWorkspacePath() const noexcept
Definition: initializeworkspacewizard.h:60
InitializeWorkspaceWizardContext mContext
Definition: initializeworkspacewizard.h:79
bool mForceChoosePath
Definition: initializeworkspacewizard.h:81
bool mNeedsToBeShown
Definition: initializeworkspacewizard.h:82
QScopedPointer< Ui::InitializeWorkspaceWizard > mUi
Definition: initializeworkspacewizard.h:80
InitializeWorkspaceWizard(bool forceChoosePath, QWidget *parent=nullptr) noexcept
Definition: initializeworkspacewizard.cpp:41
void updateStartPage() noexcept
Definition: initializeworkspacewizard.cpp:107
~InitializeWorkspaceWizard() noexcept
Definition: initializeworkspacewizard.cpp:72
bool getNeedsToBeShown() const noexcept
Definition: initializeworkspacewizard.h:59
InitializeWorkspaceWizard(const InitializeWorkspaceWizard &other)=delete
void setWorkspacePath(const FilePath &fp)
Definition: initializeworkspacewizard.cpp:79
Definition: occmodel.cpp:77