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 ******************************************************************************/
34namespace librepcb {
35
36class Library;
37class Workspace;
38
39namespace editor {
40
41namespace Ui {
42class LibraryInfoWidget;
43}
44
45/*******************************************************************************
46 * Class LibraryInfoWidget
47 ******************************************************************************/
48
52class LibraryInfoWidget final : public QWidget {
53 Q_OBJECT
54
55public:
56 // Constructors / Destructor
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
68signals:
70
71private: // Methods
72 void btnOpenLibraryEditorClicked() noexcept;
73 void btnRemoveLibraryClicked() noexcept;
74 bool isRemoteLibrary() const noexcept;
75
76private: // Data
77 QScopedPointer<Ui::LibraryInfoWidget> mUi;
80};
81
82/*******************************************************************************
83 * End of File
84 ******************************************************************************/
85
86} // namespace editor
87} // namespace librepcb
88
89#endif
This class represents absolute, well-formatted paths to files or directories.
Definition: filepath.h:129
The Workspace class represents a workspace with all its data (library, projects, settings,...
Definition: workspace.h:54
The LibraryInfoWidget class.
Definition: libraryinfowidget.h:52
void btnOpenLibraryEditorClicked() noexcept
Definition: libraryinfowidget.cpp:128
QString getName() const noexcept
~LibraryInfoWidget() noexcept
Definition: libraryinfowidget.cpp:121
LibraryInfoWidget(const LibraryInfoWidget &other)=delete
void openLibraryEditorTriggered(const FilePath &libDir)
FilePath mLibDir
Definition: libraryinfowidget.h:79
QScopedPointer< Ui::LibraryInfoWidget > mUi
Definition: libraryinfowidget.h:77
Workspace & mWorkspace
Definition: libraryinfowidget.h:78
bool isRemoteLibrary() const noexcept
Definition: libraryinfowidget.cpp:151
void btnRemoveLibraryClicked() noexcept
Definition: libraryinfowidget.cpp:132
Definition: occmodel.cpp:77