Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
menutaskmenu.h
Go to the documentation of this file.
1
// Copyright (C) 2016 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
3
// Qt-Security score:significant reason:default
4
5
#
ifndef
MENUTASKMENU_H
6
#
define
MENUTASKMENU_H
7
8
#
include
<
QtDesigner
/
taskmenu
.
h
>
9
10
#
include
<
qdesigner_menu_p
.
h
>
11
#
include
<
qdesigner_menubar_p
.
h
>
12
#
include
<
extensionfactory_p
.
h
>
13
14
QT_BEGIN_NAMESPACE
15
16
class
QDesignerFormWindowInterface;
17
18
namespace
qdesigner_internal
{
19
20
class
PromotionTaskMenu;
21
22
// The QMenu task menu provides promotion and a remove option. The actual
23
// menu context options are not forwarded since they make only sense
24
// when a menu is being edited/visible.
25
26
class
MenuTaskMenu
:
public
QObject
,
public
QDesignerTaskMenuExtension
27
{
28
Q_OBJECT
29
Q_INTERFACES(QDesignerTaskMenuExtension)
30
public
:
31
explicit
MenuTaskMenu
(
QDesignerMenu
*
menu
,
QObject
*
parent
=
nullptr
);
32
33
QAction
*
preferredEditAction
()
const
override
;
34
QList
<
QAction
*>
taskActions
()
const
override
;
35
36
private
slots
:
37
void
removeMenu
();
38
39
private
:
40
QDesignerMenu *m_menu;
41
QAction *m_removeAction;
42
PromotionTaskMenu *m_promotionTaskMenu;
43
};
44
45
// The QMenuBar task menu forwards the actions of QDesignerMenuBar,
46
// making them available in the object inspector.
47
48
class
MenuBarTaskMenu
:
public
QObject
,
public
QDesignerTaskMenuExtension
49
{
50
Q_OBJECT
51
Q_INTERFACES(QDesignerTaskMenuExtension)
52
public
:
53
explicit
MenuBarTaskMenu
(
QDesignerMenuBar
*
bar
,
QObject
*
parent
=
nullptr
);
54
55
QAction
*
preferredEditAction
()
const
override
;
56
QList
<
QAction
*>
taskActions
()
const
override
;
57
58
private
:
59
QDesignerMenuBar *m_bar;
60
};
61
62
using
MenuTaskMenuFactory
=
ExtensionFactory
<
QDesignerTaskMenuExtension
,
QDesignerMenu
,
MenuTaskMenu
>;
63
using
MenuBarTaskMenuFactory
=
ExtensionFactory
<
QDesignerTaskMenuExtension
,
QDesignerMenuBar
,
MenuBarTaskMenu
>;
64
65
}
// namespace qdesigner_internal
66
67
QT_END_NAMESPACE
68
69
#
endif
// MENUTASKMENU_H
QPainter::QWidget
friend class QWidget
Definition
qpainter.h:432
qdesigner_internal::MenuBarTaskMenu
Definition
menutaskmenu.h:49
qdesigner_internal::MenuBarTaskMenu::taskActions
QList< QAction * > taskActions() const override
Definition
menutaskmenu.cpp:64
qdesigner_internal::MenuBarTaskMenu::preferredEditAction
QAction * preferredEditAction() const override
Definition
menutaskmenu.cpp:59
qdesigner_internal::MenuTaskMenu
Definition
menutaskmenu.h:27
qdesigner_internal::MenuTaskMenu::preferredEditAction
QAction * preferredEditAction() const override
Definition
menutaskmenu.cpp:26
qdesigner_internal::MenuTaskMenu::taskActions
QList< QAction * > taskActions() const override
Definition
menutaskmenu.cpp:31
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
qdesigner_internal
Auxiliary methods to store/retrieve settings.
Definition
buddyeditor.cpp:67
qttools
src
designer
src
components
taskmenu
menutaskmenu.h
Generated on
for Qt by
1.16.1