#include <qpropertyeditor_items_p.h>
Inheritance diagram for qdesigner_internal::IntProperty:


Definition at line 252 of file qpropertyeditor_items_p.h.
Public Member Functions | |
| IntProperty (int value, const QString &name) | |
| QString | specialValue () const |
| void | setSpecialValue (const QString &specialValue) |
| void | setRange (int low, int hi) |
| void | setValue (const QVariant &value) |
| QString | toString () const |
| QWidget * | createEditor (QWidget *parent, const QObject *target, const char *receiver) const |
| void | updateEditorContents (QWidget *editor) |
| void | updateValue (QWidget *editor) |
Private Attributes | |
| QString | m_specialValue |
| int | m_low |
| int | m_hi |
| IntProperty::IntProperty | ( | int | value, | |
| const QString & | name | |||
| ) |
Definition at line 518 of file qpropertyeditor_items.cpp.
00519 : AbstractProperty<int>(value, name), m_low(INT_MIN), m_hi(INT_MAX) 00520 { 00521 }
| QString IntProperty::specialValue | ( | ) | const |
Definition at line 529 of file qpropertyeditor_items.cpp.
References m_specialValue.
Referenced by setSpecialValue().
00530 { 00531 return m_specialValue; 00532 }
| void IntProperty::setSpecialValue | ( | const QString & | specialValue | ) |
Definition at line 534 of file qpropertyeditor_items.cpp.
References m_specialValue, and specialValue().
00535 { 00536 m_specialValue = specialValue; 00537 }
Here is the call graph for this function:

| void IntProperty::setRange | ( | int | low, | |
| int | hi | |||
| ) |
| void IntProperty::setValue | ( | const QVariant & | value | ) | [virtual] |
Implements qdesigner_internal::IProperty.
Definition at line 539 of file qpropertyeditor_items.cpp.
References qdesigner_internal::AbstractProperty< int >::m_value, QVariant::toInt(), and qdesigner_internal::AbstractProperty< int >::value().
Here is the call graph for this function:

| QString IntProperty::toString | ( | ) | const [virtual] |
Implements qdesigner_internal::IProperty.
Definition at line 544 of file qpropertyeditor_items.cpp.
References qdesigner_internal::AbstractProperty< int >::m_value, and QString::number().
00545 { 00546 return QString::number(m_value); 00547 }
Here is the call graph for this function:

| QWidget * IntProperty::createEditor | ( | QWidget * | parent, | |
| const QObject * | target, | |||
| const char * | receiver | |||
| ) | const [virtual] |
Implements qdesigner_internal::IProperty.
Definition at line 549 of file qpropertyeditor_items.cpp.
References QObject::connect(), m_hi, m_low, m_specialValue, qdesigner_internal::AbstractProperty< int >::m_value, qdesigner_internal::IProperty::parent(), QAbstractSpinBox::selectAll(), QAbstractSpinBox::setFrame(), QSpinBox::setRange(), QAbstractSpinBox::setSpecialValueText(), QSpinBox::setValue(), and SIGNAL.
00550 { 00551 QSpinBox *spinBox = new QIntPropertySpinBox(parent); 00552 spinBox->setFrame(0); 00553 spinBox->setSpecialValueText(m_specialValue); 00554 spinBox->setRange(m_low, m_hi); 00555 spinBox->setValue(m_value); 00556 spinBox->selectAll(); 00557 00558 QObject::connect(spinBox, SIGNAL(editingFinished()), target, receiver); 00559 00560 return spinBox; 00561 }
Here is the call graph for this function:

| void IntProperty::updateEditorContents | ( | QWidget * | editor | ) | [virtual] |
Reimplemented from qdesigner_internal::IProperty.
Definition at line 563 of file qpropertyeditor_items.cpp.
References qdesigner_internal::AbstractProperty< int >::m_value.
00564 { 00565 if (QSpinBox *spinBox = qobject_cast<QSpinBox*>(editor)) { 00566 spinBox->setValue(m_value); 00567 } 00568 }
| void IntProperty::updateValue | ( | QWidget * | editor | ) | [virtual] |
Reimplemented from qdesigner_internal::IProperty.
Definition at line 570 of file qpropertyeditor_items.cpp.
References qdesigner_internal::AbstractProperty< int >::m_value, and qdesigner_internal::IProperty::setChanged().
00571 { 00572 if (QSpinBox *spinBox = qobject_cast<QSpinBox*>(editor)) { 00573 int newValue = spinBox->value(); 00574 00575 if (newValue != m_value) { 00576 m_value = newValue; 00577 setChanged(true); 00578 } 00579 } 00580 }
Here is the call graph for this function:

Definition at line 270 of file qpropertyeditor_items_p.h.
Referenced by createEditor(), setSpecialValue(), and specialValue().
int qdesigner_internal::IntProperty::m_low [private] |
Definition at line 271 of file qpropertyeditor_items_p.h.
Referenced by createEditor(), and setRange().
int qdesigner_internal::IntProperty::m_hi [private] |
Definition at line 272 of file qpropertyeditor_items_p.h.
Referenced by createEditor(), and setRange().
1.5.1