summaryrefslogtreecommitdiffstats
path: root/libkdepim/addressesdialog.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-13 00:46:47 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-13 00:46:47 +0000
commit67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7 (patch)
tree5f52a9eada2e9f3654fc327d7c14dfef570a6ecb /libkdepim/addressesdialog.cpp
parent2ee4bf4fd5eff93b2fbef0ff8e8063edffc5da5c (diff)
downloadtdepim-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/addressesdialog.cpp')
-rw-r--r--libkdepim/addressesdialog.cpp90
1 files changed, 45 insertions, 45 deletions
diff --git a/libkdepim/addressesdialog.cpp b/libkdepim/addressesdialog.cpp
index 5807b0d68..b7bea2369 100644
--- a/libkdepim/addressesdialog.cpp
+++ b/libkdepim/addressesdialog.cpp
@@ -91,9 +91,9 @@ struct AddressesDialog::AddressesDialogPrivate {
};
// privates end
-AddresseeViewItem::AddresseeViewItem( AddresseeViewItem *parent, const KABC::Addressee& addr,
+AddresseeViewItem::AddresseeViewItem( AddresseeViewItem *tqparent, const KABC::Addressee& addr,
int emailIndex )
- : TQObject( 0 ), KListViewItem( parent, addr.realName(),
+ : TQObject( 0 ), KListViewItem( tqparent, addr.realName(),
( emailIndex == 0 ? addr.preferredEmail() : addr.emails()[ emailIndex ] ) )
{
d = new AddresseeViewItemPrivate;
@@ -120,17 +120,17 @@ AddresseeViewItem::AddresseeViewItem( KListView *lv, const TQString& name, Categ
d->category = cat;
}
-AddresseeViewItem::AddresseeViewItem( AddresseeViewItem *parent, const TQString& name,
+AddresseeViewItem::AddresseeViewItem( AddresseeViewItem *tqparent, const TQString& name,
const KABC::Addressee::List &lst )
- : TQObject(0), KListViewItem( parent, name, i18n("<group>") )
+ : TQObject(0), KListViewItem( tqparent, name, i18n("<group>") )
{
d = new AddresseeViewItemPrivate;
d->category = FilledGroup;
d->addresses = lst;
}
-AddresseeViewItem::AddresseeViewItem( AddresseeViewItem *parent, const TQString& name )
- : TQObject(0), KListViewItem( parent, name, i18n("<group>") )
+AddresseeViewItem::AddresseeViewItem( AddresseeViewItem *tqparent, const TQString& name )
+ : TQObject(0), KListViewItem( tqparent, name, i18n("<group>") )
{
d = new AddresseeViewItemPrivate;
d->category = DistList;
@@ -162,13 +162,13 @@ AddresseeViewItem::category() const
return d->category;
}
-QString
+TQString
AddresseeViewItem::name() const
{
return text(0);
}
-QString
+TQString
AddresseeViewItem::email() const
{
return text(1);
@@ -353,7 +353,7 @@ AddressesDialog::setShowBCC( bool b )
d->ui->mBCCButton->setShown( b );
}
-QStringList
+TQStringList
AddressesDialog::to() const
{
TQStringList emails = allDistributionLists( d->toItem );
@@ -363,7 +363,7 @@ AddressesDialog::to() const
return emails;
}
-QStringList
+TQStringList
AddressesDialog::cc() const
{
TQStringList emails = allDistributionLists( d->ccItem );
@@ -373,7 +373,7 @@ AddressesDialog::cc() const
return emails;
}
-QStringList
+TQStringList
AddressesDialog::bcc() const
{
TQStringList emails = allDistributionLists( d->bccItem );
@@ -402,7 +402,7 @@ AddressesDialog::allToAddressesNoDuplicates() const
TQValueList<KPIM::DistributionList::Entry>::ConstIterator eit;
for( eit = eList.begin(); eit != eList.end(); ++eit ) {
KABC::Addressee a = (*eit).addressee;
- if ( !a.preferredEmail().isEmpty() && aList.find( a ) == aList.end() ) {
+ if ( !a.preferredEmail().isEmpty() && aList.tqfind( a ) == aList.end() ) {
aList.append( a ) ;
}
}
@@ -415,7 +415,7 @@ AddressesDialog::allToAddressesNoDuplicates() const
TQValueList<KABC::DistributionList::Entry>::ConstIterator eit;
for( eit = eList.begin(); eit != eList.end(); ++eit ) {
KABC::Addressee a = (*eit).addressee;
- if ( !a.preferredEmail().isEmpty() && aList.find( a ) == aList.end() ) {
+ if ( !a.preferredEmail().isEmpty() && aList.tqfind( a ) == aList.end() ) {
aList.append( a ) ;
}
}
@@ -437,19 +437,19 @@ AddressesDialog::bccAddresses() const
}
-QStringList
+TQStringList
AddressesDialog::toDistributionLists() const
{
return allDistributionLists( d->toItem );
}
-QStringList
+TQStringList
AddressesDialog::ccDistributionLists() const
{
return allDistributionLists( d->ccItem );
}
-QStringList
+TQStringList
AddressesDialog::bccDistributionLists() const
{
return allDistributionLists( d->bccItem );
@@ -544,12 +544,12 @@ AddressesDialog::availableAddressSelected( AddresseeViewItem* item, bool selecte
void
AddressesDialog::selectedAddressSelected( AddresseeViewItem* item, bool selected )
{
- // we have to avoid that a parent and a child is selected together
+ // we have to avoid that a tqparent and a child is selected together
// because in this case we get a double object deletion ( program crashes )
// when removing the selected items from list
- AddresseeViewItem* parent = static_cast<AddresseeViewItem*>(((TQListViewItem*)item)->parent());
- if ( parent && selected )
- parent->setSelected( false );
+ AddresseeViewItem* tqparent = static_cast<AddresseeViewItem*>(((TQListViewItem*)item)->tqparent());
+ if ( tqparent && selected )
+ tqparent->setSelected( false );
if (selected)
{
selectedSelectedAddresses.append(item);
@@ -662,10 +662,10 @@ AddressesDialog::addAddresseeToSelected( const KABC::Addressee& addr, AddresseeV
}
void
-AddressesDialog::addAddresseesToSelected( AddresseeViewItem *parent,
+AddressesDialog::addAddresseesToSelected( AddresseeViewItem *tqparent,
const TQPtrList<AddresseeViewItem>& addresses )
{
- Q_ASSERT( parent );
+ Q_ASSERT( tqparent );
TQPtrListIterator<AddresseeViewItem> itr( addresses );
@@ -678,7 +678,7 @@ AddressesDialog::addAddresseesToSelected( AddresseeViewItem *parent,
AddresseeViewItem* address = itr.current();
++itr;
- if (selectedToAvailableMapping.find(address) != 0)
+ if (selectedToAvailableMapping.tqfind(address) != 0)
{
continue;
}
@@ -686,15 +686,15 @@ AddressesDialog::addAddresseesToSelected( AddresseeViewItem *parent,
AddresseeViewItem* newItem = 0;
if (address->category() == AddresseeViewItem::Entry)
{
- newItem = new AddresseeViewItem( parent, address->addressee() );
+ newItem = new AddresseeViewItem( tqparent, address->addressee() );
}
else if (address->category() == AddresseeViewItem::DistList)
{
- newItem = new AddresseeViewItem( parent, address->name() );
+ newItem = new AddresseeViewItem( tqparent, address->name() );
}
else
{
- newItem = new AddresseeViewItem( parent, address->name(), allAddressee( address ) );
+ newItem = new AddresseeViewItem( tqparent, address->name(), allAddressee( address ) );
}
address->setSelected( false );
@@ -705,10 +705,10 @@ AddressesDialog::addAddresseesToSelected( AddresseeViewItem *parent,
this, TQT_SLOT(selectedAddressSelected(AddresseeViewItem*, bool)));
}
- parent->setOpen( true );
+ tqparent->setOpen( true );
}
-QStringList
+TQStringList
AddressesDialog::entryToString( const KABC::Addressee::List& l ) const
{
TQStringList entries;
@@ -819,7 +819,7 @@ AddressesDialog::removeEntry()
resetCC = true;
else if( d->bccItem == item )
resetBCC = true;
- // we may only append parent items
+ // we may only append tqparent items
unmapSelectedAddress(item);
lst.append( item );
}
@@ -854,7 +854,7 @@ AddressesDialog::removeEntry()
// copied from kabcore.cpp :(
// KDE4: should be in libkabc I think
-static KABC::Resource *requestResource( KABC::AddressBook* abook, TQWidget *parent )
+static KABC::Resource *requestResource( KABC::AddressBook* abook, TQWidget *tqparent )
{
TQPtrList<KABC::Resource> kabcResources = abook->resources();
@@ -870,7 +870,7 @@ static KABC::Resource *requestResource( KABC::AddressBook* abook, TQWidget *pare
}
}
- KRES::Resource *res = KRES::SelectDialog::getResource( kresResources, parent );
+ KRES::Resource *res = KRES::SelectDialog::getResource( kresResources, tqparent );
return static_cast<KABC::Resource*>( res );
}
#endif
@@ -894,7 +894,7 @@ AddressesDialog::saveAs()
bool ok = false;
TQString name = KInputDialog::getText( i18n("New Distribution List"),
i18n("Please enter name:"),
- TQString::null, &ok,
+ TQString(), &ok,
this );
if ( !ok || name.isEmpty() )
return;
@@ -1002,11 +1002,11 @@ AddressesDialog::filterChanged( const TQString& txt )
if ( item->category() == AddresseeViewItem::Entry ) {
bool matches = item->matches( txt );
item->setVisible( matches );
- TQListViewItem *parent = static_cast<TQListViewItem*>( item )->parent();
- if ( matches && parent ) {
- if ( parent == d->personal ) {
+ TQListViewItem *tqparent = static_cast<TQListViewItem*>( item )->tqparent();
+ if ( matches && tqparent ) {
+ if ( tqparent == d->personal ) {
personalVisible++;
- } else if ( parent == d->recent ) {
+ } else if ( tqparent == d->recent ) {
recentVisible++;
}
}
@@ -1087,19 +1087,19 @@ AddressesDialog::allAddressee( KListView* view, bool onlySelected ) const
}
KABC::Addressee::List
-AddressesDialog::allAddressee( AddresseeViewItem* parent ) const
+AddressesDialog::allAddressee( AddresseeViewItem* tqparent ) const
{
KABC::Addressee::List lst;
- if ( !parent ) return lst;
+ if ( !tqparent ) return lst;
- if ( parent->category() == AddresseeViewItem::Entry )
+ if ( tqparent->category() == AddresseeViewItem::Entry )
{
- lst.append( parent->addressee() );
+ lst.append( tqparent->addressee() );
return lst;
}
- AddresseeViewItem *myChild = static_cast<AddresseeViewItem*>( parent->firstChild() );
+ AddresseeViewItem *myChild = static_cast<AddresseeViewItem*>( tqparent->firstChild() );
while( myChild ) {
if ( myChild->category() == AddresseeViewItem::FilledGroup )
lst += myChild->addresses();
@@ -1111,15 +1111,15 @@ AddressesDialog::allAddressee( AddresseeViewItem* parent ) const
return lst;
}
-QStringList
-AddressesDialog::allDistributionLists( AddresseeViewItem* parent ) const
+TQStringList
+AddressesDialog::allDistributionLists( AddresseeViewItem* tqparent ) const
{
TQStringList lists;
- if ( !parent )
+ if ( !tqparent )
return TQStringList();
- AddresseeViewItem *item = static_cast<AddresseeViewItem*>( parent->firstChild() );
+ AddresseeViewItem *item = static_cast<AddresseeViewItem*>( tqparent->firstChild() );
while ( item ) {
if ( item->category() == AddresseeViewItem::DistList && !item->name().isEmpty() )
lists.append( item->name() );