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
actioneditor_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 ACTIONEDITOR_H
16#define ACTIONEDITOR_H
17
19#include "shared_enums_p.h"
20#include <QtDesigner/abstractactioneditor.h>
21
22#include <QtCore/qpointer.h>
23
25
26class QDesignerPropertyEditorInterface;
27class QDesignerSettingsInterface;
28class QMenu;
29class QActionGroup;
30class QItemSelection;
31class QListWidget;
32class QPushButton;
33class QLineEdit;
34class QToolButton;
35
36namespace qdesigner_internal {
37
38class ActionView;
39class ResourceMimeData;
40
42{
44public:
46 Qt::WindowFlags flags = {});
48
51
53
54 QAction *actionNew() const;
55 QAction *actionDelete() const;
56
57 QString filter() const;
58
61
64
66 const QString &prefix = QLatin1StringView("action"));
67
68 // Utility to create a configure button with menu for usage on toolbars
70
71public slots:
72 void setFilter(const QString &filter);
74 void clearSelection();
75 void selectAction(QAction *a); // For use by the menu editor
76
77private slots:
80 void editAction(QAction *item, int column = -1);
81 void editCurrentAction();
83 void slotActionChanged();
84 void slotNewAction();
85 void slotDelete();
88 void slotViewMode(QAction *a);
90#if QT_CONFIG(clipboard)
91 void slotCopy();
92 void slotCut();
93 void slotPaste();
94#endif
95
98 // Context menu for item or global menu if item == 0.
100
101private:
102 using ActionList = QList<QAction *>;
104#if QT_CONFIG(clipboard)
106#endif
107
108 void restoreSettings();
109 void saveSettings();
110
112
114
118
120
124#if QT_CONFIG(clipboard)
128#endif
131
135
138 bool m_withinSelectAction = false;
139};
140
141} // namespace qdesigner_internal
142
143QT_END_NAMESPACE
144
145#endif // ACTIONEDITOR_H
friend class QWidget
Definition qpainter.h:421
void removeFormWindow(QDesignerFormWindowInterface *formWindow) override
int formWindowCount() const override
Returns the number of form windows maintained by \QD's form window manager.
QPixmap createPreviewPixmap() const override
Creates a pixmap representing the preview of the currently active form.
QActionGroup * actionGroup(ActionGroup actionGroup) const override
Returns the action group specified by the enumeration value actionGroup.
bool eventFilter(QObject *o, QEvent *e) override
Filters events if this object has been installed as an event filter for the watched object.
QDesignerFormWindowInterface * formWindow(int index) const override
Returns the form window at the given index.
QDesignerFormWindowInterface * activeFormWindow() const override
Returns the currently active form window in \QD's workspace.
QDesignerFormWindowInterface * createFormWindow(QWidget *parentWidget=nullptr, Qt::WindowFlags flags={}) override
Creates a form window with the given parent and the given window flags.
void dragItems(const QList< QDesignerDnDItemInterface * > &item_list) override
void setActiveFormWindow(QDesignerFormWindowInterface *formWindow) override
QDesignerFormEditorInterface * core() const override
Returns a pointer to \QD's current QDesignerFormEditorInterface object.
QAction * action(Action action) const override
Returns the action specified by the enumeration value action.
void accept() override
Hides the modal dialog and sets the result code to Accepted.
static FormWindow * findFormWindow(QWidget *w)
void createLayout(int type, QWidget *container=nullptr)
QWidget * mainContainer() const override
Returns the main container widget for the form window.
void endCommand() override
Ends execution of the current command.
bool isMainContainer(const QWidget *w) const
int currentTool() const override
Returns the index of the current tool in use.
void emitSelectionChanged() override
Emits the selectionChanged() signal.
bool hasInsertedChildren(QWidget *w) const
bool isManaged(QWidget *w) const override
Returns true if the specified widget is managed by the form window; otherwise returns false.
static Iterator findFirstChildOf(Iterator it, Iterator end, const QWidget *w)
static QString whatsThisFrom(const QString &str)
Combined button and popup list for selecting options.
Auxiliary methods to store/retrieve settings.
static QWidget * findLayoutContainer(const FormWindow *fw)
static bool hasManagedLayoutItems(const QDesignerFormEditorInterface *core, QWidget *w)
#define QDESIGNER_SHARED_EXPORT