LibrePCB Developers Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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_WORKSPACE_LIBRARYINFOWIDGET_H
21 #define LIBREPCB_WORKSPACE_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 namespace workspace {
37 class Workspace;
38 }
39 
40 namespace library {
41 
42 class Library;
43 
44 namespace manager {
45 
46 namespace Ui {
47 class LibraryInfoWidget;
48 }
49 
50 /*******************************************************************************
51  * Class LibraryInfoWidget
52  ******************************************************************************/
53 
57 class LibraryInfoWidget final : public QWidget {
58  Q_OBJECT
59 
60 public:
61  // Constructors / Destructor
62  LibraryInfoWidget() noexcept;
63  LibraryInfoWidget(const LibraryInfoWidget& other) = delete;
65  ~LibraryInfoWidget() noexcept;
66 
67  // Getters
68  QString getName() const noexcept;
69 
70  // Operator Overloadings
71  LibraryInfoWidget& operator=(const LibraryInfoWidget& rhs) = delete;
72 
73 signals:
74  void openLibraryEditorTriggered(const FilePath& libDir);
75 
76 private: // Methods
77  void btnOpenLibraryEditorClicked() noexcept;
78  void btnRemoveLibraryClicked() noexcept;
79  bool isRemoteLibrary() const noexcept;
80 
81 private: // Data
82  QScopedPointer<Ui::LibraryInfoWidget> mUi;
85 };
86 
87 /*******************************************************************************
88  * End of File
89  ******************************************************************************/
90 
91 } // namespace manager
92 } // namespace library
93 } // namespace librepcb
94 
95 #endif // LIBREPCB_WORKSPACE_LIBRARYINFOWIDGET_H
void btnRemoveLibraryClicked() noexcept
Definition: libraryinfowidget.cpp:125
The Workspace class represents a workspace with all its data (library, projects, settings, ...)
Definition: workspace.h:62
LibraryInfoWidget & operator=(const LibraryInfoWidget &rhs)=delete
workspace::Workspace & mWorkspace
Definition: libraryinfowidget.h:83
The LibraryInfoWidget class.
Definition: libraryinfowidget.h:57
void btnOpenLibraryEditorClicked() noexcept
Definition: libraryinfowidget.cpp:121
bool isRemoteLibrary() const noexcept
Definition: libraryinfowidget.cpp:145
~LibraryInfoWidget() noexcept
Definition: libraryinfowidget.cpp:114
This class represents absolute, well-formatted paths to files or directories.
Definition: filepath.h:127
QScopedPointer< Ui::LibraryInfoWidget > mUi
Definition: libraryinfowidget.h:82
void openLibraryEditorTriggered(const FilePath &libDir)
FilePath mLibDir
Definition: libraryinfowidget.h:84