EditorWithReset Class Reference

Inheritance diagram for EditorWithReset:

Inheritance graph
[legend]
Collaboration diagram for EditorWithReset:

Collaboration graph
[legend]
List of all members.

Detailed Description

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)
QWidgetchildEditor () const

Private Slots

void emitResetProperty ()

Private Attributes

QWidgetm_child_editor
QHBoxLayoutm_layout
const IPropertym_property
QPropertyEditorModelm_model


Constructor & Destructor Documentation

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:


Member Function Documentation

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().

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().


Member Data Documentation

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().


The documentation for this class was generated from the following file:
Generated on Thu Mar 15 14:58:13 2007 for Qt 4.2 User's Guide by  doxygen 1.5.1