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
promotiontaskmenu_p.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//
6// W A R N I N G
7// -------------
8//
9// This file is not part of the Qt API. It exists for the convenience
10// of Qt Designer. This header
11// file may change from version to version without notice, or even be removed.
12//
13// We mean it.
14//
15
16#ifndef PROMOTIONTASKMENU_H
17#define PROMOTIONTASKMENU_H
18
20
21#include <QtCore/qlist.h>
22#include <QtCore/qobject.h>
23#include <QtCore/qpointer.h>
24
26
27class QDesignerFormWindowInterface;
28class QDesignerFormEditorInterface;
29
30class QAction;
31class QMenu;
32class QWidget;
33
34namespace qdesigner_internal {
35
36// A helper class for creating promotion context menus and handling promotion actions.
37
39{
41public:
47
49
50 Mode mode() const;
51 void setMode(Mode m);
52
54
55 // Set menu labels
58 // Defaults to "Demote to %1".arg(class).
60
62
64
65 // Adds a list of promotion actions according to the current promotion state of the widget.
67 // Convenience that finds the form window.
68 void addActions(unsigned flags, ActionList &actionList);
69
71 void addActions(unsigned flags, QMenu *menu);
72
73 // Pop up the editor in a global context.
75
76private slots:
80 void slotEditPromoteTo();
82
83private:
85
89
92
94
96
97 // Per-Widget actions
99
103
106};
107
108} // namespace qdesigner_internal
109
110QT_END_NAMESPACE
111
112#endif // PROMOTIONTASKMENU_H
friend class QWidget
Definition qpainter.h:432
QObject * createExtension(QObject *object, const QString &iid, QObject *parent) const override
Creates an extension specified by iid for the given object.
QDesignerContainerExtension * containerExtension() const
Combined button and popup list for selecting options.
Auxiliary methods to store/retrieve settings.
#define QDESIGNER_SHARED_EXPORT