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
4//
5// W A R N I N G
6// -------------
7//
8// This file is not part of the Qt API. It exists for the convenience
9// of Qt Designer. This header
10// file may change from version to version without notice, or even be removed.
11//
12// We mean it.
13//
14
15#ifndef PROMOTIONTASKMENU_H
16#define PROMOTIONTASKMENU_H
17
19
20#include <QtCore/qlist.h>
21#include <QtCore/qobject.h>
22#include <QtCore/qpointer.h>
23
25
26class QDesignerFormWindowInterface;
27class QDesignerFormEditorInterface;
28
29class QAction;
30class QMenu;
31class QWidget;
32
33namespace qdesigner_internal {
34
35// A helper class for creating promotion context menus and handling promotion actions.
36
38{
40public:
46
48
49 Mode mode() const;
50 void setMode(Mode m);
51
53
54 // Set menu labels
57 // Defaults to "Demote to %1".arg(class).
59
61
63
64 // Adds a list of promotion actions according to the current promotion state of the widget.
66 // Convenience that finds the form window.
67 void addActions(unsigned flags, ActionList &actionList);
68
70 void addActions(unsigned flags, QMenu *menu);
71
72 // Pop up the editor in a global context.
74
75private slots:
79 void slotEditPromoteTo();
81
82private:
84
88
91
93
95
96 // Per-Widget actions
98
102
105};
106
107} // namespace qdesigner_internal
108
109QT_END_NAMESPACE
110
111#endif // PROMOTIONTASKMENU_H
friend class QWidget
Definition qpainter.h:421
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