From 67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 13 Apr 2011 00:46:47 +0000 Subject: 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 --- libkdepim/designerfields.cpp | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'libkdepim/designerfields.cpp') diff --git a/libkdepim/designerfields.cpp b/libkdepim/designerfields.cpp index bb5b8c25..6907485d 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( widIt.data() ); - wdg->setText( TQString::null ); + wdg->setText( TQString() ); } else if ( widIt.data()->inherits( TQSPINBOX_OBJECT_NAME_STRING ) ) { TQSpinBox *wdg = static_cast( widIt.data() ); wdg->setValue( wdg->minValue() ); } else if ( widIt.data()->inherits( TQCHECKBOX_OBJECT_NAME_STRING ) ) { TQCheckBox *wdg = static_cast( widIt.data() ); wdg->setChecked( false ); - } else if ( widIt.data()->inherits( "QDateTimeEdit" ) ) { - QDateTimeEdit *wdg = static_cast( widIt.data() ); + } else if ( widIt.data()->inherits( TQDATETIMEEDIT_OBJECT_NAME_STRING ) ) { + TQDateTimeEdit *wdg = static_cast( widIt.data() ); wdg->setDateTime( TQDateTime::tqcurrentDateTime() ); } else if ( widIt.data()->inherits( "KDateTimeWidget" ) ) { KDateTimeWidget *wdg = static_cast( 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( 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::ConstIterator it = mWidgets.find( *it2 ); + TQMap::ConstIterator it = mWidgets.tqfind( *it2 ); if ( it != mWidgets.end() ) { if ( it.data()->inherits( TQLINEEDIT_OBJECT_NAME_STRING ) ) { TQLineEdit *wdg = static_cast( it.data() ); @@ -186,14 +186,14 @@ void DesignerFields::load( DesignerFields::Storage *storage ) TQCheckBox *wdg = static_cast( it.data() ); wdg->setChecked( value == "true" || value == "1" ); } else if ( it.data()->inherits( TQDATETIMEEDIT_OBJECT_NAME_STRING ) ) { - QDateTimeEdit *wdg = static_cast( it.data() ); - wdg->setDateTime( TQDateTime::fromString( value, Qt::ISODate ) ); + TQDateTimeEdit *wdg = static_cast( it.data() ); + wdg->setDateTime( TQDateTime::fromString( value, TQt::ISODate ) ); } else if ( it.data()->inherits( "KDateTimeWidget" ) ) { KDateTimeWidget *wdg = static_cast( 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( 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( 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( it.data() ); value = ( wdg->isChecked() ? "true" : "false" ); - } else if ( it.data()->inherits( "QDateTimeEdit" ) ) { - QDateTimeEdit *wdg = static_cast( it.data() ); - value = wdg->dateTime().toString( Qt::ISODate ); + } else if ( it.data()->inherits( TQDATETIMEEDIT_OBJECT_NAME_STRING ) ) { + TQDateTimeEdit *wdg = static_cast( it.data() ); + value = wdg->dateTime().toString( TQt::ISODate ); } else if ( it.data()->inherits( "KDateTimeWidget" ) ) { KDateTimeWidget *wdg = static_cast( it.data() ); - value = wdg->dateTime().toString( Qt::ISODate ); + value = wdg->dateTime().toString( TQt::ISODate ); } else if ( it.data()->inherits( "KDatePicker" ) ) { KDatePicker *wdg = static_cast( 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( it.data() ); value = wdg->currentText(); @@ -244,7 +244,7 @@ void DesignerFields::setReadOnly( bool readOnly ) { TQMap::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 ); } -- cgit v1.2.3