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 --- kaddressbook/features/distributionlistwidget.cpp | 48 ++++++++++++------------ 1 file changed, 24 insertions(+), 24 deletions(-) (limited to 'kaddressbook/features/distributionlistwidget.cpp') diff --git a/kaddressbook/features/distributionlistwidget.cpp b/kaddressbook/features/distributionlistwidget.cpp index 878ede7aa..16277784e 100644 --- a/kaddressbook/features/distributionlistwidget.cpp +++ b/kaddressbook/features/distributionlistwidget.cpp @@ -16,8 +16,8 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. As a special exception, permission is given to link this program - with any edition of Qt, and distribute the resulting executable, - without including the source code for Qt in the source distribution. + with any edition of TQt, and distribute the resulting executable, + without including the source code for TQt in the source distribution. */ #include "distributionlistwidget.h" @@ -55,9 +55,9 @@ typedef KABC::DistributionList DistributionList; class DistributionListFactory : public KAB::ExtensionFactory { public: - KAB::ExtensionWidget *extension( KAB::Core *core, TQWidget *parent, const char *name ) + KAB::ExtensionWidget *extension( KAB::Core *core, TQWidget *tqparent, const char *name ) { - return new DistributionListWidget( core, parent, name ); + return new DistributionListWidget( core, tqparent, name ); } TQString identifier() const @@ -78,11 +78,11 @@ extern "C" { the event is forwarded to the ViewManager and it tries to remove a contact instead of the distribution list. */ -class DeletePressedCatcher : public QObject +class DeletePressedCatcher : public TQObject { public: - DeletePressedCatcher( DistributionListWidget *parent ) - : TQObject( parent, "DeletePressedCatcher" ), mWidget( parent ) + DeletePressedCatcher( DistributionListWidget *tqparent ) + : TQObject( tqparent, "DeletePressedCatcher" ), mWidget( tqparent ) { } @@ -91,7 +91,7 @@ class DeletePressedCatcher : public QObject { if ( event->type() == TQEvent::AccelOverride ) { TQKeyEvent *keyEvent = (TQKeyEvent*)event; - if ( keyEvent->key() == Qt::Key_Delete ) { + if ( keyEvent->key() == TQt::Key_Delete ) { keyEvent->accept(); mWidget->removeContact(); return true; @@ -106,12 +106,12 @@ class DeletePressedCatcher : public QObject DistributionListWidget *mWidget; }; -class ContactItem : public QListViewItem +class ContactItem : public TQListViewItem { public: - ContactItem( DistributionListView *parent, const KABC::Addressee &addressee, - const TQString &email = TQString::null ) : - TQListViewItem( parent ), + ContactItem( DistributionListView *tqparent, const KABC::Addressee &addressee, + const TQString &email = TQString() ) : + TQListViewItem( tqparent ), mAddressee( addressee ), mEmail( email ) { @@ -146,9 +146,9 @@ class ContactItem : public QListViewItem TQString mEmail; }; -DistributionListWidget::DistributionListWidget( KAB::Core *core, TQWidget *parent, +DistributionListWidget::DistributionListWidget( KAB::Core *core, TQWidget *tqparent, const char *name ) - : KAB::ExtensionWidget( core, parent, name ) + : KAB::ExtensionWidget( core, tqparent, name ) #ifndef KDEPIM_NEW_DISTRLISTS , mManager( 0 ) #endif @@ -265,7 +265,7 @@ void DistributionListWidget::createList() { TQString newName = KInputDialog::getText( i18n( "New Distribution List" ), i18n( "Please enter name:" ), - TQString::null, 0, this ); + TQString(), 0, this ); if ( newName.isEmpty() ) return; @@ -344,7 +344,7 @@ void DistributionListWidget::removeList() { int result = KMessageBox::warningContinueCancel( this, i18n( "Delete distribution list %1?" ) .arg( mNameCombo->currentText() ), - TQString::null, KGuiItem( i18n("Delete"), "editdelete") ); + TQString(), KGuiItem( i18n("Delete"), "editdelete") ); if ( result != KMessageBox::Continue ) return; @@ -519,7 +519,7 @@ void DistributionListWidget::updateNameCombo() const TQStringList names = mManager->listNames(); #endif mNameCombo->insertStringList( names ); - mNameCombo->setCurrentItem( QMIN( pos, (int)names.count() - 1 ) ); + mNameCombo->setCurrentItem( TQMIN( pos, (int)names.count() - 1 ) ); updateContactView(); } @@ -590,8 +590,8 @@ void DistributionListWidget::changed() } #endif -DistributionListView::DistributionListView( TQWidget *parent, const char* name ) - : KListView( parent, name ) +DistributionListView::DistributionListView( TQWidget *tqparent, const char* name ) + : KListView( tqparent, name ) { setDragEnabled( true ); setAcceptDrops( true ); @@ -622,9 +622,9 @@ void DistributionListView::dropEvent( TQDropEvent *e ) EmailSelector::EmailSelector( const TQStringList &emails, - const TQString ¤t, TQWidget *parent ) + const TQString ¤t, TQWidget *tqparent ) : KDialogBase( KDialogBase::Plain, i18n("Select Email Address"), Ok|Cancel, Ok, - parent ) + tqparent ) { TQFrame *topFrame = plainPage(); TQBoxLayout *topLayout = new TQVBoxLayout( topFrame ); @@ -653,13 +653,13 @@ TQString EmailSelector::selected() const if ( button ) return mEmailMap[ mButtonGroup->id( button ) ]; - return TQString::null; + return TQString(); } TQString EmailSelector::getEmail( const TQStringList &emails, - const TQString ¤t, TQWidget *parent, bool &canceled ) + const TQString ¤t, TQWidget *tqparent, bool &canceled ) { - EmailSelector dlg( emails, current, parent ); + EmailSelector dlg( emails, current, tqparent ); if(dlg.exec()) { canceled = false; -- cgit v1.2.1