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
4
#
ifndef
MENUTASKMENU_H
5
#
define
MENUTASKMENU_H
6
7
#
include
<
QtDesigner
/
taskmenu
.
h
>
8
9
#
include
<
qdesigner_menu_p
.
h
>
10
#
include
<
qdesigner_menubar_p
.
h
>
11
#
include
<
extensionfactory_p
.
h
>
12
13
QT_BEGIN_NAMESPACE
14
15
class
QDesignerFormWindowInterface;
16
17
namespace
qdesigner_internal
{
18
19
class
PromotionTaskMenu;
20
21
// The QMenu task menu provides promotion and a remove option. The actual
22
// menu context options are not forwarded since they make only sense
23
// when a menu is being edited/visible.
24
25
class
MenuTaskMenu
:
public
QObject
,
public
QDesignerTaskMenuExtension
26
{
27
Q_OBJECT
28
Q_INTERFACES(QDesignerTaskMenuExtension)
29
public
:
30
explicit
MenuTaskMenu
(
QDesignerMenu
*
menu
,
QObject
*
parent
=
nullptr
);
31
32
QAction
*
preferredEditAction
()
const
override
;
33
QList
<
QAction
*>
taskActions
()
const
override
;
34
35
private
slots
:
36
void
removeMenu
();
37
38
private
:
39
QDesignerMenu *m_menu;
40
QAction *m_removeAction;
41
PromotionTaskMenu *m_promotionTaskMenu;
42
};
43
44
// The QMenuBar task menu forwards the actions of QDesignerMenuBar,
45
// making them available in the object inspector.
46
47
class
MenuBarTaskMenu
:
public
QObject
,
public
QDesignerTaskMenuExtension
48
{
49
Q_OBJECT
50
Q_INTERFACES(QDesignerTaskMenuExtension)
51
public
:
52
explicit
MenuBarTaskMenu
(
QDesignerMenuBar
*
bar
,
QObject
*
parent
=
nullptr
);
53
54
QAction
*
preferredEditAction
()
const
override
;
55
QList
<
QAction
*>
taskActions
()
const
override
;
56
57
private
:
58
QDesignerMenuBar *m_bar;
59
};
60
61
using
MenuTaskMenuFactory
=
ExtensionFactory
<
QDesignerTaskMenuExtension
,
QDesignerMenu
,
MenuTaskMenu
>;
62
using
MenuBarTaskMenuFactory
=
ExtensionFactory
<
QDesignerTaskMenuExtension
,
QDesignerMenuBar
,
MenuBarTaskMenu
>;
63
64
}
// namespace qdesigner_internal
65
66
QT_END_NAMESPACE
67
68
#
endif
// MENUTASKMENU_H
QPainter::QWidget
friend class QWidget
Definition
qpainter.h:421
qdesigner_internal::MenuBarTaskMenu
Definition
menutaskmenu.h:48
qdesigner_internal::MenuBarTaskMenu::taskActions
QList< QAction * > taskActions() const override
Definition
menutaskmenu.cpp:63
qdesigner_internal::MenuBarTaskMenu::preferredEditAction
QAction * preferredEditAction() const override
Definition
menutaskmenu.cpp:58
qdesigner_internal::MenuTaskMenu
Definition
menutaskmenu.h:26
qdesigner_internal::MenuTaskMenu::preferredEditAction
QAction * preferredEditAction() const override
Definition
menutaskmenu.cpp:25
qdesigner_internal::MenuTaskMenu::taskActions
QList< QAction * > taskActions() const override
Definition
menutaskmenu.cpp:30
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qstandardpaths_haiku.cpp:21
qdesigner_internal
Auxiliary methods to store/retrieve settings.
Definition
buddyeditor.cpp:66
qttools
src
designer
src
components
taskmenu
menutaskmenu.h
Generated on Sat Sep 21 2024 00:50:26 for Qt by
1.12.0