LibrePCB Developers Documentation
libraryinfowidget.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_LIBRARYINFOWIDGET_H
21 #define LIBREPCB_EDITOR_LIBRARYINFOWIDGET_H
22 
23 /*******************************************************************************
24  * Includes
25  ******************************************************************************/
27 
28 #include <QtCore>
29 #include <QtWidgets>
30 
31 /*******************************************************************************
32  * Namespace / Forward Declarations
33  ******************************************************************************/
34 namespace librepcb {
35 
36 class Library;
37 class Workspace;
38 
39 namespace editor {
40 
41 namespace Ui {
42 class LibraryInfoWidget;
43 }
44 
45 /*******************************************************************************
46  * Class LibraryInfoWidget
47  ******************************************************************************/
48 
52 class LibraryInfoWidget final : public QWidget {
53  Q_OBJECT
54 
55 public:
56  // Constructors / Destructor
57  LibraryInfoWidget() = delete;
58  LibraryInfoWidget(const LibraryInfoWidget& other) = delete;
59  LibraryInfoWidget(Workspace& ws, const FilePath& libDir);
60  ~LibraryInfoWidget() noexcept;
61 
62  // Getters
63  QString getName() const noexcept;
64 
65  // Operator Overloadings
66  LibraryInfoWidget& operator=(const LibraryInfoWidget& rhs) = delete;
67 
68 signals:
69  void openLibraryEditorTriggered(const FilePath& libDir);
70 
71 private: // Methods
72  void btnOpenLibraryEditorClicked() noexcept;
73  void btnRemoveLibraryClicked() noexcept;
74  bool isRemoteLibrary() const noexcept;
75 
76 private: // Data
77  QScopedPointer<Ui::LibraryInfoWidget> mUi;
80 };
81 
82 /*******************************************************************************
83  * End of File
84  ******************************************************************************/
85 
86 } // namespace editor
87 } // namespace librepcb
88 
89 #endif
Workspace & mWorkspace
Definition: libraryinfowidget.h:78
Definition: occmodel.cpp:77
QScopedPointer< Ui::LibraryInfoWidget > mUi
Definition: libraryinfowidget.h:77
This class represents absolute, well-formatted paths to files or directories.
Definition: filepath.h:129
FilePath mLibDir
Definition: libraryinfowidget.h:79
The LibraryInfoWidget class.
Definition: libraryinfowidget.h:52
The Workspace class represents a workspace with all its data (library, projects, settings, ...)
Definition: workspace.h:54