8#include <iconloader_p.h>
10#include <QtDesigner/abstractformeditor.h>
11#include <QtDesigner/abstractformwindowmanager.h>
13#include <QtGui/qaction.h>
17using namespace Qt::StringLiterals;
34 m_action =
new QAction(tr(
"Edit Signals/Slots"),
this);
35 m_action->setObjectName(u"__qt_edit_signals_slots_action"_s);
36 m_action->setShortcut(tr(
"F4"));
37 m_action->setIcon(createIconSet(
"signalslottool.png"_L1));
38 m_action->setEnabled(
false);
44 connect(core->formWindowManager(), &QDesignerFormWindowManagerInterface::formWindowAdded,
45 this, &SignalSlotEditorPlugin::addFormWindow);
47 connect(core->formWindowManager(), &QDesignerFormWindowManagerInterface::formWindowRemoved,
50 connect(core->formWindowManager(), &QDesignerFormWindowManagerInterface::activeFormWindowChanged,
51 this, &SignalSlotEditorPlugin::activeFormWindowChanged);
61 Q_ASSERT(formWindow !=
nullptr);
62 Q_ASSERT(m_tools.contains(formWindow) ==
false);
65 connect(m_action, &QAction::triggered, tool
->action(), &QAction::trigger);
66 m_tools[formWindow] = tool;
67 formWindow->registerTool(tool);
72 Q_ASSERT(formWindow !=
nullptr);
73 Q_ASSERT(m_tools.contains(formWindow) ==
true);
76 m_tools.remove(formWindow);
77 disconnect(m_action, &QAction::triggered, tool
->action(), &QAction::trigger);
90 m_action->setEnabled(formWindow !=
nullptr);
97#include "moc_signalsloteditor_plugin.cpp"
bool isInitialized() const override
Returns true if the plugin interface is initialized; otherwise returns false.
QAction * action() const override
Returns the action associated with this interface.
~SignalSlotEditorPlugin() override
QDesignerFormEditorInterface * core() const override
Returns the core form editor interface associated with this component.
void initialize(QDesignerFormEditorInterface *core) override
Initializes the plugin interface for the specified core interface.
Combined button and popup list for selecting options.
Auxiliary methods to store/retrieve settings.