summaryrefslogtreecommitdiffstats
path: root/kaddressbook/views/cardview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kaddressbook/views/cardview.cpp')
-rw-r--r--kaddressbook/views/cardview.cpp72
1 files changed, 36 insertions, 36 deletions
diff --git a/kaddressbook/views/cardview.cpp b/kaddressbook/views/cardview.cpp
index 6e7d71d67..5c8ccf827 100644
--- a/kaddressbook/views/cardview.cpp
+++ b/kaddressbook/views/cardview.cpp
@@ -107,9 +107,9 @@ class CardViewSeparator
cg.brush(TQColorGroup::Button) );
}
- void repaintSeparator()
+ void tqrepaintSeparator()
{
- mView->repaintContents( mRect );
+ mView->tqrepaintContents( mRect );
}
private:
@@ -355,7 +355,7 @@ int CardViewItem::height( bool allowCache ) const
for ( iter.toFirst(); iter.current(); ++iter ) {
if ( !sef && (*iter)->second.isEmpty() )
continue;
- lines = QMIN( (*iter)->second.contains( '\n' ) + 1, maxLines );
+ lines = QMIN( (*iter)->second.tqcontains( '\n' ) + 1, maxLines );
fieldHeight += ( lines * fh ) + 2;
}
@@ -448,16 +448,16 @@ CardViewItem *CardViewItem::nextItem() const
return item;
}
-void CardViewItem::repaintCard()
+void CardViewItem::tqrepaintCard()
{
if ( mView )
- mView->repaintItem( this );
+ mView->tqrepaintItem( this );
}
void CardViewItem::setCaption( const TQString &caption )
{
d->mCaption = caption;
- repaintCard();
+ tqrepaintCard();
}
TQString CardViewItem::fieldValue( const TQString &label ) const
@@ -507,7 +507,7 @@ void CardViewItem::showFullString( const TQPoint &itempos, CardViewTip *tip )
Field *_f;
for ( _f = d->mFieldList.first(); _f != f; _f = d->mFieldList.next() )
if ( se || ! _f->second.isEmpty() )
- y += ( QMIN( _f->second.contains( '\n' ) + 1, maxLines ) * fh ) + 2;
+ y += ( QMIN( _f->second.tqcontains( '\n' ) + 1, maxLines ) * fh ) + 2;
if ( isLabel && itempos.y() > y + fh )
return;
@@ -521,7 +521,7 @@ void CardViewItem::showFullString( const TQPoint &itempos, CardViewTip *tip )
trimmed = mView->d->mFm->width( s ) > mw - colonWidth;
} else {
TQRect r( mView->d->mFm->boundingRect( 0, 0, INT_MAX, INT_MAX, Qt::AlignTop|Qt::AlignLeft, s ) );
- trimmed = r.width() > mw || r.height() / fh > QMIN( s.contains( '\n' ) + 1, maxLines );
+ trimmed = r.width() > mw || r.height() / fh > QMIN( s.tqcontains( '\n' ) + 1, maxLines );
}
}
@@ -560,7 +560,7 @@ CardViewItem::Field *CardViewItem::fieldAt( const TQPoint & itempos ) const
Field *f;
for ( f = d->mFieldList.first(); f; f = d->mFieldList.next() ) {
if ( showEmpty || !f->second.isEmpty() )
- ypos += (QMIN( f->second.contains( '\n' )+1, maxLines ) * fh) + 2;
+ ypos += (QMIN( f->second.tqcontains( '\n' )+1, maxLines ) * fh) + 2;
if ( iy <= ypos )
break;
}
@@ -653,9 +653,9 @@ void CardView::setCurrentItem( CardViewItem *item )
CardViewItem *it = d->mCurrentItem;
d->mCurrentItem = item;
if ( it )
- it->repaintCard();
+ it->tqrepaintCard();
- item->repaintCard();
+ item->tqrepaintCard();
}
if ( ! d->mOnSeparator )
@@ -671,7 +671,7 @@ CardViewItem *CardView::itemAt( const TQPoint &viewPos ) const
bool found = false;
for ( iter.toFirst(); iter.current() && !found; ++iter ) {
item = *iter;
- if ( TQRect( item->d->x, item->d->y, d->mItemWidth, item->height() ).contains( viewPos ) )
+ if ( TQRect( item->d->x, item->d->y, d->mItemWidth, item->height() ).tqcontains( viewPos ) )
found = true;
}
@@ -681,7 +681,7 @@ CardViewItem *CardView::itemAt( const TQPoint &viewPos ) const
return 0;
}
-TQRect CardView::itemRect( const CardViewItem *item ) const
+TQRect CardView::tqitemRect( const CardViewItem *item ) const
{
return TQRect( item->d->x, item->d->y, d->mItemWidth, item->height() );
}
@@ -692,9 +692,9 @@ void CardView::ensureItemVisible( const CardViewItem *item )
ensureVisible( item->d->x + d->mItemWidth, item->d->y, d->mItemSpacing, 0 );
}
-void CardView::repaintItem( const CardViewItem *item )
+void CardView::tqrepaintItem( const CardViewItem *item )
{
- repaintContents( TQRect( item->d->x, item->d->y, d->mItemWidth, item->height() ) );
+ tqrepaintContents( TQRect( item->d->x, item->d->y, d->mItemWidth, item->height() ) );
}
void CardView::setSelectionMode( CardView::SelectionMode mode )
@@ -716,7 +716,7 @@ void CardView::selectAll( bool state )
for ( iter.toFirst(); iter.current(); ++iter ) {
if ( (*iter)->isSelected() ) {
(*iter)->setSelected( false );
- (*iter)->repaintCard();
+ (*iter)->tqrepaintCard();
}
}
@@ -743,7 +743,7 @@ void CardView::setSelected( CardViewItem *item, bool selected )
CardViewItem *it = d->mCurrentItem;
d->mCurrentItem = item;
if ( it )
- it->repaintCard();
+ it->tqrepaintCard();
}
if ( d->mSelectionMode == CardView::Single ) {
@@ -754,7 +754,7 @@ void CardView::setSelected( CardViewItem *item, bool selected )
if ( selected ) {
item->setSelected( selected );
- item->repaintCard();
+ item->tqrepaintCard();
emit selectionChanged();
emit selectionChanged( item );
} else {
@@ -763,7 +763,7 @@ void CardView::setSelected( CardViewItem *item, bool selected )
}
} else if ( d->mSelectionMode == CardView::Multi ) {
item->setSelected( selected );
- item->repaintCard();
+ item->tqrepaintCard();
emit selectionChanged();
} else if ( d->mSelectionMode == CardView::Extended ) {
bool b = signalsBlocked();
@@ -772,7 +772,7 @@ void CardView::setSelected( CardViewItem *item, bool selected )
blockSignals( b );
item->setSelected( selected );
- item->repaintCard();
+ item->tqrepaintCard();
emit selectionChanged();
}
}
@@ -860,7 +860,7 @@ void CardView::drawContents( TQPainter *p, int clipx, int clipy,
item = *iter;
cardRect.setRect( item->d->x, item->d->y, d->mItemWidth, item->height() );
- if ( clipRect.intersects( cardRect ) || clipRect.contains( cardRect ) ) {
+ if ( clipRect.intersects( cardRect ) || clipRect.tqcontains( cardRect ) ) {
// Tell the card to paint
p->save();
p->translate( cardRect.x(), cardRect.y() );
@@ -875,7 +875,7 @@ void CardView::drawContents( TQPainter *p, int clipx, int clipy,
sep = *sepIter;
sepRect = sep->mRect;
- if ( clipRect.intersects( sepRect ) || clipRect.contains( sepRect ) ) {
+ if ( clipRect.intersects( sepRect ) || clipRect.tqcontains( sepRect ) ) {
p->save();
p->translate( sepRect.x(), sepRect.y() );
sep->paintSeparator( p, cg );
@@ -893,7 +893,7 @@ void CardView::resizeEvent( TQResizeEvent *event )
void CardView::calcLayout()
{
- // Start in the upper left corner and layout all the
+ // Start in the upper left corner and tqlayout all the
// cars using their height and width
int maxWidth = 0;
int maxHeight = 0;
@@ -1048,12 +1048,12 @@ void CardView::contentsMousePressEvent( TQMouseEvent *e )
blockSignals( b );
item->setSelected( true );
- item->repaintCard();
+ item->tqrepaintCard();
emit selectionChanged( item );
} else if ( d->mSelectionMode == CardView::Multi ) {
// toggle the selection
item->setSelected( !item->isSelected() );
- item->repaintCard();
+ item->tqrepaintCard();
emit selectionChanged();
} else if ( d->mSelectionMode == CardView::Extended ) {
if ( (e->button() & Qt::LeftButton) && (e->state() & Qt::ShiftButton) ) {
@@ -1079,13 +1079,13 @@ void CardView::contentsMousePressEvent( TQMouseEvent *e )
for ( ; from <= to; from++ ) {
aItem = d->mItemList.at( from );
aItem->setSelected( s );
- repaintItem( aItem );
+ tqrepaintItem( aItem );
}
emit selectionChanged();
} else if ( (e->button() & Qt::LeftButton) && (e->state() & Qt::ControlButton) ) {
item->setSelected( !item->isSelected() );
- item->repaintCard();
+ item->tqrepaintCard();
emit selectionChanged();
} else if ( e->button() & Qt::LeftButton ) {
bool b = signalsBlocked();
@@ -1094,7 +1094,7 @@ void CardView::contentsMousePressEvent( TQMouseEvent *e )
blockSignals( b );
item->setSelected( true );
- item->repaintCard();
+ item->tqrepaintCard();
emit selectionChanged();
}
}
@@ -1202,13 +1202,13 @@ void CardView::focusInEvent( TQFocusEvent* )
if ( !d->mCurrentItem && d->mItemList.count() )
setCurrentItem( d->mItemList.first() );
else if ( d->mCurrentItem )
- d->mCurrentItem->repaintCard();
+ d->mCurrentItem->tqrepaintCard();
}
void CardView::focusOutEvent( TQFocusEvent* )
{
if ( d->mCurrentItem )
- d->mCurrentItem->repaintCard();
+ d->mCurrentItem->tqrepaintCard();
}
void CardView::keyPressEvent( TQKeyEvent *e )
@@ -1324,7 +1324,7 @@ void CardView::keyPressEvent( TQKeyEvent *e )
break;
case Key_Menu:
emit contextMenuRequested( d->mCurrentItem, viewport()->mapToGlobal(
- itemRect(d->mCurrentItem).center() ) );
+ tqitemRect(d->mCurrentItem).center() ) );
break;
default:
if ( (e->state() & ControlButton) && e->key() == Key_A ) {
@@ -1363,7 +1363,7 @@ void CardView::keyPressEvent( TQKeyEvent *e )
for ( ; from <= to; from++ ) {
item = d->mItemList.at( from );
item->setSelected( s );
- repaintItem( item );
+ tqrepaintItem( item );
}
emit selectionChanged();
@@ -1392,7 +1392,7 @@ void CardView::setLayoutDirty( bool dirty )
{
if ( d->mLayoutDirty != dirty ) {
d->mLayoutDirty = dirty;
- repaint();
+ tqrepaint();
}
}
@@ -1400,7 +1400,7 @@ void CardView::setDrawCardBorder( bool enabled )
{
if ( enabled != d->mDrawCardBorder ) {
d->mDrawCardBorder = enabled;
- repaint();
+ tqrepaint();
}
}
@@ -1426,7 +1426,7 @@ void CardView::setDrawFieldLabels( bool enabled )
{
if ( enabled != d->mDrawFieldLabels ) {
d->mDrawFieldLabels = enabled;
- repaint();
+ tqrepaint();
}
}
@@ -1462,7 +1462,7 @@ void CardView::tryShowFullText()
CardViewItem *item = itemAt( cpos );
if ( item ) {
// query it for a value to display
- TQPoint ipos = cpos - itemRect( item ).topLeft();
+ TQPoint ipos = cpos - tqitemRect( item ).topLeft();
item->showFullString( ipos, d->mTip );
}
}