

Definition at line 48 of file qpropertyeditor_delegate.cpp.
Signals | |
| void | sync () |
| void | resetProperty (const IProperty *property, QPropertyEditorModel *model) |
Public Member Functions | |
| EditorWithReset (const IProperty *property, QPropertyEditorModel *model, QWidget *parent=0) | |
| void | setChildEditor (QWidget *child_editor) |
| QWidget * | childEditor () const |
Private Slots | |
| void | emitResetProperty () |
Private Attributes | |
| QWidget * | m_child_editor |
| QHBoxLayout * | m_layout |
| const IProperty * | m_property |
| QPropertyEditorModel * | m_model |
| EditorWithReset::EditorWithReset | ( | const IProperty * | property, | |
| QPropertyEditorModel * | model, | |||
| QWidget * | parent = 0 | |||
| ) |
Definition at line 67 of file qpropertyeditor_delegate.cpp.
References QBoxLayout::addWidget(), QObject::connect(), qdesigner_internal::createIconSet(), emitResetProperty(), QSizePolicy::Fixed, m_child_editor, m_layout, m_model, m_property, QSizePolicy::MinimumExpanding, QObject::property(), QWidget::setAutoFillBackground(), QAbstractButton::setIcon(), QAbstractButton::setIconSize(), QLayout::setMargin(), QWidget::setSizePolicy(), QLayout::setSpacing(), QToolButton::setToolButtonStyle(), SIGNAL, SLOT, and Qt::ToolButtonIconOnly.
00068 : QWidget(parent) 00069 { 00070 setAutoFillBackground(true); 00071 m_property = property; 00072 m_child_editor = 0; 00073 m_layout = new QHBoxLayout(this); 00074 m_layout->setMargin(0); 00075 m_layout->setSpacing(0); 00076 m_model = model; 00077 00078 QToolButton *button = new QToolButton(this); 00079 button->setToolButtonStyle(Qt::ToolButtonIconOnly); 00080 button->setIcon(createIconSet(QLatin1String("resetproperty.png"))); 00081 button->setIconSize(QSize(8,8)); 00082 button->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::MinimumExpanding)); 00083 m_layout->addWidget(button); 00084 connect(button, SIGNAL(clicked()), this, SLOT(emitResetProperty())); 00085 }
Here is the call graph for this function:

| void EditorWithReset::setChildEditor | ( | QWidget * | child_editor | ) |
Definition at line 92 of file qpropertyeditor_delegate.cpp.
References QSizePolicy::Expanding, QBoxLayout::insertWidget(), m_child_editor, m_layout, QSizePolicy::MinimumExpanding, QWidget::setFocusProxy(), and QWidget::setSizePolicy().
00093 { 00094 m_child_editor = child_editor; 00095 00096 m_child_editor->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::MinimumExpanding)); 00097 m_layout->insertWidget(0, m_child_editor); 00098 setFocusProxy(m_child_editor); 00099 }
Here is the call graph for this function:

| QWidget* EditorWithReset::childEditor | ( | ) | const [inline] |
Definition at line 54 of file qpropertyeditor_delegate.cpp.
References m_child_editor.
00054 { return m_child_editor; }
| void EditorWithReset::emitResetProperty | ( | ) | [private, slot] |
Definition at line 87 of file qpropertyeditor_delegate.cpp.
References emit, m_model, m_property, and resetProperty().
Referenced by EditorWithReset().
00088 { 00089 emit resetProperty(m_property, m_model); 00090 }
| void EditorWithReset::sync | ( | ) | [signal] |
| void EditorWithReset::resetProperty | ( | const IProperty * | property, | |
| QPropertyEditorModel * | model | |||
| ) | [signal] |
Referenced by emitResetProperty().
QWidget* EditorWithReset::m_child_editor [private] |
Definition at line 61 of file qpropertyeditor_delegate.cpp.
Referenced by childEditor(), EditorWithReset(), and setChildEditor().
QHBoxLayout* EditorWithReset::m_layout [private] |
Definition at line 62 of file qpropertyeditor_delegate.cpp.
Referenced by EditorWithReset(), and setChildEditor().
const IProperty* EditorWithReset::m_property [private] |
Definition at line 63 of file qpropertyeditor_delegate.cpp.
Referenced by EditorWithReset(), and emitResetProperty().
QPropertyEditorModel* EditorWithReset::m_model [private] |
Definition at line 64 of file qpropertyeditor_delegate.cpp.
Referenced by EditorWithReset(), and emitResetProperty().
1.5.1