7#include <QtDesigner/abstractformwindow.h>
9#include <QtWidgets/qstyle.h>
10#include <QtWidgets/qlineedit.h>
11#include <QtWidgets/qstyleoption.h>
13#include <QtGui/qaction.h>
15#include <QtCore/qcoreevent.h>
16#include <QtCore/qvariant.h>
17#include <QtCore/qdebug.h>
24 : QDesignerTaskMenu(button, parent),
26 m_editItemsAction(
new QAction(tr(
"Edit Items..."),
this))
28 connect(m_editItemsAction, &QAction::triggered,
this, &TreeWidgetTaskMenu::editItems);
29 m_taskActions.append(m_editItemsAction);
31 QAction *sep =
new QAction(
this);
32 sep->setSeparator(
true);
33 m_taskActions.append(sep);
41 return m_editItemsAction;
46 return m_taskActions + QDesignerTaskMenu::taskActions();
51 m_formWindow = QDesignerFormWindowInterface::findFormWindow(m_treeWidget);
52 if (m_formWindow.isNull())
55 Q_ASSERT(m_treeWidget !=
nullptr);
59 if (dlg.exec() == QDialog::Accepted) {
61 if (newCont != oldCont) {
62 ChangeTreeContentsCommand *cmd =
new ChangeTreeContentsCommand(m_formWindow);
63 cmd->init(m_treeWidget, oldCont, newCont);
64 m_formWindow->commandHistory()->push(cmd);
72 m_editor->deleteLater();
Combined button and popup list for selecting options.
Auxiliary methods to store/retrieve settings.