QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
ToolStripAction.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <QtCore/QObject>
4
#include <QtQmlIntegration/QtQmlIntegration>
5
6
class
QQmlComponent;
7
8
class
ToolStripAction
:
public
QObject
9
{
10
Q_OBJECT
11
QML_ELEMENT
12
Q_MOC_INCLUDE(
"QtQml/QQmlComponent"
)
13
14
public
:
15
ToolStripAction
(QObject* parent =
nullptr
);
16
17
Q_PROPERTY(
bool
enabled
READ
enabled
WRITE
setEnabled
NOTIFY
enabledChanged
)
18
Q_PROPERTY(
bool
visible
READ
visible
WRITE
setVisible
NOTIFY
visibleChanged
)
19
Q_PROPERTY(
bool
checkable
READ
checkable
WRITE
setCheckable
NOTIFY
checkableChanged
)
20
Q_PROPERTY(
bool
checked
READ
checked
WRITE
setChecked
NOTIFY
checkedChanged
)
21
Q_PROPERTY(
bool
showAlternateIcon
READ
showAlternateIcon
WRITE
setShowAlternateIcon
NOTIFY
showAlternateIconChanged
)
22
Q_PROPERTY(
bool
biColorIcon
READ
biColorIcon
WRITE
setbiColorIcon
NOTIFY
biColorIconChanged
)
23
Q_PROPERTY(
bool
fullColorIcon
READ
fullColorIcon
WRITE
setfullColorIcon
NOTIFY
fullColorIconChanged
)
24
Q_PROPERTY(
bool
nonExclusive
READ
nonExclusive
WRITE
setNonExclusive
NOTIFY
nonExclusiveChanged
)
25
Q_PROPERTY(
int
toolStripIndex
READ
toolStripIndex
WRITE
setToolStripIndex
NOTIFY
toolStripIndexChanged
)
26
Q_PROPERTY(QString
text
READ
text
WRITE
setText
NOTIFY
textChanged
)
27
Q_PROPERTY(QString
iconSource
READ
iconSource
WRITE
setIconSource
NOTIFY
iconSourceChanged
)
28
Q_PROPERTY(QString
alternateIconSource
READ
alternateIconSource
WRITE
setAlternateIconSource
NOTIFY
alternateIconSourceChanged
)
29
Q_PROPERTY(QQmlComponent*
dropPanelComponent
READ
dropPanelComponent
WRITE
setDropPanelComponent
NOTIFY
dropPanelComponentChanged
)
30
31
bool
enabled
(
void
)
const
{
return
_enabled
; }
32
bool
visible
(
void
)
const
{
return
_visible
; }
33
bool
checkable
(
void
)
const
{
return
_checkable
; }
34
bool
checked
(
void
)
const
{
return
_checked
; }
35
bool
showAlternateIcon
(
void
)
const
{
return
_showAlternateIcon
; }
36
bool
biColorIcon
(
void
)
const
{
return
_biColorIcon
; }
37
bool
fullColorIcon
(
void
)
const
{
return
_fullColorIcon
; }
38
bool
nonExclusive
(
void
)
const
{
return
_nonExclusive
; }
39
int
toolStripIndex
(
void
)
const
{
return
_toolStripIndex
; }
40
QString
text
(
void
)
const
{
return
_text
; }
41
QString
iconSource
(
void
)
const
{
return
_iconSource
; }
42
QString
alternateIconSource
(
void
)
const
{
return
_alternateIconSource
; }
43
QQmlComponent*
dropPanelComponent
(
void
)
const
{
return
_dropPanelComponent
; }
44
45
void
setEnabled
(
bool
enabled
);
46
void
setVisible
(
bool
visible
);
47
void
setCheckable
(
bool
checkable
);
48
void
setChecked
(
bool
checked
);
49
void
setShowAlternateIcon
(
bool
showAlternateIcon
);
50
void
setbiColorIcon
(
bool
biColorIcon
);
51
void
setfullColorIcon
(
bool
fullColorIcon
);
52
void
setNonExclusive
(
bool
nonExclusive
);
53
void
setToolStripIndex
(
int
toolStripIndex
);
54
void
setText
(
const
QString&
text
);
55
void
setIconSource
(
const
QString&
iconSource
);
56
void
setAlternateIconSource
(
const
QString&
alternateIconSource
);
57
void
setDropPanelComponent
(QQmlComponent*
dropPanelComponent
);
58
59
signals:
60
void
enabledChanged
(
bool
enabled
);
61
void
visibleChanged
(
bool
visible
);
62
void
checkableChanged
(
bool
checkable
);
63
void
checkedChanged
(
bool
checked
);
64
void
showAlternateIconChanged
(
bool
showAlternateIcon
);
65
void
biColorIconChanged
(
bool
biColorIcon
);
66
void
fullColorIconChanged
(
bool
fullColorIcon
);
67
void
nonExclusiveChanged
(
bool
nonExclusive
);
68
void
toolStripIndexChanged
(
int
toolStripIndex
);
69
void
textChanged
(QString
text
);
70
void
iconSourceChanged
(QString
iconSource
);
71
void
alternateIconSourceChanged
(QString
alternateIconSource
);
72
void
triggered
(QObject* source);
73
void
dropPanelComponentChanged
(
void
);
74
75
protected
:
76
bool
_enabled
=
true
;
77
bool
_visible
=
true
;
78
bool
_checkable
=
false
;
79
bool
_checked
=
false
;
80
bool
_showAlternateIcon
=
false
;
81
bool
_biColorIcon
=
false
;
82
bool
_fullColorIcon
=
false
;
83
bool
_nonExclusive
=
false
;
84
int
_toolStripIndex
= -1;
85
QString
_text
;
86
QString
_iconSource
;
87
QString
_alternateIconSource
;
88
QQmlComponent*
_dropPanelComponent
=
nullptr
;
89
};
ToolStripAction
Definition
ToolStripAction.h:9
ToolStripAction::setDropPanelComponent
void setDropPanelComponent(QQmlComponent *dropPanelComponent)
Definition
ToolStripAction.cc:117
ToolStripAction::setEnabled
void setEnabled(bool enabled)
Definition
ToolStripAction.cc:11
ToolStripAction::dropPanelComponent
QQmlComponent * dropPanelComponent(void) const
Definition
ToolStripAction.h:43
ToolStripAction::setText
void setText(const QString &text)
Definition
ToolStripAction.cc:91
ToolStripAction::_text
QString _text
Definition
ToolStripAction.h:85
ToolStripAction::_toolStripIndex
int _toolStripIndex
Definition
ToolStripAction.h:84
ToolStripAction::toolStripIndexChanged
void toolStripIndexChanged(int toolStripIndex)
ToolStripAction::setAlternateIconSource
void setAlternateIconSource(const QString &alternateIconSource)
Definition
ToolStripAction.cc:109
ToolStripAction::dropPanelComponentChanged
void dropPanelComponentChanged(void)
ToolStripAction::setChecked
void setChecked(bool checked)
Definition
ToolStripAction.cc:37
ToolStripAction::setShowAlternateIcon
void setShowAlternateIcon(bool showAlternateIcon)
Definition
ToolStripAction.cc:46
ToolStripAction::toolStripIndex
int toolStripIndex(void) const
Definition
ToolStripAction.h:39
ToolStripAction::textChanged
void textChanged(QString text)
ToolStripAction::enabled
bool enabled(void) const
Definition
ToolStripAction.h:31
ToolStripAction::nonExclusive
bool nonExclusive(void) const
Definition
ToolStripAction.h:38
ToolStripAction::biColorIconChanged
void biColorIconChanged(bool biColorIcon)
ToolStripAction::alternateIconSourceChanged
void alternateIconSourceChanged(QString alternateIconSource)
ToolStripAction::_checkable
bool _checkable
Definition
ToolStripAction.h:78
ToolStripAction::visible
bool visible(void) const
Definition
ToolStripAction.h:32
ToolStripAction::_showAlternateIcon
bool _showAlternateIcon
Definition
ToolStripAction.h:80
ToolStripAction::fullColorIconChanged
void fullColorIconChanged(bool fullColorIcon)
ToolStripAction::iconSourceChanged
void iconSourceChanged(QString iconSource)
ToolStripAction::alternateIconSource
QString alternateIconSource(void) const
Definition
ToolStripAction.h:42
ToolStripAction::visibleChanged
void visibleChanged(bool visible)
ToolStripAction::checkable
bool checkable(void) const
Definition
ToolStripAction.h:33
ToolStripAction::_biColorIcon
bool _biColorIcon
Definition
ToolStripAction.h:81
ToolStripAction::setToolStripIndex
void setToolStripIndex(int toolStripIndex)
Definition
ToolStripAction.cc:82
ToolStripAction::setIconSource
void setIconSource(const QString &iconSource)
Definition
ToolStripAction.cc:100
ToolStripAction::_checked
bool _checked
Definition
ToolStripAction.h:79
ToolStripAction::checkableChanged
void checkableChanged(bool checkable)
ToolStripAction::_dropPanelComponent
QQmlComponent * _dropPanelComponent
Definition
ToolStripAction.h:88
ToolStripAction::_fullColorIcon
bool _fullColorIcon
Definition
ToolStripAction.h:82
ToolStripAction::iconSource
QString iconSource(void) const
Definition
ToolStripAction.h:41
ToolStripAction::_visible
bool _visible
Definition
ToolStripAction.h:77
ToolStripAction::showAlternateIcon
bool showAlternateIcon(void) const
Definition
ToolStripAction.h:35
ToolStripAction::fullColorIcon
bool fullColorIcon(void) const
Definition
ToolStripAction.h:37
ToolStripAction::checkedChanged
void checkedChanged(bool checked)
ToolStripAction::text
QString text(void) const
Definition
ToolStripAction.h:40
ToolStripAction::setfullColorIcon
void setfullColorIcon(bool fullColorIcon)
Definition
ToolStripAction.cc:64
ToolStripAction::_iconSource
QString _iconSource
Definition
ToolStripAction.h:86
ToolStripAction::showAlternateIconChanged
void showAlternateIconChanged(bool showAlternateIcon)
ToolStripAction::_nonExclusive
bool _nonExclusive
Definition
ToolStripAction.h:83
ToolStripAction::_alternateIconSource
QString _alternateIconSource
Definition
ToolStripAction.h:87
ToolStripAction::nonExclusiveChanged
void nonExclusiveChanged(bool nonExclusive)
ToolStripAction::setCheckable
void setCheckable(bool checkable)
Definition
ToolStripAction.cc:28
ToolStripAction::_enabled
bool _enabled
Definition
ToolStripAction.h:76
ToolStripAction::enabledChanged
void enabledChanged(bool enabled)
ToolStripAction::biColorIcon
bool biColorIcon(void) const
Definition
ToolStripAction.h:36
ToolStripAction::setbiColorIcon
void setbiColorIcon(bool biColorIcon)
Definition
ToolStripAction.cc:55
ToolStripAction::triggered
void triggered(QObject *source)
ToolStripAction::setVisible
void setVisible(bool visible)
Definition
ToolStripAction.cc:19
ToolStripAction::checked
bool checked(void) const
Definition
ToolStripAction.h:34
ToolStripAction::setNonExclusive
void setNonExclusive(bool nonExclusive)
Definition
ToolStripAction.cc:73
src
QmlControls
ToolStripAction.h
Generated by
1.9.8