8#include <QtDesigner/propertysheet.h>
9#include <QtDesigner/qextensionmanager.h>
10#include <qdesigner_propertycommand_p.h>
12#include <QtCore/qdebug.h>
23 connect(fw, &QDesignerFormWindowInterface::changed,
this, &FormWindowCursor::update);
40 if (mode == MoveAnchor)
70 const int index = m_formWindow->widgets().indexOf(
current());
71 return index == -1 ? 0 : index;
79 if (mode == MoveAnchor)
95 return !m_formWindow->selectedWidgets().isEmpty();
100 int N = m_formWindow->selectedWidgets().size();
107 ? m_formWindow->selectedWidgets().at(index)
133 QObjectList selection;
134 for (
int i=0; i<N; ++i)
138 SetPropertyCommand* setPropertyCommand =
new SetPropertyCommand(m_formWindow);
139 if (setPropertyCommand->init(selection, name, value,
current())) {
140 m_formWindow->commandHistory()->push(setPropertyCommand);
142 delete setPropertyCommand;
143 qDebug() <<
"Unable to set property " << name <<
'.';
149 SetPropertyCommand *cmd =
new SetPropertyCommand(m_formWindow);
150 if (cmd->init(widget, name, value)) {
151 m_formWindow->commandHistory()->push(cmd);
154 qDebug() <<
"Unable to set property " << name <<
'.';
160 ResetPropertyCommand *cmd =
new ResetPropertyCommand(m_formWindow);
161 if (cmd->init(widget, name)) {
162 m_formWindow->commandHistory()->push(cmd);
165 qDebug() <<
"Unable to reset property " << name <<
'.';
Combined button and popup list for selecting options.
Auxiliary methods to store/retrieve settings.