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
15
16class QDesignerFormWindowInterface;
17
18namespace 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
27{
28 Q_OBJECT
29 Q_INTERFACES(QDesignerTaskMenuExtension)
30public:
31 explicit MenuTaskMenu(QDesignerMenu *menu, QObject *parent = nullptr);
32
33 QAction *preferredEditAction() const override;
34 QList<QAction*> taskActions() const override;
35
36private slots:
37 void removeMenu();
38
39private:
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
49{
50 Q_OBJECT
51 Q_INTERFACES(QDesignerTaskMenuExtension)
52public:
53 explicit MenuBarTaskMenu(QDesignerMenuBar *bar, QObject *parent = nullptr);
54
55 QAction *preferredEditAction() const override;
56 QList<QAction*> taskActions() const override;
57
58private:
59 QDesignerMenuBar *m_bar;
60};
61
64
65} // namespace qdesigner_internal
66
67QT_END_NAMESPACE
68
69#endif // MENUTASKMENU_H
friend class QWidget
Definition qpainter.h:432
QList< QAction * > taskActions() const override
QAction * preferredEditAction() const override
QAction * preferredEditAction() const override
QList< QAction * > taskActions() const override
Combined button and popup list for selecting options.
Auxiliary methods to store/retrieve settings.