LibrePCB Developers Documentation
Loading...
Searching...
No Matches
keysequenceseditorwidget.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_KEYSEQUENCESEDITORWIDGET_H
21
#define LIBREPCB_EDITOR_KEYSEQUENCESEDITORWIDGET_H
22
23
/*******************************************************************************
24
* Includes
25
******************************************************************************/
26
#include <QtCore>
27
#include <QtWidgets>
28
29
#include <optional>
30
31
/*******************************************************************************
32
* Namespace / Forward Declarations
33
******************************************************************************/
34
namespace
librepcb
{
35
namespace
editor {
36
37
/*******************************************************************************
38
* Class KeySequencesEditorWidget
39
******************************************************************************/
40
46
class
KeySequencesEditorWidget
final :
public
QWidget {
47
Q_OBJECT
48
49
public
:
50
// Constructors / Destructor
51
KeySequencesEditorWidget
() =
delete
;
52
explicit
KeySequencesEditorWidget
(
const
QList<QKeySequence>& defaultSequences,
53
QWidget* parent =
nullptr
) noexcept;
54
KeySequencesEditorWidget
(const
KeySequencesEditorWidget
& other) = delete;
55
~
KeySequencesEditorWidget
() noexcept;
56
57
// General Methods
58
const
std
::optional<QList<QKeySequence>>&
getOverrides
() const noexcept {
59
return
mOverrides
;
60
}
61
void
setOverrides
(
62
const
std::optional<QList<QKeySequence>>& overrides)
noexcept
;
63
void
setRowHeight
(
int
height)
noexcept
;
64
65
// Operator Overloadings
66
KeySequencesEditorWidget
&
operator=
(
const
KeySequencesEditorWidget
& rhs) =
67
delete
;
68
69
signals:
70
void
applyTriggered
();
71
void
cancelTriggered
();
72
73
private
:
// Methods
74
void
updateWidgets
() noexcept;
75
76
private:
// Data
77
QPointer<QVBoxLayout>
mLayout
;
78
QList<QKeySequence>
mDefault
;
79
std
::optional<QList<QKeySequence>>
mOverrides
;
80
int
mRowHeight
;
81
};
82
83
/*******************************************************************************
84
* End of File
85
******************************************************************************/
86
87
}
// namespace editor
88
}
// namespace librepcb
89
90
#endif
librepcb::editor::KeySequencesEditorWidget
A widget to modify a list of QKeySequence objects.
Definition
keysequenceseditorwidget.h:46
librepcb::editor::KeySequencesEditorWidget::updateWidgets
void updateWidgets() noexcept
Definition
keysequenceseditorwidget.cpp:83
librepcb::editor::KeySequencesEditorWidget::operator=
KeySequencesEditorWidget & operator=(const KeySequencesEditorWidget &rhs)=delete
librepcb::editor::KeySequencesEditorWidget::getOverrides
const std::optional< QList< QKeySequence > > & getOverrides() const noexcept
Definition
keysequenceseditorwidget.h:58
librepcb::editor::KeySequencesEditorWidget::setOverrides
void setOverrides(const std::optional< QList< QKeySequence > > &overrides) noexcept
Definition
keysequenceseditorwidget.cpp:59
librepcb::editor::KeySequencesEditorWidget::mRowHeight
int mRowHeight
Definition
keysequenceseditorwidget.h:80
librepcb::editor::KeySequencesEditorWidget::cancelTriggered
void cancelTriggered()
librepcb::editor::KeySequencesEditorWidget::mOverrides
std::optional< QList< QKeySequence > > mOverrides
Definition
keysequenceseditorwidget.h:79
librepcb::editor::KeySequencesEditorWidget::mDefault
QList< QKeySequence > mDefault
Definition
keysequenceseditorwidget.h:78
librepcb::editor::KeySequencesEditorWidget::mLayout
QPointer< QVBoxLayout > mLayout
Definition
keysequenceseditorwidget.h:77
librepcb::editor::KeySequencesEditorWidget::applyTriggered
void applyTriggered()
librepcb::editor::KeySequencesEditorWidget::setRowHeight
void setRowHeight(int height) noexcept
Definition
keysequenceseditorwidget.cpp:65
librepcb::editor::KeySequencesEditorWidget::KeySequencesEditorWidget
KeySequencesEditorWidget()=delete
librepcb
Definition
occmodel.cpp:76
std
Definition
uuid.h:186
libs
librepcb
editor
widgets
keysequenceseditorwidget.h
Generated on Thu Dec 26 2024 10:51:32 for LibrePCB Developers Documentation by
1.9.8