5#include <QtGui/qaction.h>
10#include <iconloader_p.h>
12#include <QtDesigner/abstractformeditor.h>
13#include <QtDesigner/abstractformwindow.h>
14#include <QtDesigner/abstractformwindowmanager.h>
18using namespace Qt::StringLiterals;
35 m_action =
new QAction(tr(
"Edit Tab Order"),
this);
36 m_action->setObjectName(u"_qt_edit_tab_order_action"_s);
37 m_action->setIcon(createIconSet(
"tabordertool.png"_L1));
38 m_action->setEnabled(
false);
44 connect(core->formWindowManager(), &QDesignerFormWindowManagerInterface::formWindowAdded,
45 this, &TabOrderEditorPlugin::addFormWindow);
47 connect(core->formWindowManager(), &QDesignerFormWindowManagerInterface::formWindowRemoved,
50 connect(core->formWindowManager(), &QDesignerFormWindowManagerInterface::activeFormWindowChanged,
51 this, &TabOrderEditorPlugin::activeFormWindowChanged);
56 m_action->setEnabled(formWindow !=
nullptr);
66 Q_ASSERT(formWindow !=
nullptr);
67 Q_ASSERT(m_tools.contains(formWindow) ==
false);
70 m_tools[formWindow] = tool;
71 connect(m_action, &QAction::triggered, tool
->action(), &QAction::trigger);
72 formWindow->registerTool(tool);
77 Q_ASSERT(formWindow !=
nullptr);
78 Q_ASSERT(m_tools.contains(formWindow) ==
true);
81 m_tools.remove(formWindow);
82 disconnect(m_action, &QAction::triggered, tool
->action(), &QAction::trigger);
97#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.
Combined button and popup list for selecting options.
Auxiliary methods to store/retrieve settings.