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
buddyeditor_plugin.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 BUDDYEDITOR_PLUGIN_H
5#define BUDDYEDITOR_PLUGIN_H
6
8
9#include <QtDesigner/abstractformeditorplugin.h>
10
11#include <QtCore/qpointer.h>
12#include <QtCore/qhash.h>
13
14QT_BEGIN_NAMESPACE
15
16class QDesignerFormWindowInterface;
17class QAction;
18
19namespace qdesigner_internal {
20
21class BuddyEditorTool;
22
24{
25 Q_OBJECT
26 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDesignerFormEditorPluginInterface" FILE "buddyeditor.json")
28public:
31
32 bool isInitialized() const override;
33 void initialize(QDesignerFormEditorInterface *core) override;
34 QAction *action() const override;
35
36 QDesignerFormEditorInterface *core() const override;
37
38public slots:
40
41private slots:
43 void removeFormWindow(QDesignerFormWindowInterface *formWindow);
44
45private:
46 QPointer<QDesignerFormEditorInterface> m_core;
47 QHash<QDesignerFormWindowInterface*, BuddyEditorTool*> m_tools;
48 bool m_initialized = false;
49 QAction *m_action = nullptr;
50};
51
52} // namespace qdesigner_internal
53
54QT_END_NAMESPACE
55
56#endif // BUDDYEDITOR_PLUGIN_H
#define QT_BUDDYEDITOR_EXPORT
bool isInitialized() const override
Returns true if the plugin interface is initialized; otherwise returns false.
void initialize(QDesignerFormEditorInterface *core) override
Initializes the plugin interface for the specified core interface.
QDesignerFormEditorInterface * core() const override
Returns the core form editor interface associated with this component.
QAction * action() const override
Returns the action associated with this interface.
Combined button and popup list for selecting options.
Auxiliary methods to store/retrieve settings.