summaryrefslogtreecommitdiffstats
path: root/kaddressbook/views/contactlistview.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 /kaddressbook/views/contactlistview.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 'kaddressbook/views/contactlistview.cpp')
-rw-r--r--kaddressbook/views/contactlistview.cpp42
1 files changed, 21 insertions, 21 deletions
diff --git a/kaddressbook/views/contactlistview.cpp b/kaddressbook/views/contactlistview.cpp
index 5b9ecbf1..548ad5f9 100644
--- a/kaddressbook/views/contactlistview.cpp
+++ b/kaddressbook/views/contactlistview.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 <tqheader.h>
@@ -47,8 +47,8 @@
/////////////////////////////////
// DynamicTip Methods
-DynamicTip::DynamicTip( ContactListView *parent)
- : TQToolTip( parent )
+DynamicTip::DynamicTip( ContactListView *tqparent)
+ : TQToolTip( tqparent )
{
}
@@ -116,7 +116,7 @@ void DynamicTip::maybeTip( const TQPoint &pos )
linew = lastw;
}
else
- i = QMAX( a, i-1 );
+ i = TQMAX( a, i-1 );
}
if ( notes[i] == '\n' || doBreak ) {
@@ -147,12 +147,12 @@ void DynamicTip::maybeTip( const TQPoint &pos )
// ContactListViewItem Methods
ContactListViewItem::ContactListViewItem(const KABC::Addressee &a,
- ContactListView *parent,
+ ContactListView *tqparent,
KABC::AddressBook *doc,
const KABC::Field::List &fields,
KIMProxy *proxy )
- : KListViewItem(parent), mAddressee(a), mFields( fields ),
- parentListView( parent ), mDocument(doc), mIMProxy( proxy )
+ : KListViewItem(tqparent), mAddressee(a), mFields( fields ),
+ tqparentListView( tqparent ), mDocument(doc), mIMProxy( proxy )
{
if ( mIMProxy )
mHasIM = mIMProxy->isPresent( mAddressee.uid() );
@@ -164,15 +164,15 @@ ContactListViewItem::ContactListViewItem(const KABC::Addressee &a,
TQString ContactListViewItem::key(int column, bool ascending) const
{
// Preserve behaviour of TQListViewItem::key(), otherwise we cause a crash if the column does not exist
- if ( column >= parentListView->columns() )
- return TQString::null;
+ if ( column >= tqparentListView->columns() )
+ return TQString();
#if KDE_VERSION >= 319
Q_UNUSED( ascending )
- if ( parentListView->showIM() ) {
+ if ( tqparentListView->showIM() ) {
// in this case, one column is reserved for IM presence
// so we have to process it differently
- if ( column == parentListView->imColumn() ) {
+ if ( column == tqparentListView->imColumn() ) {
// increment by one before converting to string so that -1 is not greater than 1
// create the sort key by taking the numeric status 0 low, 5 high, and subtracting it from 5
// so that the default ascending gives online before offline, etc.
@@ -201,16 +201,16 @@ void ContactListViewItem::paintCell(TQPainter * p,
if ( !p )
return;
- if (parentListView->singleLine()) {
- p->setPen( parentListView->alternateColor() );
+ if (tqparentListView->singleLine()) {
+ p->setPen( tqparentListView->alternateColor() );
p->drawLine( 0, height() - 1, width, height() - 1 );
}
}
-ContactListView *ContactListViewItem::parent()
+ContactListView *ContactListViewItem::tqparent()
{
- return parentListView;
+ return tqparentListView;
}
@@ -222,7 +222,7 @@ void ContactListViewItem::refresh()
}
// Update our addressee, since it may have changed elsewhere
- mAddressee = mDocument->tqfindByUid(mAddressee.uid());
+ mAddressee = mDocument->findByUid(mAddressee.uid());
if (mAddressee.isEmpty())
return;
@@ -230,9 +230,9 @@ void ContactListViewItem::refresh()
// don't show unknown presence, it's not interesting
if ( mHasIM ) {
if ( mIMProxy->presenceNumeric( mAddressee.uid() ) > 0 )
- setPixmap( parentListView->imColumn(), mIMProxy->presenceIcon( mAddressee.uid() ) );
+ setPixmap( tqparentListView->imColumn(), mIMProxy->presenceIcon( mAddressee.uid() ) );
else
- setPixmap( parentListView->imColumn(), TQPixmap() );
+ setPixmap( tqparentListView->imColumn(), TQPixmap() );
}
KABC::Field::List::ConstIterator it;
@@ -258,9 +258,9 @@ void ContactListViewItem::setHasIM( bool hasIM )
ContactListView::ContactListView(KAddressBookTableView *view,
KABC::AddressBook* /* doc */,
- TQWidget *parent,
+ TQWidget *tqparent,
const char *name )
- : KListView( parent, name ),
+ : KListView( tqparent, name ),
pabWidget( view ),
oldColumn( 0 )
{