4#include <QtGui/qaction.h>
9#include <QtDesigner/abstractformeditor.h>
10#include <QtDesigner/abstractformwindow.h>
11#include <QtDesigner/abstractformwindowmanager.h>
15using namespace Qt::StringLiterals;
32 m_action =
new QAction(tr(
"Edit Tab Order"),
this);
33 m_action->setObjectName(u"_qt_edit_tab_order_action"_s);
34 QIcon icon = QIcon::fromTheme(u"designer-edit-tabs"_s,
35 QIcon(core->resourceLocation() +
"/tabordertool.png"_L1));
36 m_action->setIcon(icon);
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.
Combined button and popup list for selecting options.
Auxiliary methods to store/retrieve settings.