swift
src
gui
guiactionbind.h
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: Copyright (C) 2017 swift Project Community / Contributors
2
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
3
5
6
#ifndef SWIFT_GUI_GUIACTIONBIND_H
7
#define SWIFT_GUI_GUIACTIONBIND_H
8
9
#include <QList>
10
#include <QMenu>
11
#include <QPushButton>
12
#include <QToolButton>
13
14
#include "
core/actionbind.h
"
15
#include "
gui/swiftguiexport.h
"
16
17
namespace
swift::gui
18
{
20
class
SWIFT_GUI_EXPORT
CGuiActionBindHandler
:
public
QObject
21
{
22
Q_OBJECT
23
24
public
:
26
virtual
~
CGuiActionBindHandler
();
27
29
void
boundFunction(
bool
enabled);
30
33
static
swift::core::CActionBindings
bindMenu(
QMenu
*menu,
const
QString
&path = {});
34
37
static
swift::core::CActionBinding
bindButton(
QAbstractButton
*button,
const
QString
&path,
bool
absoluteName);
38
40
static
void
actionBindWasDestroyed(
CGuiActionBindHandler
*bindHandler);
41
43
static
const
QString
&pathSwiftPilotClient();
44
46
static
const
QString
&pathSwiftCore();
47
48
private
:
50
CGuiActionBindHandler
(
QAction
*action);
51
53
CGuiActionBindHandler
(
QAbstractButton
*button);
54
56
void
destroyed();
57
59
void
connectDestroy(
QObject
*action);
60
62
void
unbind();
63
65
void
reset();
66
68
bool
hasTarget()
const
;
69
71
static
QString
appendPath(
const
QString
&path,
const
QString
&name);
72
73
int
m_index = -1;
74
QAction
*m_action =
nullptr
;
75
QAbstractButton
*m_button =
nullptr
;
76
};
77
}
// namespace swift::gui
78
79
#endif
// SWIFT_GUI_GUIACTIONBIND_H
actionbind.h
swift::gui::CGuiActionBindHandler
QObject derived handler to be registered with swift::core::CActionBind.
Definition:
guiactionbind.h:21
swift::gui
GUI related classes.
Definition:
altitudeedit.cpp:13
QAbstractButton
QAction
QList
QMenu
QObject
QSharedPointer
QString
swiftguiexport.h
SWIFT_GUI_EXPORT
#define SWIFT_GUI_EXPORT
Export a class or function from the library.
Definition:
swiftguiexport.h:19
Generated on Sun Oct 12 2025 20:05:11 for swift by
1.9.1