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