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
14
15class QDesignerFormWindowInterface;
16
17namespace 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
26{
27 Q_OBJECT
28 Q_INTERFACES(QDesignerTaskMenuExtension)
29public:
30 explicit MenuTaskMenu(QDesignerMenu *menu, QObject *parent = nullptr);
31
32 QAction *preferredEditAction() const override;
33 QList<QAction*> taskActions() const override;
34
35private slots:
36 void removeMenu();
37
38private:
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
48{
49 Q_OBJECT
50 Q_INTERFACES(QDesignerTaskMenuExtension)
51public:
52 explicit MenuBarTaskMenu(QDesignerMenuBar *bar, QObject *parent = nullptr);
53
54 QAction *preferredEditAction() const override;
55 QList<QAction*> taskActions() const override;
56
57private:
58 QDesignerMenuBar *m_bar;
59};
60
63
64} // namespace qdesigner_internal
65
66QT_END_NAMESPACE
67
68#endif // MENUTASKMENU_H
friend class QWidget
Definition qpainter.h:421
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.