4#include <QtGui/qaction.h>
9#include <iconloader_p.h>
11#include <QtDesigner/abstractformeditor.h>
12#include <QtDesigner/abstractformwindow.h>
13#include <QtDesigner/abstractformwindowmanager.h>
17using namespace Qt::StringLiterals;
34 m_action =
new QAction(tr(
"Edit Tab Order"),
this);
35 m_action->setObjectName(u"_qt_edit_tab_order_action"_s);
36 m_action->setIcon(createIconSet(
"tabordertool.png"_L1));
37 m_action->setEnabled(
false);
43 connect(core->formWindowManager(), &QDesignerFormWindowManagerInterface::formWindowAdded,
44 this, &TabOrderEditorPlugin::addFormWindow);
46 connect(core->formWindowManager(), &QDesignerFormWindowManagerInterface::formWindowRemoved,
47 this, &TabOrderEditorPlugin::removeFormWindow);
49 connect(core->formWindowManager(), &QDesignerFormWindowManagerInterface::activeFormWindowChanged,
50 this, &TabOrderEditorPlugin::activeFormWindowChanged);
55 m_action->setEnabled(formWindow !=
nullptr);
65 Q_ASSERT(formWindow !=
nullptr);
66 Q_ASSERT(m_tools.contains(formWindow) ==
false);
69 m_tools[formWindow] = tool;
70 connect(m_action, &QAction::triggered, tool->action(), &QAction::trigger);
71 formWindow->registerTool(tool);
76 Q_ASSERT(formWindow !=
nullptr);
77 Q_ASSERT(m_tools.contains(formWindow) ==
true);
80 m_tools.remove(formWindow);
81 disconnect(m_action, &QAction::triggered, tool->action(), &QAction::trigger);
96#include "moc_tabordereditor_plugin.cpp"
~TabOrderEditorPlugin() 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.
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.
Auxiliary methods to store/retrieve settings.