LibrePCB Developers Documentation
Loading...
Searching...
No Matches
renamebussegmentdialog.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_RENAMEBUSSEGMENTDIALOG_H
21#define LIBREPCB_EDITOR_RENAMEBUSSEGMENTDIALOG_H
22
23/*******************************************************************************
24 * Includes
25 ******************************************************************************/
26#include <QtCore>
27#include <QtWidgets>
28
29/*******************************************************************************
30 * Namespace / Forward Declarations
31 ******************************************************************************/
32namespace librepcb {
33
34class Bus;
35class SI_BusSegment;
36
37namespace editor {
38
39class UndoStack;
40
41namespace Ui {
42class RenameBusSegmentDialog;
43}
44
45/*******************************************************************************
46 * Class RenameBusSegmentDialog
47 ******************************************************************************/
48
52class RenameBusSegmentDialog final : public QDialog {
53 Q_OBJECT
54
63
64public:
65 // Constructors / Destructor
69 QWidget* parent = nullptr) noexcept;
70 ~RenameBusSegmentDialog() noexcept;
71
72 // General Methods
73 virtual void accept() noexcept override;
74
75 // Operator Overloads
76 RenameBusSegmentDialog& operator=(const RenameBusSegmentDialog& rhs) = delete;
77
78private: // Methods
79 void updateAction() noexcept;
80
81private: // Data
84 QScopedPointer<Ui::RenameBusSegmentDialog> mUi;
86 QString mNewBusName;
88};
89
90/*******************************************************************************
91 * End of File
92 ******************************************************************************/
93
94} // namespace editor
95} // namespace librepcb
96
97#endif
The Bus class.
Definition bus.h:50
The SI_BusSegment class.
Definition si_bussegment.h:52
The RenameBusSegmentDialog class.
Definition renamebussegmentdialog.h:52
void updateAction() noexcept
Definition renamebussegmentdialog.cpp:159
SI_BusSegment & mSegment
Definition renamebussegmentdialog.h:83
QScopedPointer< Ui::RenameBusSegmentDialog > mUi
Definition renamebussegmentdialog.h:84
UndoStack & mUndoStack
Definition renamebussegmentdialog.h:82
Action
Definition renamebussegmentdialog.h:55
RenameBusSegmentDialog(const RenameBusSegmentDialog &other)=delete
Action mAction
Definition renamebussegmentdialog.h:85
Bus * mNewBus
Definition renamebussegmentdialog.h:87
QString mNewBusName
Definition renamebussegmentdialog.h:86
virtual void accept() noexcept override
Definition renamebussegmentdialog.cpp:113
The UndoStack class holds UndoCommand objects and provides undo/redo commands.
Definition undostack.h:106
Definition occmodel.cpp:77