summaryrefslogtreecommitdiffstats
path: root/kaddressbook/customfieldswidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kaddressbook/customfieldswidget.cpp')
-rw-r--r--kaddressbook/customfieldswidget.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/kaddressbook/customfieldswidget.cpp b/kaddressbook/customfieldswidget.cpp
index 3d992be1e..44b0294ac 100644
--- a/kaddressbook/customfieldswidget.cpp
+++ b/kaddressbook/customfieldswidget.cpp
@@ -227,13 +227,13 @@ void FieldWidget::clearFields()
{
FieldRecordList::ConstIterator fieldIt;
for ( fieldIt = mFieldList.begin(); fieldIt != mFieldList.end(); ++fieldIt ) {
- if ( (*fieldIt).mWidget->isA( "TQLineEdit" ) ) {
+ if ( (*fieldIt).mWidget->isA( TQLINEEDIT_OBJECT_NAME_STRING ) ) {
TQLineEdit *wdg = static_cast<TQLineEdit*>( (*fieldIt).mWidget );
wdg->setText( TQString() );
- } else if ( (*fieldIt).mWidget->isA( "TQSpinBox" ) ) {
+ } else if ( (*fieldIt).mWidget->isA( TQSPINBOX_OBJECT_NAME_STRING ) ) {
TQSpinBox *wdg = static_cast<TQSpinBox*>( (*fieldIt).mWidget );
wdg->setValue( 0 );
- } else if ( (*fieldIt).mWidget->isA( "TQCheckBox" ) ) {
+ } else if ( (*fieldIt).mWidget->isA( TQCHECKBOX_OBJECT_NAME_STRING ) ) {
TQCheckBox *wdg = static_cast<TQCheckBox*>( (*fieldIt).mWidget );
wdg->setChecked( true );
} else if ( (*fieldIt).mWidget->isA( "QDateEdit" ) ) {
@@ -265,13 +265,13 @@ void FieldWidget::loadContact( KABC::Addressee *addr )
FieldRecordList::ConstIterator fieldIt;
for ( fieldIt = mFieldList.begin(); fieldIt != mFieldList.end(); ++fieldIt ) {
if ( (*fieldIt).mIdentifier == name ) {
- if ( (*fieldIt).mWidget->isA( "TQLineEdit" ) ) {
+ if ( (*fieldIt).mWidget->isA( TQLINEEDIT_OBJECT_NAME_STRING ) ) {
TQLineEdit *wdg = static_cast<TQLineEdit*>( (*fieldIt).mWidget );
wdg->setText( value );
- } else if ( (*fieldIt).mWidget->isA( "TQSpinBox" ) ) {
+ } else if ( (*fieldIt).mWidget->isA( TQSPINBOX_OBJECT_NAME_STRING ) ) {
TQSpinBox *wdg = static_cast<TQSpinBox*>( (*fieldIt).mWidget );
wdg->setValue( value.toInt() );
- } else if ( (*fieldIt).mWidget->isA( "TQCheckBox" ) ) {
+ } else if ( (*fieldIt).mWidget->isA( TQCHECKBOX_OBJECT_NAME_STRING ) ) {
TQCheckBox *wdg = static_cast<TQCheckBox*>( (*fieldIt).mWidget );
wdg->setChecked( value == "true" || value == "1" );
} else if ( (*fieldIt).mWidget->isA( "QDateEdit" ) ) {
@@ -294,22 +294,22 @@ void FieldWidget::setReadOnly( bool readOnly )
FieldRecordList::ConstIterator it;
for ( it = mFieldList.begin(); it != mFieldList.end(); ++it ) {
TQString value;
- if ( (*it).mWidget->isA( "TQLineEdit" ) ) {
+ if ( (*it).mWidget->isA( TQLINEEDIT_OBJECT_NAME_STRING ) ) {
TQLineEdit *wdg = static_cast<TQLineEdit*>( (*it).mWidget );
wdg->setReadOnly(readOnly);
- } else if ( (*it).mWidget->isA( "TQSpinBox" ) ) {
+ } else if ( (*it).mWidget->isA( TQSPINBOX_OBJECT_NAME_STRING ) ) {
TQSpinBox *wdg = static_cast<TQSpinBox*>( (*it).mWidget );
wdg->setEnabled( !readOnly );
- } else if ( (*it).mWidget->isA( "TQCheckBox" ) ) {
+ } else if ( (*it).mWidget->isA( TQCHECKBOX_OBJECT_NAME_STRING ) ) {
TQCheckBox *wdg = static_cast<TQCheckBox*>( (*it).mWidget );
wdg->setEnabled( !readOnly );
- } else if ( (*it).mWidget->isA( "TQDateEdit" ) ) {
+ } else if ( (*it).mWidget->isA( TQDATEEDIT_OBJECT_NAME_STRING ) ) {
TQDateEdit *wdg = static_cast<TQDateEdit*>( (*it).mWidget );
wdg->setEnabled( !readOnly );
- } else if ( (*it).mWidget->isA( "TQTimeEdit" ) ) {
+ } else if ( (*it).mWidget->isA( TQTIMEEDIT_OBJECT_NAME_STRING ) ) {
TQTimeEdit *wdg = static_cast<TQTimeEdit*>( (*it).mWidget );
wdg->setEnabled( !readOnly );
- } else if ( (*it).mWidget->isA( "TQDateTimeEdit" ) ) {
+ } else if ( (*it).mWidget->isA( TQDATETIMEEDIT_OBJECT_NAME_STRING ) ) {
TQDateTimeEdit *wdg = static_cast<TQDateTimeEdit*>( (*it).mWidget );
wdg->setEnabled( !readOnly );
}
@@ -321,13 +321,13 @@ void FieldWidget::storeContact( KABC::Addressee *addr )
FieldRecordList::ConstIterator it;
for ( it = mFieldList.begin(); it != mFieldList.end(); ++it ) {
TQString value;
- if ( (*it).mWidget->isA( "TQLineEdit" ) ) {
+ if ( (*it).mWidget->isA( TQLINEEDIT_OBJECT_NAME_STRING ) ) {
TQLineEdit *wdg = static_cast<TQLineEdit*>( (*it).mWidget );
value = wdg->text();
- } else if ( (*it).mWidget->isA( "TQSpinBox" ) ) {
+ } else if ( (*it).mWidget->isA( TQSPINBOX_OBJECT_NAME_STRING ) ) {
TQSpinBox *wdg = static_cast<TQSpinBox*>( (*it).mWidget );
value = TQString::number( wdg->value() );
- } else if ( (*it).mWidget->isA( "TQCheckBox" ) ) {
+ } else if ( (*it).mWidget->isA( TQCHECKBOX_OBJECT_NAME_STRING ) ) {
TQCheckBox *wdg = static_cast<TQCheckBox*>( (*it).mWidget );
value = ( wdg->isChecked() ? "true" : "false" );
} else if ( (*it).mWidget->isA( "QDateEdit" ) ) {
@@ -523,9 +523,9 @@ TQStringList CustomFieldsWidget::marshallFields( bool global ) const
retval.append( (*it).mTitle );
TQString type = "text";
- if ( (*it).mWidget->isA( "TQSpinBox" ) ) {
+ if ( (*it).mWidget->isA( TQSPINBOX_OBJECT_NAME_STRING ) ) {
type = "integer";
- } else if ( (*it).mWidget->isA( "TQCheckBox" ) ) {
+ } else if ( (*it).mWidget->isA( TQCHECKBOX_OBJECT_NAME_STRING ) ) {
type = "boolean";
} else if ( (*it).mWidget->isA( "QDateEdit" ) ) {
type = "date";
@@ -533,7 +533,7 @@ TQStringList CustomFieldsWidget::marshallFields( bool global ) const
type = "time";
} else if ( (*it).mWidget->isA( "QDateTimeEdit" ) ) {
type = "datetime";
- } else if ( (*it).mWidget->isA( "TQLineEdit" ) ) {
+ } else if ( (*it).mWidget->isA( TQLINEEDIT_OBJECT_NAME_STRING ) ) {
type = "text";
}