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 /kaddressbook/features | |
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 'kaddressbook/features')
-rw-r--r-- | kaddressbook/features/distributionlistngwidget.cpp | 12 | ||||
-rw-r--r-- | kaddressbook/features/distributionlistngwidget.h | 10 | ||||
-rw-r--r-- | kaddressbook/features/distributionlistwidget.cpp | 48 | ||||
-rw-r--r-- | kaddressbook/features/distributionlistwidget.h | 14 | ||||
-rw-r--r-- | kaddressbook/features/resourceselection.cpp | 30 | ||||
-rw-r--r-- | kaddressbook/features/resourceselection.h | 7 |
6 files changed, 63 insertions, 58 deletions
diff --git a/kaddressbook/features/distributionlistngwidget.cpp b/kaddressbook/features/distributionlistngwidget.cpp index d6b1d7d96..1eac56b08 100644 --- a/kaddressbook/features/distributionlistngwidget.cpp +++ b/kaddressbook/features/distributionlistngwidget.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 "distributionlistngwidget.h" @@ -44,7 +44,7 @@ #include <tqpushbutton.h> #include <tqtooltip.h> -KAB::DistributionListNg::ListBox::ListBox( TQWidget* parent ) : KListBox( parent ) +KAB::DistributionListNg::ListBox::ListBox( TQWidget* tqparent ) : KListBox( tqparent ) { setAcceptDrops( true ); } @@ -84,9 +84,9 @@ namespace DistributionListNg { class Factory : 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 KAB::DistributionListNg::MainWidget( core, parent, name ); + return new KAB::DistributionListNg::MainWidget( core, tqparent, name ); } TQString identifier() const @@ -115,7 +115,7 @@ TQString KAB::DistributionListNg::MainWidget::identifier() const return "distribution_list_editor_ng"; } -KAB::DistributionListNg::MainWidget::MainWidget( KAB::Core *core, TQWidget *parent, const char *name ) : KAB::ExtensionWidget( core, parent, name ) +KAB::DistributionListNg::MainWidget::MainWidget( KAB::Core *core, TQWidget *tqparent, const char *name ) : KAB::ExtensionWidget( core, tqparent, name ) { TQVBoxLayout *tqlayout = new TQVBoxLayout( this ); tqlayout->setSpacing( KDialog::spacingHint() ); diff --git a/kaddressbook/features/distributionlistngwidget.h b/kaddressbook/features/distributionlistngwidget.h index 8c90c0dc5..090fe0d50 100644 --- a/kaddressbook/features/distributionlistngwidget.h +++ b/kaddressbook/features/distributionlistngwidget.h @@ -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. */ #ifndef KAB_DISTRIBUTIONLISTNG_MAINWIDGET_H @@ -47,8 +47,9 @@ namespace DistributionListNg { class ListBox : public KListBox { Q_OBJECT + TQ_OBJECT public: - ListBox( TQWidget* parent = 0 ); + ListBox( TQWidget* tqparent = 0 ); signals: @@ -66,9 +67,10 @@ protected: class MainWidget : public KAB::ExtensionWidget { Q_OBJECT + TQ_OBJECT public: - explicit MainWidget( KAB::Core *core, TQWidget *parent = 0, const char *name = 0 ); + explicit MainWidget( KAB::Core *core, TQWidget *tqparent = 0, const char *name = 0 ); //impl TQString title() const; 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( "<qt>Delete distribution list <b>%1</b>?</qt>" ) .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; diff --git a/kaddressbook/features/distributionlistwidget.h b/kaddressbook/features/distributionlistwidget.h index e74ac758f..6890a6a72 100644 --- a/kaddressbook/features/distributionlistwidget.h +++ b/kaddressbook/features/distributionlistwidget.h @@ -17,8 +17,8 @@ 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. */ #ifndef DISTRIBUTIONLISTWIDGET_H @@ -48,9 +48,10 @@ class DistributionListManager; class DistributionListWidget : public KAB::ExtensionWidget { Q_OBJECT + TQ_OBJECT public: - DistributionListWidget( KAB::Core*, TQWidget *parent, const char *name = 0 ); + DistributionListWidget( KAB::Core*, TQWidget *tqparent, const char *name = 0 ); virtual ~DistributionListWidget(); void contactsSelectionChanged(); @@ -107,9 +108,10 @@ class DistributionListWidget : public KAB::ExtensionWidget class DistributionListView : public KListView { Q_OBJECT + TQ_OBJECT public: - DistributionListView( TQWidget *parent, const char* name = 0 ); + DistributionListView( TQWidget *tqparent, const char* name = 0 ); protected: void dragEnterEvent( TQDragEnterEvent *e ); @@ -125,12 +127,12 @@ class EmailSelector : public KDialogBase { public: EmailSelector( const TQStringList &emails, const TQString ¤t, - TQWidget *parent ); + TQWidget *tqparent ); TQString selected() const; static TQString getEmail( const TQStringList &emails, const TQString ¤t, - TQWidget *parent, bool &canceled ); + TQWidget *tqparent, bool &canceled ); private: TQButtonGroup *mButtonGroup; diff --git a/kaddressbook/features/resourceselection.cpp b/kaddressbook/features/resourceselection.cpp index 59a3c1ee6..049f879b5 100644 --- a/kaddressbook/features/resourceselection.cpp +++ b/kaddressbook/features/resourceselection.cpp @@ -17,8 +17,8 @@ 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 <tqlayout.h> @@ -54,11 +54,11 @@ class AddressBookWrapper : public KABC::AddressBook } }; -class ResourceItem : public QCheckListItem +class ResourceItem : public TQCheckListItem { public: - ResourceItem( KListView *parent, KABC::Resource *resource ) - : TQCheckListItem( parent, resource->resourceName(), CheckBox ), + ResourceItem( KListView *tqparent, KABC::Resource *resource ) + : TQCheckListItem( tqparent, resource->resourceName(), CheckBox ), mResource( resource ), mChecked( false ), mIsSubresource( false ), mSubItemsCreated( false ), mResourceIdentifier() @@ -68,9 +68,9 @@ class ResourceItem : public QCheckListItem mChecked = isOn(); } - ResourceItem( KPIM::ResourceABC *resourceABC, ResourceItem* parent, + ResourceItem( KPIM::ResourceABC *resourceABC, ResourceItem* tqparent, const TQString& resourceIdent ) - : TQCheckListItem( parent, resourceABC->subresourceLabel( resourceIdent ), CheckBox ), + : TQCheckListItem( tqparent, resourceABC->subresourceLabel( resourceIdent ), CheckBox ), mResource( resourceABC ), mChecked( false ), mIsSubresource( true ), mSubItemsCreated( false ), mResourceIdentifier( resourceIdent ) @@ -134,8 +134,8 @@ void ResourceItem::stateChange( bool active ) //// -ResourceSelection::ResourceSelection( KAB::Core *core, TQWidget *parent, const char *name ) - : KAB::ExtensionWidget( core, parent, name ), mManager( 0 ) +ResourceSelection::ResourceSelection( KAB::Core *core, TQWidget *tqparent, const char *name ) + : KAB::ExtensionWidget( core, tqparent, name ), mManager( 0 ) { initGUI(); @@ -466,12 +466,12 @@ ResourceItem* ResourceSelection::selectedItem() const ResourceItem* ResourceSelection::findSubResourceItem( KPIM::ResourceABC *resource, const TQString &subResource ) { - TQListViewItemIterator parentIt( mListView ); - for ( ; *parentIt; ++parentIt ) { - if ( static_cast<ResourceItem*>(*parentIt)->resource() != resource ) + TQListViewItemIterator tqparentIt( mListView ); + for ( ; *tqparentIt; ++tqparentIt ) { + if ( static_cast<ResourceItem*>(*tqparentIt)->resource() != resource ) continue; - TQListViewItemIterator childIt( *parentIt ); + TQListViewItemIterator childIt( *tqparentIt ); for ( ; *childIt; ++childIt ) { ResourceItem *item = static_cast<ResourceItem*>(*childIt); if ( item->resourceIdentifier() == subResource ) @@ -520,9 +520,9 @@ void ResourceSelection::initGUI() class ResourceSelectionFactory : 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 ResourceSelection( core, parent, name ); + return new ResourceSelection( core, tqparent, name ); } TQString identifier() const diff --git a/kaddressbook/features/resourceselection.h b/kaddressbook/features/resourceselection.h index 21c3ee841..e8939812b 100644 --- a/kaddressbook/features/resourceselection.h +++ b/kaddressbook/features/resourceselection.h @@ -17,8 +17,8 @@ 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. */ #ifndef RESOURCESELECTION_H @@ -38,9 +38,10 @@ class ResourceItem; class ResourceSelection : public KAB::ExtensionWidget { Q_OBJECT + TQ_OBJECT public: - ResourceSelection( KAB::Core*, TQWidget *parent, const char *name ); + ResourceSelection( KAB::Core*, TQWidget *tqparent, const char *name ); virtual ~ResourceSelection(); TQString title() const; |