diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-04-13 00:46:47 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-04-13 00:46:47 +0000 |
commit | 67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7 (patch) | |
tree | 5f52a9eada2e9f3654fc327d7c14dfef570a6ecb /libkdepim/designerfields.cpp | |
parent | 2ee4bf4fd5eff93b2fbef0ff8e8063edffc5da5c (diff) | |
download | tdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.tar.gz tdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.zip |
Initial conversion of kdepim to TQt
This will probably require some tweaking before it will build under Qt4,
however Qt3 builds are OK. Any alterations this commit makes to kdepim
behaviour under Qt3 are unintentional and should be fixed.
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1227832 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'libkdepim/designerfields.cpp')
-rw-r--r-- | libkdepim/designerfields.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/libkdepim/designerfields.cpp b/libkdepim/designerfields.cpp index bb5b8c258..6907485d0 100644 --- a/libkdepim/designerfields.cpp +++ b/libkdepim/designerfields.cpp @@ -41,9 +41,9 @@ using namespace KPIM; -DesignerFields::DesignerFields( const TQString &uiFile, TQWidget *parent, +DesignerFields::DesignerFields( const TQString &uiFile, TQWidget *tqparent, const char *name ) - : TQWidget( parent, name ) + : TQWidget( tqparent, name ) { initGUI( uiFile ); } @@ -145,15 +145,15 @@ void DesignerFields::load( DesignerFields::Storage *storage ) TQString value; if ( widIt.data()->inherits( TQLINEEDIT_OBJECT_NAME_STRING ) ) { TQLineEdit *wdg = static_cast<TQLineEdit*>( widIt.data() ); - wdg->setText( TQString::null ); + wdg->setText( TQString() ); } else if ( widIt.data()->inherits( TQSPINBOX_OBJECT_NAME_STRING ) ) { TQSpinBox *wdg = static_cast<TQSpinBox*>( widIt.data() ); wdg->setValue( wdg->minValue() ); } else if ( widIt.data()->inherits( TQCHECKBOX_OBJECT_NAME_STRING ) ) { TQCheckBox *wdg = static_cast<TQCheckBox*>( widIt.data() ); wdg->setChecked( false ); - } else if ( widIt.data()->inherits( "QDateTimeEdit" ) ) { - QDateTimeEdit *wdg = static_cast<QDateTimeEdit*>( widIt.data() ); + } else if ( widIt.data()->inherits( TQDATETIMEEDIT_OBJECT_NAME_STRING ) ) { + TQDateTimeEdit *wdg = static_cast<TQDateTimeEdit*>( widIt.data() ); wdg->setDateTime( TQDateTime::tqcurrentDateTime() ); } else if ( widIt.data()->inherits( "KDateTimeWidget" ) ) { KDateTimeWidget *wdg = static_cast<KDateTimeWidget*>( widIt.data() ); @@ -166,7 +166,7 @@ void DesignerFields::load( DesignerFields::Storage *storage ) wdg->setCurrentItem( 0 ); } else if ( widIt.data()->inherits( TQTEXTEDIT_OBJECT_NAME_STRING ) ) { TQTextEdit *wdg = static_cast<TQTextEdit*>( widIt.data() ); - wdg->setText( TQString::null ); + wdg->setText( TQString() ); } } @@ -174,7 +174,7 @@ void DesignerFields::load( DesignerFields::Storage *storage ) for ( it2 = keys.begin(); it2 != keys.end(); ++it2 ) { TQString value = storage->read( *it2 ); - TQMap<TQString, TQWidget *>::ConstIterator it = mWidgets.find( *it2 ); + TQMap<TQString, TQWidget *>::ConstIterator it = mWidgets.tqfind( *it2 ); if ( it != mWidgets.end() ) { if ( it.data()->inherits( TQLINEEDIT_OBJECT_NAME_STRING ) ) { TQLineEdit *wdg = static_cast<TQLineEdit*>( it.data() ); @@ -186,14 +186,14 @@ void DesignerFields::load( DesignerFields::Storage *storage ) TQCheckBox *wdg = static_cast<TQCheckBox*>( it.data() ); wdg->setChecked( value == "true" || value == "1" ); } else if ( it.data()->inherits( TQDATETIMEEDIT_OBJECT_NAME_STRING ) ) { - QDateTimeEdit *wdg = static_cast<QDateTimeEdit*>( it.data() ); - wdg->setDateTime( TQDateTime::fromString( value, Qt::ISODate ) ); + TQDateTimeEdit *wdg = static_cast<TQDateTimeEdit*>( it.data() ); + wdg->setDateTime( TQDateTime::fromString( value, TQt::ISODate ) ); } else if ( it.data()->inherits( "KDateTimeWidget" ) ) { KDateTimeWidget *wdg = static_cast<KDateTimeWidget*>( it.data() ); - wdg->setDateTime( TQDateTime::fromString( value, Qt::ISODate ) ); + wdg->setDateTime( TQDateTime::fromString( value, TQt::ISODate ) ); } else if ( it.data()->inherits( "KDatePicker" ) ) { KDatePicker *wdg = static_cast<KDatePicker*>( it.data() ); - wdg->setDate( TQDate::fromString( value, Qt::ISODate ) ); + wdg->setDate( TQDate::fromString( value, TQt::ISODate ) ); } else if ( it.data()->inherits( TQCOMBOBOX_OBJECT_NAME_STRING ) ) { TQComboBox *wdg = static_cast<TQComboBox*>( it.data() ); wdg->setCurrentText( value ); @@ -219,15 +219,15 @@ void DesignerFields::save( DesignerFields::Storage *storage ) } else if ( it.data()->inherits( TQCHECKBOX_OBJECT_NAME_STRING ) ) { TQCheckBox *wdg = static_cast<TQCheckBox*>( it.data() ); value = ( wdg->isChecked() ? "true" : "false" ); - } else if ( it.data()->inherits( "QDateTimeEdit" ) ) { - QDateTimeEdit *wdg = static_cast<QDateTimeEdit*>( it.data() ); - value = wdg->dateTime().toString( Qt::ISODate ); + } else if ( it.data()->inherits( TQDATETIMEEDIT_OBJECT_NAME_STRING ) ) { + TQDateTimeEdit *wdg = static_cast<TQDateTimeEdit*>( it.data() ); + value = wdg->dateTime().toString( TQt::ISODate ); } else if ( it.data()->inherits( "KDateTimeWidget" ) ) { KDateTimeWidget *wdg = static_cast<KDateTimeWidget*>( it.data() ); - value = wdg->dateTime().toString( Qt::ISODate ); + value = wdg->dateTime().toString( TQt::ISODate ); } else if ( it.data()->inherits( "KDatePicker" ) ) { KDatePicker *wdg = static_cast<KDatePicker*>( it.data() ); - value = wdg->date().toString( Qt::ISODate ); + value = wdg->date().toString( TQt::ISODate ); } else if ( it.data()->inherits( TQCOMBOBOX_OBJECT_NAME_STRING ) ) { TQComboBox *wdg = static_cast<TQComboBox*>( it.data() ); value = wdg->currentText(); @@ -244,7 +244,7 @@ void DesignerFields::setReadOnly( bool readOnly ) { TQMap<TQString, TQWidget*>::Iterator it; for ( it = mWidgets.begin(); it != mWidgets.end(); ++it ) - if ( mDisabledWidgets.find( it.data() ) == mDisabledWidgets.end() ) + if ( mDisabledWidgets.tqfind( it.data() ) == mDisabledWidgets.end() ) it.data()->setEnabled( !readOnly ); } |