summaryrefslogtreecommitdiffstats
path: root/kaddressbook/views
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
commit7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch)
tree8474f9b444b2756228600050f07a7ff25de532b2 /kaddressbook/views
parentf587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff)
downloadtdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz
tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kaddressbook/views')
-rw-r--r--kaddressbook/views/cardview.cpp262
-rw-r--r--kaddressbook/views/cardview.h84
-rw-r--r--kaddressbook/views/colorlistbox.cpp42
-rw-r--r--kaddressbook/views/colorlistbox.h28
-rw-r--r--kaddressbook/views/configurecardviewdialog.cpp138
-rw-r--r--kaddressbook/views/configurecardviewdialog.h22
-rw-r--r--kaddressbook/views/configuretableviewdialog.cpp44
-rw-r--r--kaddressbook/views/configuretableviewdialog.h16
-rw-r--r--kaddressbook/views/contactlistview.cpp80
-rw-r--r--kaddressbook/views/contactlistview.h40
-rw-r--r--kaddressbook/views/kaddressbookcardview.cpp110
-rw-r--r--kaddressbook/views/kaddressbookcardview.h22
-rw-r--r--kaddressbook/views/kaddressbookiconview.cpp100
-rw-r--r--kaddressbook/views/kaddressbookiconview.h26
-rw-r--r--kaddressbook/views/kaddressbooktableview.cpp140
-rw-r--r--kaddressbook/views/kaddressbooktableview.h32
16 files changed, 593 insertions, 593 deletions
diff --git a/kaddressbook/views/cardview.cpp b/kaddressbook/views/cardview.cpp
index 82e987794..6e7d71d67 100644
--- a/kaddressbook/views/cardview.cpp
+++ b/kaddressbook/views/cardview.cpp
@@ -24,13 +24,13 @@
#include <limits.h>
-#include <qcursor.h>
-#include <qdatetime.h>
-#include <qlabel.h>
-#include <qpainter.h>
-#include <qstyle.h>
-#include <qtimer.h>
-#include <qtooltip.h>
+#include <tqcursor.h>
+#include <tqdatetime.h>
+#include <tqlabel.h>
+#include <tqpainter.h>
+#include <tqstyle.h>
+#include <tqtimer.h>
+#include <tqtooltip.h>
#include <kdebug.h>
#include <kglobalsettings.h>
@@ -42,10 +42,10 @@
class CardViewTip : public QLabel
{
public:
- CardViewTip( QWidget *parent = 0, const char *name = 0 )
- : QLabel( parent, name )
+ CardViewTip( TQWidget *parent = 0, const char *name = 0 )
+ : TQLabel( parent, name )
{
- setPalette( QToolTip::palette() );
+ setPalette( TQToolTip::palette() );
setFrameStyle( Panel | Plain );
setMidLineWidth( 0 );
setIndent( 1 );
@@ -54,7 +54,7 @@ class CardViewTip : public QLabel
~CardViewTip() {};
protected:
- void leaveEvent( QEvent* )
+ void leaveEvent( TQEvent* )
{
hide();
}
@@ -64,11 +64,11 @@ class CardViewTip : public QLabel
// Warning: make sure you use findRef() instead of find() to find an
// item! Only the pointer value is unique in the list.
//
-class CardViewItemList : public QPtrList<CardViewItem>
+class CardViewItemList : public TQPtrList<CardViewItem>
{
protected:
- virtual int compareItems( QPtrCollection::Item item1,
- QPtrCollection::Item item2 )
+ virtual int compareItems( TQPtrCollection::Item item1,
+ TQPtrCollection::Item item2 )
{
CardViewItem *cItem1 = (CardViewItem*)item1;
CardViewItem *cItem2 = (CardViewItem*)item2;
@@ -96,15 +96,15 @@ class CardViewSeparator
CardViewSeparator( CardView *view )
: mView( view )
{
- mRect = QRect( 0, 0, view->separatorWidth(), 0 );
+ mRect = TQRect( 0, 0, view->separatorWidth(), 0 );
}
~CardViewSeparator() {}
- void paintSeparator( QPainter *p, QColorGroup &cg )
+ void paintSeparator( TQPainter *p, TQColorGroup &cg )
{
p->fillRect( 0, 0, mRect.width(), mRect.height(),
- cg.brush(QColorGroup::Button) );
+ cg.brush(TQColorGroup::Button) );
}
void repaintSeparator()
@@ -114,7 +114,7 @@ class CardViewSeparator
private:
CardView *mView;
- QRect mRect;
+ TQRect mRect;
};
class CardViewPrivate
@@ -134,16 +134,16 @@ class CardViewPrivate
mItemWidth( 200 ),
mMaxFieldLines( INT_MAX ),
mCurrentItem( 0L ),
- mLastClickPos( QPoint(0, 0) ),
+ mLastClickPos( TQPoint(0, 0) ),
mRubberBandAnchor( 0 ),
- mCompText( QString::null )
+ mCompText( TQString::null )
{};
CardViewItemList mItemList;
- QPtrList<CardViewSeparator> mSeparatorList;
- QFontMetrics *mFm;
- QFontMetrics *mBFm;
- QFont mHeaderFont;
+ TQPtrList<CardViewSeparator> mSeparatorList;
+ TQFontMetrics *mFm;
+ TQFontMetrics *mBFm;
+ TQFont mHeaderFont;
CardView::SelectionMode mSelectionMode;
bool mDrawCardBorder;
bool mDrawFieldLabels;
@@ -157,8 +157,8 @@ class CardViewPrivate
int mItemWidth; // width of all items
uint mMaxFieldLines; // Max lines to dispaly pr field
CardViewItem *mCurrentItem;
- QPoint mLastClickPos;
- QTimer *mTimer; // times out if mouse rests for more than 500 msecs
+ TQPoint mLastClickPos;
+ TQTimer *mTimer; // times out if mouse rests for more than 500 msecs
CardViewTip *mTip; // passed to the item under a resting cursor to display full text
bool mOnSeparator; // set/reset on mouse movement
// for resizing by dragging the separators
@@ -173,8 +173,8 @@ class CardViewPrivate
int mPressed; // the colummn that was pressed on at resizing start
int mSpan; // pressed - first
// key completion
- QString mCompText; // current completion string
- QDateTime mCompUpdated; // ...was updated at this time
+ TQString mCompText; // current completion string
+ TQDateTime mCompUpdated; // ...was updated at this time
};
class CardViewItemPrivate
@@ -182,8 +182,8 @@ class CardViewItemPrivate
public:
CardViewItemPrivate() {}
- QString mCaption;
- QPtrList< CardViewItem::Field > mFieldList;
+ TQString mCaption;
+ TQPtrList< CardViewItem::Field > mFieldList;
bool mSelected;
int x; // horizontal position, set by the view
int y; // vertical position, set by the view
@@ -192,7 +192,7 @@ class CardViewItemPrivate
};
-CardViewItem::CardViewItem( CardView *parent, const QString &caption )
+CardViewItem::CardViewItem( CardView *parent, const TQString &caption )
: d( new CardViewItemPrivate() ), mView( parent )
{
d->mCaption = caption;
@@ -222,15 +222,15 @@ void CardViewItem::initialize()
mView->insertItem( this );
}
-void CardViewItem::paintCard( QPainter *p, QColorGroup &cg )
+void CardViewItem::paintCard( TQPainter *p, TQColorGroup &cg )
{
if ( !mView )
return;
- QPen pen;
- QBrush brush;
- QFontMetrics fm = *(mView->d->mFm);
- QFontMetrics bFm = *(mView->d->mBFm);
+ TQPen pen;
+ TQBrush brush;
+ TQFontMetrics fm = *(mView->d->mFm);
+ TQFontMetrics bFm = *(mView->d->mBFm);
bool drawLabels = mView->d->mDrawFieldLabels;
bool drawBorder = mView->d->mDrawCardBorder;
int mg = mView->itemMargin();
@@ -252,9 +252,9 @@ void CardViewItem::paintCard( QPainter *p, QColorGroup &cg )
// Draw a simple box
if ( isSelected() )
- pen = QPen( cg.highlight(), 1 );
+ pen = TQPen( cg.highlight(), 1 );
else
- pen = QPen( cg.button(), 1 );
+ pen = TQPen( cg.button(), 1 );
p->setPen( pen );
// Draw the border - this is only draw if the user asks for it.
@@ -263,15 +263,15 @@ void CardViewItem::paintCard( QPainter *p, QColorGroup &cg )
// set the proper pen color for the caption box
if ( isSelected() )
- brush = cg.brush( QColorGroup::Highlight );
+ brush = cg.brush( TQColorGroup::Highlight );
else
- brush = cg.brush( QColorGroup::Button );
+ brush = cg.brush( TQColorGroup::Button );
p->fillRect( mg, mg, w, 4 + bFm.height(), brush );
// Now paint the caption
p->save();
- QFont bFont = mView->headerFont();
+ TQFont bFont = mView->headerFont();
p->setFont( bFont );
if ( isSelected() )
p->setPen( cg.highlightedText() );
@@ -282,14 +282,14 @@ void CardViewItem::paintCard( QPainter *p, QColorGroup &cg )
p->restore();
// Go through the fields and draw them
- QPtrListIterator<CardViewItem::Field> iter( d->mFieldList );
- QString label, value;
+ TQPtrListIterator<CardViewItem::Field> iter( d->mFieldList );
+ TQString label, value;
int yPos = mg + 4 + bFm.height() + fm.height();
p->setPen( cg.text() );
int fh = fm.height();
int cln( 0 );
- QString tmp;
+ TQString tmp;
int maxLines = mView->maxFieldLines();
for ( iter.toFirst(); iter.current(); ++iter ) {
value = (*iter)->second;
@@ -316,14 +316,14 @@ void CardViewItem::paintCard( QPainter *p, QColorGroup &cg )
// if we are the current item and the view has focus, draw focus rect
if ( mView->currentItem() == this && mView->hasFocus() ) {
- mView->style().drawPrimitive( QStyle::PE_FocusRect, p,
- QRect( 0, 0, mView->itemWidth(), h + (2 * mg) ), cg,
- QStyle::Style_FocusAtBorder,
- QStyleOption( isSelected() ? cg.highlight() : cg.base() ) );
+ mView->style().drawPrimitive( TQStyle::PE_FocusRect, p,
+ TQRect( 0, 0, mView->itemWidth(), h + (2 * mg) ), cg,
+ TQStyle::Style_FocusAtBorder,
+ TQStyleOption( isSelected() ? cg.highlight() : cg.base() ) );
}
}
-const QString &CardViewItem::caption() const
+const TQString &CardViewItem::caption() const
{
return d->mCaption;
}
@@ -351,7 +351,7 @@ int CardViewItem::height( bool allowCache ) const
int fieldHeight = 0;
int lines;
int maxLines( mView->maxFieldLines() );
- QPtrListIterator<CardViewItem::Field> iter( d->mFieldList );
+ TQPtrListIterator<CardViewItem::Field> iter( d->mFieldList );
for ( iter.toFirst(); iter.current(); ++iter ) {
if ( !sef && (*iter)->second.isEmpty() )
continue;
@@ -375,7 +375,7 @@ void CardViewItem::setSelected( bool selected )
d->mSelected = selected;
}
-void CardViewItem::insertField( const QString &label, const QString &value )
+void CardViewItem::insertField( const TQString &label, const TQString &value )
{
CardViewItem::Field *f = new CardViewItem::Field( label, value );
d->mFieldList.append( f );
@@ -387,11 +387,11 @@ void CardViewItem::insertField( const QString &label, const QString &value )
}
}
-void CardViewItem::removeField( const QString &label )
+void CardViewItem::removeField( const TQString &label )
{
CardViewItem::Field *f;
- QPtrListIterator<CardViewItem::Field> iter( d->mFieldList );
+ TQPtrListIterator<CardViewItem::Field> iter( d->mFieldList );
for ( iter.toFirst(); iter.current(); ++iter ) {
f = *iter;
if ( f->first == label )
@@ -415,15 +415,15 @@ void CardViewItem::clearFields()
mView->setLayoutDirty( true );
}
-QString CardViewItem::trimString( const QString &text, int width,
- QFontMetrics &fm ) const
+TQString CardViewItem::trimString( const TQString &text, int width,
+ TQFontMetrics &fm ) const
{
if ( fm.width( text ) <= width )
return text;
- QString dots = "...";
+ TQString dots = "...";
int dotWidth = fm.width( dots );
- QString trimmed;
+ TQString trimmed;
int charNum = 0;
while ( fm.width( trimmed ) + dotWidth < width ) {
@@ -454,27 +454,27 @@ void CardViewItem::repaintCard()
mView->repaintItem( this );
}
-void CardViewItem::setCaption( const QString &caption )
+void CardViewItem::setCaption( const TQString &caption )
{
d->mCaption = caption;
repaintCard();
}
-QString CardViewItem::fieldValue( const QString &label ) const
+TQString CardViewItem::fieldValue( const TQString &label ) const
{
- QPtrListIterator<CardViewItem::Field> iter( d->mFieldList );
+ TQPtrListIterator<CardViewItem::Field> iter( d->mFieldList );
for ( iter.toFirst(); iter.current(); ++iter )
if ( (*iter)->first == label )
return (*iter)->second;
- return QString();
+ return TQString();
}
-void CardViewItem::showFullString( const QPoint &itempos, CardViewTip *tip )
+void CardViewItem::showFullString( const TQPoint &itempos, CardViewTip *tip )
{
bool trimmed( false );
- QString s;
+ TQString s;
int mrg = mView->itemMargin();
int y = mView->d->mBFm->height() + 6 + mrg;
int w = mView->itemWidth() - (2 * mrg);
@@ -520,7 +520,7 @@ void CardViewItem::showFullString( const QPoint &itempos, CardViewTip *tip )
if ( isLabel ) {
trimmed = mView->d->mFm->width( s ) > mw - colonWidth;
} else {
- QRect r( mView->d->mFm->boundingRect( 0, 0, INT_MAX, INT_MAX, Qt::AlignTop|Qt::AlignLeft, s ) );
+ 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 );
}
}
@@ -532,8 +532,8 @@ void CardViewItem::showFullString( const QPoint &itempos, CardViewTip *tip )
// find a proper position
int lx;
lx = isLabel || !drawLabels ? mrg : lw + mrg + 2;
- QPoint pnt( mView->contentsToViewport( QPoint( d->x, d->y ) ) );
- pnt += QPoint( lx, y );
+ TQPoint pnt( mView->contentsToViewport( TQPoint( d->x, d->y ) ) );
+ pnt += TQPoint( lx, y );
if ( pnt.x() < 0 )
pnt.setX( 0 );
if ( pnt.x() + tip->width() > mView->visibleWidth() )
@@ -546,7 +546,7 @@ void CardViewItem::showFullString( const QPoint &itempos, CardViewTip *tip )
}
}
-CardViewItem::Field *CardViewItem::fieldAt( const QPoint & itempos ) const
+CardViewItem::Field *CardViewItem::fieldAt( const TQPoint & itempos ) const
{
int ypos = mView->d->mBFm->height() + 7 + mView->d->mItemMargin;
int iy = itempos.y();
@@ -569,28 +569,28 @@ CardViewItem::Field *CardViewItem::fieldAt( const QPoint & itempos ) const
}
-CardView::CardView( QWidget *parent, const char *name )
- : QScrollView( parent, name ),
+CardView::CardView( TQWidget *parent, const char *name )
+ : TQScrollView( parent, name ),
d( new CardViewPrivate() )
{
d->mItemList.setAutoDelete( true );
d->mSeparatorList.setAutoDelete( true );
- QFont f = font();
- d->mFm = new QFontMetrics( f );
+ TQFont f = font();
+ d->mFm = new TQFontMetrics( f );
f.setBold( true );
d->mHeaderFont = f;
- d->mBFm = new QFontMetrics( f );
+ d->mBFm = new TQFontMetrics( f );
d->mTip = new CardViewTip( viewport() );
d->mTip->hide();
- d->mTimer = new QTimer( this, "mouseTimer" );
+ d->mTimer = new TQTimer( this, "mouseTimer" );
viewport()->setMouseTracking( true );
viewport()->setFocusProxy( this );
viewport()->setFocusPolicy( WheelFocus );
viewport()->setBackgroundMode( PaletteBase );
- connect( d->mTimer, SIGNAL( timeout() ), this, SLOT( tryShowFullText() ) );
+ connect( d->mTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( tryShowFullText() ) );
setBackgroundMode( PaletteBackground, PaletteBase );
@@ -664,14 +664,14 @@ void CardView::setCurrentItem( CardViewItem *item )
emit currentChanged( item );
}
-CardViewItem *CardView::itemAt( const QPoint &viewPos ) const
+CardViewItem *CardView::itemAt( const TQPoint &viewPos ) const
{
CardViewItem *item = 0;
- QPtrListIterator<CardViewItem> iter( d->mItemList );
+ TQPtrListIterator<CardViewItem> iter( d->mItemList );
bool found = false;
for ( iter.toFirst(); iter.current() && !found; ++iter ) {
item = *iter;
- if ( QRect( item->d->x, item->d->y, d->mItemWidth, item->height() ).contains( viewPos ) )
+ if ( TQRect( item->d->x, item->d->y, d->mItemWidth, item->height() ).contains( viewPos ) )
found = true;
}
@@ -681,9 +681,9 @@ CardViewItem *CardView::itemAt( const QPoint &viewPos ) const
return 0;
}
-QRect CardView::itemRect( const CardViewItem *item ) const
+TQRect CardView::itemRect( const CardViewItem *item ) const
{
- return QRect( item->d->x, item->d->y, d->mItemWidth, item->height() );
+ return TQRect( item->d->x, item->d->y, d->mItemWidth, item->height() );
}
void CardView::ensureItemVisible( const CardViewItem *item )
@@ -694,7 +694,7 @@ void CardView::ensureItemVisible( const CardViewItem *item )
void CardView::repaintItem( const CardViewItem *item )
{
- repaintContents( QRect( item->d->x, item->d->y, d->mItemWidth, item->height() ) );
+ repaintContents( TQRect( item->d->x, item->d->y, d->mItemWidth, item->height() ) );
}
void CardView::setSelectionMode( CardView::SelectionMode mode )
@@ -711,7 +711,7 @@ CardView::SelectionMode CardView::selectionMode() const
void CardView::selectAll( bool state )
{
- QPtrListIterator<CardViewItem> iter( d->mItemList );
+ TQPtrListIterator<CardViewItem> iter( d->mItemList );
if ( !state ) {
for ( iter.toFirst(); iter.current(); ++iter ) {
if ( (*iter)->isSelected() ) {
@@ -785,7 +785,7 @@ bool CardView::isSelected( CardViewItem *item ) const
CardViewItem *CardView::selectedItem() const
{
// find the first selected item
- QPtrListIterator<CardViewItem> iter( d->mItemList );
+ TQPtrListIterator<CardViewItem> iter( d->mItemList );
for ( iter.toFirst(); iter.current(); ++iter ) {
if ( (*iter)->isSelected() )
return *iter;
@@ -804,7 +804,7 @@ int CardView::childCount() const
return d->mItemList.count();
}
-CardViewItem *CardView::findItem( const QString &text, const QString &label,
+CardViewItem *CardView::findItem( const TQString &text, const TQString &label,
Qt::StringComparisonMode compare ) const
{
// If the text is empty, we will return null, since empty text will
@@ -812,9 +812,9 @@ CardViewItem *CardView::findItem( const QString &text, const QString &label,
if ( text.isEmpty() )
return 0;
- QPtrListIterator<CardViewItem> iter( d->mItemList );
+ TQPtrListIterator<CardViewItem> iter( d->mItemList );
if ( compare & Qt::BeginsWith ) {
- QString value;
+ TQString value;
for ( iter.toFirst(); iter.current(); ++iter ) {
value = (*iter)->fieldValue( label ).upper();
if ( value.startsWith( text.upper() ) )
@@ -834,20 +834,20 @@ uint CardView::columnWidth() const
d->mItemWidth + d->mItemSpacing;
}
-void CardView::drawContents( QPainter *p, int clipx, int clipy,
+void CardView::drawContents( TQPainter *p, int clipx, int clipy,
int clipw, int cliph )
{
- QScrollView::drawContents( p, clipx, clipy, clipw, cliph );
+ TQScrollView::drawContents( p, clipx, clipy, clipw, cliph );
if ( d->mLayoutDirty )
calcLayout();
// allow setting costum colors in the viewport pale
- QColorGroup cg = viewport()->palette().active();
+ TQColorGroup cg = viewport()->palette().active();
- QRect clipRect( clipx, clipy, clipw, cliph );
- QRect cardRect;
- QRect sepRect;
+ TQRect clipRect( clipx, clipy, clipw, cliph );
+ TQRect cardRect;
+ TQRect sepRect;
CardViewItem *item;
CardViewSeparator *sep;
@@ -855,7 +855,7 @@ void CardView::drawContents( QPainter *p, int clipx, int clipy,
viewport()->erase( clipRect );
// Now tell the cards to draw, if they are in the clip region
- QPtrListIterator<CardViewItem> iter( d->mItemList );
+ TQPtrListIterator<CardViewItem> iter( d->mItemList );
for ( iter.toFirst(); iter.current(); ++iter) {
item = *iter;
cardRect.setRect( item->d->x, item->d->y, d->mItemWidth, item->height() );
@@ -870,7 +870,7 @@ void CardView::drawContents( QPainter *p, int clipx, int clipy,
}
// Followed by the separators if they are in the clip region
- QPtrListIterator<CardViewSeparator> sepIter( d->mSeparatorList );
+ TQPtrListIterator<CardViewSeparator> sepIter( d->mSeparatorList );
for ( sepIter.toFirst(); sepIter.current(); ++sepIter ) {
sep = *sepIter;
sepRect = sep->mRect;
@@ -884,9 +884,9 @@ void CardView::drawContents( QPainter *p, int clipx, int clipy,
}
}
-void CardView::resizeEvent( QResizeEvent *event )
+void CardView::resizeEvent( TQResizeEvent *event )
{
- QScrollView::resizeEvent( event );
+ TQScrollView::resizeEvent( event );
setLayoutDirty( true );
}
@@ -904,7 +904,7 @@ void CardView::calcLayout()
// delete the old separators
d->mSeparatorList.clear();
- QPtrListIterator<CardViewItem> iter( d->mItemList );
+ TQPtrListIterator<CardViewItem> iter( d->mItemList );
CardViewItem *item = 0;
CardViewSeparator *sep = 0;
xPos += cardSpacing;
@@ -924,7 +924,7 @@ void CardView::calcLayout()
if ( d->mDrawSeparators ) {
// Create a separator since the user asked
sep = new CardViewSeparator( this );
- sep->mRect.moveTopLeft( QPoint( xPos, yPos + d->mItemMargin ) );
+ sep->mRect.moveTopLeft( TQPoint( xPos, yPos + d->mItemMargin ) );
xPos += d->mSepWidth + cardSpacing;
d->mSeparatorList.append( sep );
}
@@ -944,7 +944,7 @@ void CardView::calcLayout()
// Update the height of all the separators now that we know the
// max height of a column
- QPtrListIterator<CardViewSeparator> sepIter( d->mSeparatorList );
+ TQPtrListIterator<CardViewSeparator> sepIter( d->mSeparatorList );
for ( sepIter.toFirst(); sepIter.current(); ++sepIter )
(*sepIter)->mRect.setHeight( maxHeight - 2 * cardSpacing - 2 * d->mItemMargin );
@@ -985,11 +985,11 @@ void CardView::setItemSpacing( uint spacing )
setLayoutDirty( true );
}
-void CardView::contentsMousePressEvent( QMouseEvent *e )
+void CardView::contentsMousePressEvent( TQMouseEvent *e )
{
- QScrollView::contentsMousePressEvent( e );
+ TQScrollView::contentsMousePressEvent( e );
- QPoint pos = contentsToViewport( e->pos() );
+ TQPoint pos = contentsToViewport( e->pos() );
d->mLastClickPos = e->pos();
CardViewItem *item = itemAt( e->pos() );
@@ -1100,9 +1100,9 @@ void CardView::contentsMousePressEvent( QMouseEvent *e )
}
}
-void CardView::contentsMouseReleaseEvent( QMouseEvent *e )
+void CardView::contentsMouseReleaseEvent( TQMouseEvent *e )
{
- QScrollView::contentsMouseReleaseEvent( e );
+ TQScrollView::contentsMouseReleaseEvent( e );
if ( d->mResizeAnchor && d->mSpan ) {
unsetCursor();
@@ -1133,9 +1133,9 @@ void CardView::contentsMouseReleaseEvent( QMouseEvent *e )
emit executed( item );
}
-void CardView::contentsMouseDoubleClickEvent( QMouseEvent *e )
+void CardView::contentsMouseDoubleClickEvent( TQMouseEvent *e )
{
- QScrollView::contentsMouseDoubleClickEvent( e );
+ TQScrollView::contentsMouseDoubleClickEvent( e );
CardViewItem *item = itemAt( e->pos() );
@@ -1148,7 +1148,7 @@ void CardView::contentsMouseDoubleClickEvent( QMouseEvent *e )
emit doubleClicked( item );
}
-void CardView::contentsMouseMoveEvent( QMouseEvent *e )
+void CardView::contentsMouseMoveEvent( TQMouseEvent *e )
{
// resizing
if ( d->mResizeAnchor ) {
@@ -1183,12 +1183,12 @@ void CardView::contentsMouseMoveEvent( QMouseEvent *e )
}
}
-void CardView::enterEvent( QEvent* )
+void CardView::enterEvent( TQEvent* )
{
d->mTimer->start( 500 );
}
-void CardView::leaveEvent( QEvent* )
+void CardView::leaveEvent( TQEvent* )
{
d->mTimer->stop();
if ( d->mOnSeparator ) {
@@ -1197,7 +1197,7 @@ void CardView::leaveEvent( QEvent* )
}
}
-void CardView::focusInEvent( QFocusEvent* )
+void CardView::focusInEvent( TQFocusEvent* )
{
if ( !d->mCurrentItem && d->mItemList.count() )
setCurrentItem( d->mItemList.first() );
@@ -1205,13 +1205,13 @@ void CardView::focusInEvent( QFocusEvent* )
d->mCurrentItem->repaintCard();
}
-void CardView::focusOutEvent( QFocusEvent* )
+void CardView::focusOutEvent( TQFocusEvent* )
{
if ( d->mCurrentItem )
d->mCurrentItem->repaintCard();
}
-void CardView::keyPressEvent( QKeyEvent *e )
+void CardView::keyPressEvent( TQKeyEvent *e )
{
if ( !(childCount() && d->mCurrentItem) ) {
e->ignore();
@@ -1240,12 +1240,12 @@ void CardView::keyPressEvent( QKeyEvent *e )
// look for an item in the previous/next column, starting from
// the vertical middle of the current item.
// FIXME use nice calculatd measures!!!
- QPoint aPoint( d->mCurrentItem->d->x, d->mCurrentItem->d->y );
- aPoint -= QPoint( 30, -(d->mCurrentItem->height() / 2) );
+ TQPoint aPoint( d->mCurrentItem->d->x, d->mCurrentItem->d->y );
+ aPoint -= TQPoint( 30, -(d->mCurrentItem->height() / 2) );
aItem = itemAt( aPoint );
// maybe we hit some space below an item
while ( !aItem && aPoint.y() > 27 ) {
- aPoint -= QPoint( 0, 16 );
+ aPoint -= TQPoint( 0, 16 );
aItem = itemAt( aPoint );
}
if ( aItem )
@@ -1256,11 +1256,11 @@ void CardView::keyPressEvent( QKeyEvent *e )
case Key_Right:
{
// FIXME use nice calculated measures!!!
- QPoint aPoint( d->mCurrentItem->d->x + d->mItemWidth, d->mCurrentItem->d->y );
- aPoint += QPoint( 30, (d->mCurrentItem->height() / 2) );
+ TQPoint aPoint( d->mCurrentItem->d->x + d->mItemWidth, d->mCurrentItem->d->y );
+ aPoint += TQPoint( 30, (d->mCurrentItem->height() / 2) );
aItem = itemAt( aPoint );
while ( !aItem && aPoint.y() > 27 ) {
- aPoint -= QPoint( 0, 16 );
+ aPoint -= TQPoint( 0, 16 );
aItem = itemAt( aPoint );
}
if ( aItem )
@@ -1278,13 +1278,13 @@ void CardView::keyPressEvent( QKeyEvent *e )
break;
case Key_Prior: // PageUp
{
- // QListView: "Make the item above the top visible and current"
+ // TQListView: "Make the item above the top visible and current"
// TODO if contentsY(), pick the top item of the leftmost visible column
if ( contentsX() <= 0 )
return;
int cw = columnWidth();
int theCol = ( QMAX( 0, ( contentsX() / cw) * cw ) ) + d->mItemSpacing;
- aItem = itemAt( QPoint( theCol + 1, d->mItemSpacing + 1 ) );
+ aItem = itemAt( TQPoint( theCol + 1, d->mItemSpacing + 1 ) );
if ( aItem )
setCurrentItem( aItem );
@@ -1292,7 +1292,7 @@ void CardView::keyPressEvent( QKeyEvent *e )
}
case Key_Next: // PageDown
{
- // QListView: "Make the item below the bottom visible and current"
+ // TQListView: "Make the item below the bottom visible and current"
// find the first not fully visible column.
// TODO: consider if a partly visible (or even hidden) item at the
// bottom of the rightmost column exists
@@ -1306,7 +1306,7 @@ void CardView::keyPressEvent( QKeyEvent *e )
while ( theCol > contentsWidth() )
theCol -= columnWidth();
- aItem = itemAt( QPoint( theCol, d->mItemSpacing + 1 ) );
+ aItem = itemAt( TQPoint( theCol, d->mItemSpacing + 1 ) );
if ( aItem )
setCurrentItem( aItem );
@@ -1383,7 +1383,7 @@ void CardView::keyPressEvent( QKeyEvent *e )
}
}
-void CardView::contentsWheelEvent( QWheelEvent *e )
+void CardView::contentsWheelEvent( TQWheelEvent *e )
{
scrollBy( 2 * e->delta() / -3, 0 );
}
@@ -1458,11 +1458,11 @@ void CardView::tryShowFullText()
{
d->mTimer->stop();
// if we have an item
- QPoint cpos = viewportToContents( viewport()->mapFromGlobal( QCursor::pos() ) );
+ TQPoint cpos = viewportToContents( viewport()->mapFromGlobal( TQCursor::pos() ) );
CardViewItem *item = itemAt( cpos );
if ( item ) {
// query it for a value to display
- QPoint ipos = cpos - itemRect( item ).topLeft();
+ TQPoint ipos = cpos - itemRect( item ).topLeft();
item->showFullString( ipos, d->mTip );
}
}
@@ -1477,7 +1477,7 @@ void CardView::drawRubberBands( int pos )
int x = d->mFirstX + tmpcw - d->mSepWidth - contentsX();
int h = visibleHeight();
- QPainter p( viewport() );
+ TQPainter p( viewport() );
p.setRasterOp( XorROP );
p.setPen( gray );
p.setBrush( gray );
@@ -1519,23 +1519,23 @@ void CardView::setItemWidth( int w )
updateContents();
}
-void CardView::setHeaderFont( const QFont &fnt )
+void CardView::setHeaderFont( const TQFont &fnt )
{
d->mHeaderFont = fnt;
delete d->mBFm;
- d->mBFm = new QFontMetrics( fnt );
+ d->mBFm = new TQFontMetrics( fnt );
}
-QFont CardView::headerFont() const
+TQFont CardView::headerFont() const
{
return d->mHeaderFont;
}
-void CardView::setFont( const QFont &fnt )
+void CardView::setFont( const TQFont &fnt )
{
- QScrollView::setFont( fnt );
+ TQScrollView::setFont( fnt );
delete d->mFm;
- d->mFm = new QFontMetrics( fnt );
+ d->mFm = new TQFontMetrics( fnt );
}
int CardView::separatorWidth() const
diff --git a/kaddressbook/views/cardview.h b/kaddressbook/views/cardview.h
index e38a82d53..6539f4459 100644
--- a/kaddressbook/views/cardview.h
+++ b/kaddressbook/views/cardview.h
@@ -24,12 +24,12 @@
#ifndef CARDVIEW_H
#define CARDVIEW_H
-#include <qpair.h>
-#include <qpoint.h>
-#include <qptrlist.h>
-#include <qrect.h>
-#include <qscrollview.h>
-#include <qstring.h>
+#include <tqpair.h>
+#include <tqpoint.h>
+#include <tqptrlist.h>
+#include <tqrect.h>
+#include <tqscrollview.h>
+#include <tqstring.h>
class QLabel;
class QMouseEvent;
@@ -55,7 +55,7 @@ class CardViewItem
A single field in the card view. The first item is the label
and the second item is the value.
*/
- typedef QPair<QString, QString> Field;
+ typedef QPair<TQString, TQString> Field;
/**
Constructor.
@@ -65,26 +65,26 @@ class CardViewItem
appear at the top of the card. This is also the string that will
be used to sort the cards in the view.
*/
- CardViewItem( CardView *parent, const QString &caption = QString() );
+ CardViewItem( CardView *parent, const TQString &caption = TQString() );
virtual ~CardViewItem();
/**
- @return The caption of the card, or QString::null if none was ever set.
+ @return The caption of the card, or TQString::null if none was ever set.
*/
- const QString &caption() const;
+ const TQString &caption() const;
/**
Sets the caption of the card. This is the text that will
appear at the top of the card. This is also the string that will
be used to sort the cards in the view.
*/
- void setCaption( const QString &caption );
+ void setCaption( const TQString &caption );
/**
Paints the card using the given painter and color group. The
card will handle painting itself selected if it is selected.
*/
- virtual void paintCard( QPainter *p, QColorGroup &cg );
+ virtual void paintCard( TQPainter *p, TQColorGroup &cg );
/**
Repaints the card. This is done by sending a repaint event to the
@@ -99,17 +99,17 @@ class CardViewItem
within a card.
@param value The value of the field.
*/
- void insertField( const QString &label, const QString &value );
+ void insertField( const TQString &label, const TQString &value );
/**
Removes the field with label <i>label</i> from the card.
*/
- void removeField( const QString &label );
+ void removeField( const TQString &label );
/**
@return The value of the field with label <i>label</i>.
*/
- QString fieldValue( const QString &label ) const;
+ TQString fieldValue( const TQString &label ) const;
/**
Removes all the fields from this card.
@@ -133,14 +133,14 @@ class CardViewItem
a certain amount of time. If the label or value at pos is obscured
(trimmed) make the label display the full text.
*/
- void showFullString( const QPoint &pos, CardViewTip *tip );
+ void showFullString( const TQPoint &pos, CardViewTip *tip );
/**
@return a pointer to the Field at the position itempos
in this item. 0 is returned if itempos is in the caption.
@param itempos the position in item coordinates
*/
- Field *fieldAt( const QPoint &itempos ) const;
+ Field *fieldAt( const TQPoint &itempos ) const;
CardView *cardView() const { return mView; };
@@ -173,7 +173,7 @@ class CardViewItem
<i>width</i>, then the string will be trimmed and a '...' will
be appended.
*/
- QString trimString( const QString &text, int width, QFontMetrics &fm ) const;
+ TQString trimString( const TQString &text, int width, TQFontMetrics &fm ) const;
CardViewItemPrivate *d;
CardView *mView;
@@ -186,8 +186,8 @@ class CardViewItem
displays multiple cards in a grid. The Cards are sorted based on their
caption.
- The CardView class is designed to mirror the API of the QListView or
- QIconView. The CardView is also completely independant of KAddressBook and
+ The CardView class is designed to mirror the API of the TQListView or
+ TQIconView. The CardView is also completely independant of KAddressBook and
can be used elsewhere. With the exception of a few simple config checks,
the CardView is also 100% independant of KDE.
*/
@@ -201,7 +201,7 @@ class CardView : public QScrollView
/**
Constructor.
*/
- CardView( QWidget *parent, const char *name );
+ CardView( TQWidget *parent, const char *name );
virtual ~CardView();
/**
@@ -239,12 +239,12 @@ class CardView : public QScrollView
@return The item found at the given point, or 0 if there is no item
at that point.
*/
- CardViewItem *itemAt( const QPoint &viewPos ) const;
+ CardViewItem *itemAt( const TQPoint &viewPos ) const;
/**
@return The bounding rect of the given item.
*/
- QRect itemRect( const CardViewItem *item ) const;
+ TQRect itemRect( const CardViewItem *item ) const;
/**
Ensures that the given item is in the viewable area of the widget
@@ -320,7 +320,7 @@ class CardView : public QScrollView
@return The first matching item, or 0 if no items match.
*/
- CardViewItem *findItem( const QString &text, const QString &label,
+ CardViewItem *findItem( const TQString &text, const TQString &label,
Qt::StringComparisonMode compare = Qt::BeginsWith ) const;
/**
@@ -390,7 +390,7 @@ class CardView : public QScrollView
which is 80. It is currently not checked, so setting a value greater than 40
will probably mean a crash in the items painting routine.
*/
- // Note: I looked for a value in QStyle::PixelMetric to use, but I could
+ // Note: I looked for a value in TQStyle::PixelMetric to use, but I could
// not see a useful one. One may turn up in a future version of Qt.
uint itemMargin() const;
@@ -405,7 +405,7 @@ class CardView : public QScrollView
column, between the items and column separators if drawn, and between
the items and the borders of the widget. The default value is set to 10.
*/
- // Note: There is no useful QStyle::PixelMetric to use for this atm.
+ // Note: There is no useful TQStyle::PixelMetric to use for this atm.
// An option would be using KDialog::spacingHint().
uint itemSpacing() const;
@@ -428,17 +428,17 @@ class CardView : public QScrollView
/**
Sets the header font
*/
- void setHeaderFont( const QFont &fnt );
+ void setHeaderFont( const TQFont &fnt );
/**
@return the header font
*/
- QFont headerFont() const;
+ TQFont headerFont() const;
/**
Reimplementation from QWidget
*/
- void setFont( const QFont &fnt );
+ void setFont( const TQFont &fnt );
/**
Sets the column separator width
@@ -505,24 +505,24 @@ class CardView : public QScrollView
/**
Emitted when the context menu is requested in some way.
*/
- void contextMenuRequested( CardViewItem*, const QPoint& );
+ void contextMenuRequested( CardViewItem*, const TQPoint& );
protected:
/**
Determines which cards intersect that region and tells them to paint
themselves.
*/
- void drawContents( QPainter *p, int clipx, int clipy, int clipw, int cliph );
+ void drawContents( TQPainter *p, int clipx, int clipy, int clipw, int cliph );
/**
Sets the layout to dirty and repaints.
*/
- void resizeEvent( QResizeEvent* );
+ void resizeEvent( TQResizeEvent* );
/**
Changes the direction the canvas scolls.
*/
- void contentsWheelEvent( QWheelEvent* );
+ void contentsWheelEvent( TQWheelEvent* );
/**
Sets the layout to dirty and calls for a repaint.
@@ -536,18 +536,18 @@ class CardView : public QScrollView
*/
void calcLayout();
- virtual void contentsMousePressEvent( QMouseEvent* );
- virtual void contentsMouseMoveEvent( QMouseEvent* );
- virtual void contentsMouseReleaseEvent( QMouseEvent* );
- virtual void contentsMouseDoubleClickEvent( QMouseEvent* );
+ virtual void contentsMousePressEvent( TQMouseEvent* );
+ virtual void contentsMouseMoveEvent( TQMouseEvent* );
+ virtual void contentsMouseReleaseEvent( TQMouseEvent* );
+ virtual void contentsMouseDoubleClickEvent( TQMouseEvent* );
- virtual void enterEvent( QEvent* );
- virtual void leaveEvent( QEvent* );
+ virtual void enterEvent( TQEvent* );
+ virtual void leaveEvent( TQEvent* );
- virtual void focusInEvent( QFocusEvent* );
- virtual void focusOutEvent( QFocusEvent* );
+ virtual void focusInEvent( TQFocusEvent* );
+ virtual void focusOutEvent( TQFocusEvent* );
- virtual void keyPressEvent( QKeyEvent* );
+ virtual void keyPressEvent( TQKeyEvent* );
/**
Overload this method to be told when a drag should be started.
diff --git a/kaddressbook/views/colorlistbox.cpp b/kaddressbook/views/colorlistbox.cpp
index 37a2ac1f4..8043eacde 100644
--- a/kaddressbook/views/colorlistbox.cpp
+++ b/kaddressbook/views/colorlistbox.cpp
@@ -18,17 +18,17 @@
*
*/
-#include <qpainter.h>
+#include <tqpainter.h>
#include <kcolordialog.h>
#include <kcolordrag.h>
#include "colorlistbox.h"
-ColorListBox::ColorListBox( QWidget *parent, const char *name, WFlags f )
+ColorListBox::ColorListBox( TQWidget *parent, const char *name, WFlags f )
:KListBox( parent, name, f ), mCurrentOnDragEnter(-1)
{
- connect( this, SIGNAL(selected(int)), this, SLOT(newColor(int)) );
+ connect( this, TQT_SIGNAL(selected(int)), this, TQT_SLOT(newColor(int)) );
setAcceptDrops( true);
}
@@ -40,7 +40,7 @@ void ColorListBox::setEnabled( bool state )
return;
}
- QListBox::setEnabled( state );
+ TQListBox::setEnabled( state );
for( uint i=0; i<count(); i++ )
{
updateItem( i );
@@ -48,7 +48,7 @@ void ColorListBox::setEnabled( bool state )
}
-void ColorListBox::setColor( uint index, const QColor &color )
+void ColorListBox::setColor( uint index, const TQColor &color )
{
if( index < count() )
{
@@ -59,7 +59,7 @@ void ColorListBox::setColor( uint index, const QColor &color )
}
-QColor ColorListBox::color( uint index ) const
+TQColor ColorListBox::color( uint index ) const
{
if( index < count() )
{
@@ -82,8 +82,8 @@ void ColorListBox::newColor( int index )
if( (uint)index < count() )
{
- QColor c = color( index );
- if( KColorDialog::getColor( c, this ) != QDialog::Rejected )
+ TQColor c = color( index );
+ if( KColorDialog::getColor( c, this ) != TQDialog::Rejected )
{
setColor( index, c );
}
@@ -91,7 +91,7 @@ void ColorListBox::newColor( int index )
}
-void ColorListBox::dragEnterEvent( QDragEnterEvent *e )
+void ColorListBox::dragEnterEvent( TQDragEnterEvent *e )
{
if( KColorDrag::canDecode(e) && isEnabled() )
{
@@ -106,7 +106,7 @@ void ColorListBox::dragEnterEvent( QDragEnterEvent *e )
}
-void ColorListBox::dragLeaveEvent( QDragLeaveEvent * )
+void ColorListBox::dragLeaveEvent( TQDragLeaveEvent * )
{
if( mCurrentOnDragEnter != -1 )
{
@@ -116,7 +116,7 @@ void ColorListBox::dragLeaveEvent( QDragLeaveEvent * )
}
-void ColorListBox::dragMoveEvent( QDragMoveEvent *e )
+void ColorListBox::dragMoveEvent( TQDragMoveEvent *e )
{
if( KColorDrag::canDecode(e) && isEnabled() )
{
@@ -129,9 +129,9 @@ void ColorListBox::dragMoveEvent( QDragMoveEvent *e )
}
-void ColorListBox::dropEvent( QDropEvent *e )
+void ColorListBox::dropEvent( TQDropEvent *e )
{
- QColor color;
+ TQColor color;
if( KColorDrag::decode( e, color ) )
{
int index = currentItem();
@@ -147,28 +147,28 @@ void ColorListBox::dropEvent( QDropEvent *e )
-ColorListItem::ColorListItem( const QString &text, const QColor &color )
- : QListBoxItem(), mColor( color ), mBoxWidth( 30 )
+ColorListItem::ColorListItem( const TQString &text, const TQColor &color )
+ : TQListBoxItem(), mColor( color ), mBoxWidth( 30 )
{
setText( text );
}
-const QColor &ColorListItem::color( void )
+const TQColor &ColorListItem::color( void )
{
return( mColor );
}
-void ColorListItem::setColor( const QColor &color )
+void ColorListItem::setColor( const TQColor &color )
{
mColor = color;
}
-void ColorListItem::paint( QPainter *p )
+void ColorListItem::paint( TQPainter *p )
{
- QFontMetrics fm = p->fontMetrics();
+ TQFontMetrics fm = p->fontMetrics();
int h = fm.height();
p->drawText( mBoxWidth+3*2, fm.ascent() + fm.leading()/2, text() );
@@ -179,13 +179,13 @@ void ColorListItem::paint( QPainter *p )
}
-int ColorListItem::height(const QListBox *lb ) const
+int ColorListItem::height(const TQListBox *lb ) const
{
return( lb->fontMetrics().lineSpacing()+1 );
}
-int ColorListItem::width(const QListBox *lb ) const
+int ColorListItem::width(const TQListBox *lb ) const
{
return( mBoxWidth + lb->fontMetrics().width( text() ) + 6 );
}
diff --git a/kaddressbook/views/colorlistbox.h b/kaddressbook/views/colorlistbox.h
index 06b2c4627..053f06fff 100644
--- a/kaddressbook/views/colorlistbox.h
+++ b/kaddressbook/views/colorlistbox.h
@@ -28,18 +28,18 @@ class ColorListBox : public KListBox
Q_OBJECT
public:
- ColorListBox( QWidget *parent=0, const char * name=0, WFlags f=0 );
- void setColor( uint index, const QColor &color );
- QColor color( uint index ) const;
+ ColorListBox( TQWidget *parent=0, const char * name=0, WFlags f=0 );
+ void setColor( uint index, const TQColor &color );
+ TQColor color( uint index ) const;
public slots:
virtual void setEnabled( bool state );
protected:
- void dragEnterEvent( QDragEnterEvent *e );
- void dragLeaveEvent( QDragLeaveEvent *e );
- void dragMoveEvent( QDragMoveEvent *e );
- void dropEvent( QDropEvent *e );
+ void dragEnterEvent( TQDragEnterEvent *e );
+ void dragLeaveEvent( TQDragLeaveEvent *e );
+ void dragMoveEvent( TQDragMoveEvent *e );
+ void dropEvent( TQDropEvent *e );
private slots:
void newColor( int index );
@@ -53,17 +53,17 @@ class ColorListBox : public KListBox
class ColorListItem : public QListBoxItem
{
public:
- ColorListItem( const QString &text, const QColor &color=Qt::black );
- const QColor &color( void );
- void setColor( const QColor &color );
+ ColorListItem( const TQString &text, const TQColor &color=Qt::black );
+ const TQColor &color( void );
+ void setColor( const TQColor &color );
protected:
- virtual void paint( QPainter * );
- virtual int height( const QListBox * ) const;
- virtual int width( const QListBox * ) const;
+ virtual void paint( TQPainter * );
+ virtual int height( const TQListBox * ) const;
+ virtual int width( const TQListBox * ) const;
private:
- QColor mColor;
+ TQColor mColor;
int mBoxWidth;
};
diff --git a/kaddressbook/views/configurecardviewdialog.cpp b/kaddressbook/views/configurecardviewdialog.cpp
index 8843d3c68..ed7cfda1f 100644
--- a/kaddressbook/views/configurecardviewdialog.cpp
+++ b/kaddressbook/views/configurecardviewdialog.cpp
@@ -21,15 +21,15 @@
without including the source code for Qt in the source distribution.
*/
-#include <qstring.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qvbox.h>
-#include <qgroupbox.h>
-#include <qspinbox.h>
-#include <qtabwidget.h>
-#include <qwhatsthis.h>
+#include <tqstring.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqvbox.h>
+#include <tqgroupbox.h>
+#include <tqspinbox.h>
+#include <tqtabwidget.h>
+#include <tqwhatsthis.h>
#include <kdebug.h>
#include <kglobal.h>
@@ -47,11 +47,11 @@
/////////////////////////////////
// ConfigureCardViewDialog
-ConfigureCardViewWidget::ConfigureCardViewWidget( KABC::AddressBook *ab, QWidget *parent,
+ConfigureCardViewWidget::ConfigureCardViewWidget( KABC::AddressBook *ab, TQWidget *parent,
const char *name )
: ViewConfigureWidget( ab, parent, name )
{
- QWidget *page = addPage( i18n( "Look & Feel" ), QString::null,
+ TQWidget *page = addPage( i18n( "Look & Feel" ), TQString::null,
DesktopIcon( "looknfeel" ) );
mAdvancedPage = new CardViewLookNFeelPage( page );
}
@@ -76,8 +76,8 @@ void ConfigureCardViewWidget::saveSettings( KConfig *config )
////////////////////////
// CardViewLookNFeelPage
-CardViewLookNFeelPage::CardViewLookNFeelPage( QWidget *parent, const char *name )
- : QVBox( parent, name )
+CardViewLookNFeelPage::CardViewLookNFeelPage( TQWidget *parent, const char *name )
+ : TQVBox( parent, name )
{
initGUI();
}
@@ -90,7 +90,7 @@ void CardViewLookNFeelPage::restoreSettings( KConfig *config )
{
// colors
cbEnableCustomColors->setChecked( config->readBoolEntry( "EnableCustomColors", false ) );
- QColor c;
+ TQColor c;
c = KGlobalSettings::baseColor();
lbColors->insertItem( new ColorListItem( i18n("Background Color"),
config->readColorEntry( "BackgroundColor", &c ) ) );
@@ -113,10 +113,10 @@ void CardViewLookNFeelPage::restoreSettings( KConfig *config )
enableColors();
// fonts
- QFont fnt = font();
- updateFontLabel( config->readFontEntry( "TextFont", &fnt ), (QLabel*)lTextFont );
+ TQFont fnt = font();
+ updateFontLabel( config->readFontEntry( "TextFont", &fnt ), (TQLabel*)lTextFont );
fnt.setBold( true );
- updateFontLabel( config->readFontEntry( "HeaderFont", &fnt ), (QLabel*)lHeaderFont );
+ updateFontLabel( config->readFontEntry( "HeaderFont", &fnt ), (TQLabel*)lHeaderFont );
cbEnableCustomFonts->setChecked( config->readBoolEntry( "EnableCustomFonts", false ) );
enableFonts();
@@ -166,15 +166,15 @@ void CardViewLookNFeelPage::saveSettings( KConfig *config )
void CardViewLookNFeelPage::setTextFont()
{
- QFont f( lTextFont->font() );
- if ( KFontDialog::getFont( f, false, this ) == QDialog::Accepted )
+ TQFont f( lTextFont->font() );
+ if ( KFontDialog::getFont( f, false, this ) == TQDialog::Accepted )
updateFontLabel( f, lTextFont );
}
void CardViewLookNFeelPage::setHeaderFont()
{
- QFont f( lHeaderFont->font() );
- if ( KFontDialog::getFont( f,false, this ) == QDialog::Accepted )
+ TQFont f( lHeaderFont->font() );
+ if ( KFontDialog::getFont( f,false, this ) == TQDialog::Accepted )
updateFontLabel( f, lHeaderFont );
}
@@ -193,102 +193,102 @@ void CardViewLookNFeelPage::initGUI()
int spacing = KDialog::spacingHint();
int margin = KDialog::marginHint();
- QTabWidget *tabs = new QTabWidget( this );
+ TQTabWidget *tabs = new TQTabWidget( this );
// Layout
- QVBox *loTab = new QVBox( this, "layouttab" );
+ TQVBox *loTab = new TQVBox( this, "layouttab" );
loTab->setSpacing( spacing );
loTab->setMargin( margin );
- QGroupBox *gbGeneral = new QGroupBox( 1, Qt::Horizontal, i18n("General"), loTab );
+ TQGroupBox *gbGeneral = new TQGroupBox( 1, Qt::Horizontal, i18n("General"), loTab );
- cbDrawSeps = new QCheckBox( i18n("Draw &separators"), gbGeneral );
+ cbDrawSeps = new TQCheckBox( i18n("Draw &separators"), gbGeneral );
- QHBox *hbSW = new QHBox( gbGeneral );
- QLabel *lSW = new QLabel( i18n("Separator &width:"), hbSW );
- sbSepWidth = new QSpinBox( 1, 50, 1, hbSW );
+ TQHBox *hbSW = new TQHBox( gbGeneral );
+ TQLabel *lSW = new TQLabel( i18n("Separator &width:"), hbSW );
+ sbSepWidth = new TQSpinBox( 1, 50, 1, hbSW );
lSW->setBuddy( sbSepWidth);
- QHBox *hbPadding = new QHBox( gbGeneral );
- QLabel *lSpacing = new QLabel( i18n("&Padding:"), hbPadding );
- sbSpacing = new QSpinBox( 0, 100, 1, hbPadding );
+ TQHBox *hbPadding = new TQHBox( gbGeneral );
+ TQLabel *lSpacing = new TQLabel( i18n("&Padding:"), hbPadding );
+ sbSpacing = new TQSpinBox( 0, 100, 1, hbPadding );
lSpacing->setBuddy( sbSpacing );
- QGroupBox *gbCards = new QGroupBox( 1, Qt::Horizontal, i18n("Cards"), loTab );
+ TQGroupBox *gbCards = new TQGroupBox( 1, Qt::Horizontal, i18n("Cards"), loTab );
- QHBox *hbMargin = new QHBox( gbCards );
- QLabel *lMargin = new QLabel( i18n("&Margin:"), hbMargin );
- sbMargin = new QSpinBox( 0, 100, 1, hbMargin );
+ TQHBox *hbMargin = new TQHBox( gbCards );
+ TQLabel *lMargin = new TQLabel( i18n("&Margin:"), hbMargin );
+ sbMargin = new TQSpinBox( 0, 100, 1, hbMargin );
lMargin->setBuddy( sbMargin );
- cbDrawBorders = new QCheckBox( i18n("Draw &borders"), gbCards );
+ cbDrawBorders = new TQCheckBox( i18n("Draw &borders"), gbCards );
- loTab->setStretchFactor( new QWidget( loTab ), 1 );
+ loTab->setStretchFactor( new TQWidget( loTab ), 1 );
- QWhatsThis::add( sbMargin, i18n(
+ TQWhatsThis::add( sbMargin, i18n(
"The item margin is the distance (in pixels) between the item edge and the item data. Most noticeably, "
"incrementing the item margin will add space between the focus rectangle and the item data."
) );
- QWhatsThis::add( lMargin, QWhatsThis::textFor( sbMargin ) );
- QWhatsThis::add( sbSpacing, i18n(
+ TQWhatsThis::add( lMargin, TQWhatsThis::textFor( sbMargin ) );
+ TQWhatsThis::add( sbSpacing, i18n(
"The item spacing decides the distance (in pixels) between the items and anything else: the view "
"borders, other items or column separators."
) );
- QWhatsThis::add( lSpacing, QWhatsThis::textFor( sbSpacing ) );
- QWhatsThis::add( sbSepWidth, i18n("Sets the width of column separators") );
- QWhatsThis::add( lSW, QWhatsThis::textFor( sbSepWidth ) );
+ TQWhatsThis::add( lSpacing, TQWhatsThis::textFor( sbSpacing ) );
+ TQWhatsThis::add( sbSepWidth, i18n("Sets the width of column separators") );
+ TQWhatsThis::add( lSW, TQWhatsThis::textFor( sbSepWidth ) );
tabs->addTab( loTab, i18n("&Layout") );
// Colors
- QVBox *colorTab = new QVBox( this, "colortab" );
+ TQVBox *colorTab = new TQVBox( this, "colortab" );
colorTab->setSpacing( spacing );
colorTab->setMargin( spacing );
- cbEnableCustomColors = new QCheckBox( i18n("&Enable custom colors"), colorTab );
- connect( cbEnableCustomColors, SIGNAL(clicked()), this, SLOT(enableColors()) );
+ cbEnableCustomColors = new TQCheckBox( i18n("&Enable custom colors"), colorTab );
+ connect( cbEnableCustomColors, TQT_SIGNAL(clicked()), this, TQT_SLOT(enableColors()) );
lbColors = new ColorListBox( colorTab );
tabs->addTab( colorTab, i18n("&Colors") );
- QWhatsThis::add( cbEnableCustomColors, i18n(
+ TQWhatsThis::add( cbEnableCustomColors, i18n(
"If custom colors is enabled, you may choose the colors for the view below. "
"Otherwise colors from your current KDE color scheme are used."
) );
- QWhatsThis::add( lbColors, i18n(
+ TQWhatsThis::add( lbColors, i18n(
"Double click or press RETURN on a item to select a color for the related strings in the view."
) );
// Fonts
- QVBox *fntTab = new QVBox( this, "fonttab" );
+ TQVBox *fntTab = new TQVBox( this, "fonttab" );
fntTab->setSpacing( spacing );
fntTab->setMargin( spacing );
- cbEnableCustomFonts = new QCheckBox( i18n("&Enable custom fonts"), fntTab );
- connect( cbEnableCustomFonts, SIGNAL(clicked()), this, SLOT(enableFonts()) );
+ cbEnableCustomFonts = new TQCheckBox( i18n("&Enable custom fonts"), fntTab );
+ connect( cbEnableCustomFonts, TQT_SIGNAL(clicked()), this, TQT_SLOT(enableFonts()) );
- vbFonts = new QWidget( fntTab );
- QGridLayout *gFnts = new QGridLayout( vbFonts, 2, 3 );
+ vbFonts = new TQWidget( fntTab );
+ TQGridLayout *gFnts = new TQGridLayout( vbFonts, 2, 3 );
gFnts->setSpacing( spacing );
gFnts->setAutoAdd( true );
gFnts->setColStretch( 1, 1 );
- QLabel *lTFnt = new QLabel( i18n("&Text font:"), vbFonts );
- lTextFont = new QLabel( vbFonts );
- lTextFont->setFrameStyle( QFrame::Panel|QFrame::Sunken );
+ TQLabel *lTFnt = new TQLabel( i18n("&Text font:"), vbFonts );
+ lTextFont = new TQLabel( vbFonts );
+ lTextFont->setFrameStyle( TQFrame::Panel|TQFrame::Sunken );
btnFont = new KPushButton( i18n("Choose..."), vbFonts );
lTFnt->setBuddy( btnFont );
- connect( btnFont, SIGNAL(clicked()), this, SLOT(setTextFont()) );
+ connect( btnFont, TQT_SIGNAL(clicked()), this, TQT_SLOT(setTextFont()) );
- QLabel *lHFnt = new QLabel( i18n("&Header font:"), vbFonts );
- lHeaderFont = new QLabel( vbFonts );
- lHeaderFont->setFrameStyle( QFrame::Panel|QFrame::Sunken );
+ TQLabel *lHFnt = new TQLabel( i18n("&Header font:"), vbFonts );
+ lHeaderFont = new TQLabel( vbFonts );
+ lHeaderFont->setFrameStyle( TQFrame::Panel|TQFrame::Sunken );
btnHeaderFont = new KPushButton( i18n("Choose..."), vbFonts );
lHFnt->setBuddy( btnHeaderFont );
- connect( btnHeaderFont, SIGNAL(clicked()), this, SLOT(setHeaderFont()) );
+ connect( btnHeaderFont, TQT_SIGNAL(clicked()), this, TQT_SLOT(setHeaderFont()) );
- fntTab->setStretchFactor( new QWidget( fntTab ), 1 );
+ fntTab->setStretchFactor( new TQWidget( fntTab ), 1 );
- QWhatsThis::add( cbEnableCustomFonts, i18n(
+ TQWhatsThis::add( cbEnableCustomFonts, i18n(
"If custom fonts are enabled, you may choose which fonts to use for this view below. "
"Otherwise the default KDE font will be used, in bold style for the header and "
"normal style for the data."
@@ -297,23 +297,23 @@ void CardViewLookNFeelPage::initGUI()
tabs->addTab( fntTab, i18n("&Fonts") );
// Behaviour
- QVBox *behaviourTab = new QVBox( this );
+ TQVBox *behaviourTab = new TQVBox( this );
behaviourTab->setMargin( margin );
behaviourTab->setSpacing( spacing );
- cbShowEmptyFields = new QCheckBox( i18n("Show &empty fields"), behaviourTab );
- cbShowFieldLabels = new QCheckBox( i18n("Show field &labels"), behaviourTab );
+ cbShowEmptyFields = new TQCheckBox( i18n("Show &empty fields"), behaviourTab );
+ cbShowFieldLabels = new TQCheckBox( i18n("Show field &labels"), behaviourTab );
- behaviourTab->setStretchFactor( new QWidget( behaviourTab ), 1 );
+ behaviourTab->setStretchFactor( new TQWidget( behaviourTab ), 1 );
tabs->addTab( behaviourTab, i18n("Be&havior") );
}
-void CardViewLookNFeelPage::updateFontLabel( QFont fnt, QLabel *l )
+void CardViewLookNFeelPage::updateFontLabel( TQFont fnt, TQLabel *l )
{
l->setFont( fnt );
- l->setText( QString( fnt.family() + " %1" ).arg( fnt.pointSize() ) );
+ l->setText( TQString( fnt.family() + " %1" ).arg( fnt.pointSize() ) );
}
#include "configurecardviewdialog.moc"
diff --git a/kaddressbook/views/configurecardviewdialog.h b/kaddressbook/views/configurecardviewdialog.h
index a37db6cb3..4d9d19be5 100644
--- a/kaddressbook/views/configurecardviewdialog.h
+++ b/kaddressbook/views/configurecardviewdialog.h
@@ -26,9 +26,9 @@
#include "viewconfigurewidget.h"
-#include <qvbox.h>
-#include <qwidget.h>
-#include <qfont.h>
+#include <tqvbox.h>
+#include <tqwidget.h>
+#include <tqfont.h>
class QString;
class QWidget;
@@ -48,7 +48,7 @@ class CardViewLookAndFeelPage;
class ConfigureCardViewWidget : public ViewConfigureWidget
{
public:
- ConfigureCardViewWidget( KABC::AddressBook *ab, QWidget *parent, const char *name );
+ ConfigureCardViewWidget( KABC::AddressBook *ab, TQWidget *parent, const char *name );
virtual ~ConfigureCardViewWidget();
virtual void restoreSettings( KConfig* );
@@ -77,12 +77,12 @@ class ConfigureCardViewWidget : public ViewConfigureWidget
* item spacing
*/
-class CardViewLookNFeelPage : public QVBox {
+class CardViewLookNFeelPage : public TQVBox {
Q_OBJECT
public:
- CardViewLookNFeelPage( QWidget *parent=0, const char *name=0 );
+ CardViewLookNFeelPage( TQWidget *parent=0, const char *name=0 );
~CardViewLookNFeelPage();
void restoreSettings( KConfig* );
@@ -96,18 +96,18 @@ class CardViewLookNFeelPage : public QVBox {
private:
void initGUI();
- void updateFontLabel( QFont, QLabel * );
+ void updateFontLabel( TQFont, TQLabel * );
- QCheckBox *cbEnableCustomFonts,
+ TQCheckBox *cbEnableCustomFonts,
*cbEnableCustomColors,
*cbDrawSeps, *cbDrawBorders,
*cbShowFieldLabels, *cbShowEmptyFields;
class ColorListBox *lbColors;
- QLabel *lTextFont, *lHeaderFont;
+ TQLabel *lTextFont, *lHeaderFont;
class KPushButton *btnFont, *btnHeaderFont;
- class QSpinBox *sbMargin, *sbSpacing, *sbSepWidth;
+ class TQSpinBox *sbMargin, *sbSpacing, *sbSepWidth;
- class QWidget *vbFonts;
+ class TQWidget *vbFonts;
};
#endif
diff --git a/kaddressbook/views/configuretableviewdialog.cpp b/kaddressbook/views/configuretableviewdialog.cpp
index d01c4d7df..c79ef5244 100644
--- a/kaddressbook/views/configuretableviewdialog.cpp
+++ b/kaddressbook/views/configuretableviewdialog.cpp
@@ -21,13 +21,13 @@
without including the source code for Qt in the source distribution.
*/
-#include <qstring.h>
-#include <qwidget.h>
-#include <qlayout.h>
-#include <qradiobutton.h>
-#include <qcheckbox.h>
-#include <qvbox.h>
-#include <qbuttongroup.h>
+#include <tqstring.h>
+#include <tqwidget.h>
+#include <tqlayout.h>
+#include <tqradiobutton.h>
+#include <tqcheckbox.h>
+#include <tqvbox.h>
+#include <tqbuttongroup.h>
#include <kdeversion.h>
#include <kglobal.h>
@@ -41,11 +41,11 @@
#include "configuretableviewdialog.h"
ConfigureTableViewWidget::ConfigureTableViewWidget( KABC::AddressBook *ab,
- QWidget *parent,
+ TQWidget *parent,
const char *name )
: ViewConfigureWidget( ab, parent, name )
{
- QWidget *page = addPage( i18n( "Look & Feel" ), QString::null,
+ TQWidget *page = addPage( i18n( "Look & Feel" ), TQString::null,
KGlobal::iconLoader()->loadIcon( "looknfeel",
KIcon::Panel ) );
@@ -72,8 +72,8 @@ void ConfigureTableViewWidget::saveSettings( KConfig *config )
-LookAndFeelPage::LookAndFeelPage(QWidget *parent, const char *name)
- : QWidget(parent, name)
+LookAndFeelPage::LookAndFeelPage(TQWidget *parent, const char *name)
+ : TQWidget(parent, name)
{
initGUI();
@@ -111,25 +111,25 @@ void LookAndFeelPage::saveSettings( KConfig *config )
void LookAndFeelPage::initGUI()
{
- QVBoxLayout *layout = new QVBoxLayout(this, 0, KDialogBase::spacingHint());
+ TQVBoxLayout *layout = new TQVBoxLayout(this, 0, KDialogBase::spacingHint());
- QButtonGroup *group = new QButtonGroup(1, Qt::Horizontal,
+ TQButtonGroup *group = new TQButtonGroup(1, Qt::Horizontal,
i18n("Row Separator"), this);
layout->addWidget(group);
- mAlternateButton = new QRadioButton(i18n("Alternating backgrounds"),
+ mAlternateButton = new TQRadioButton(i18n("Alternating backgrounds"),
group, "mAlternateButton");
- mLineButton = new QRadioButton(i18n("Single line"), group, "mLineButton");
- mNoneButton = new QRadioButton(i18n("None"), group, "mNoneButton");
+ mLineButton = new TQRadioButton(i18n("Single line"), group, "mLineButton");
+ mNoneButton = new TQRadioButton(i18n("None"), group, "mNoneButton");
// Background Checkbox/Selector
- QHBoxLayout *backgroundLayout = new QHBoxLayout();
+ TQHBoxLayout *backgroundLayout = new TQHBoxLayout();
layout->addLayout(backgroundLayout);
- mBackgroundBox = new QCheckBox(i18n("Enable background image:"), this,
+ mBackgroundBox = new TQCheckBox(i18n("Enable background image:"), this,
"mBackgroundBox");
- connect(mBackgroundBox, SIGNAL(toggled(bool)),
- SLOT(enableBackgroundToggled(bool)));
+ connect(mBackgroundBox, TQT_SIGNAL(toggled(bool)),
+ TQT_SLOT(enableBackgroundToggled(bool)));
backgroundLayout->addWidget(mBackgroundBox);
mBackgroundName = new KURLRequester(this, "mBackgroundName");
@@ -139,11 +139,11 @@ void LookAndFeelPage::initGUI()
backgroundLayout->addWidget(mBackgroundName);
// ToolTip Checkbox
- mToolTipBox = new QCheckBox(i18n("Enable contact tooltips"), this,
+ mToolTipBox = new TQCheckBox(i18n("Enable contact tooltips"), this,
"mToolTipBox");
layout->addWidget(mToolTipBox);
#if KDE_IS_VERSION(3,2,90)
- mIMPresenceBox = new QCheckBox( i18n( "Show instant messaging presence" ), this, "mIMPresenceBox" );
+ mIMPresenceBox = new TQCheckBox( i18n( "Show instant messaging presence" ), this, "mIMPresenceBox" );
layout->addWidget( mIMPresenceBox );
#endif
}
diff --git a/kaddressbook/views/configuretableviewdialog.h b/kaddressbook/views/configuretableviewdialog.h
index 1260971c2..f1f89d0dc 100644
--- a/kaddressbook/views/configuretableviewdialog.h
+++ b/kaddressbook/views/configuretableviewdialog.h
@@ -45,7 +45,7 @@ class LookAndFeelPage;
class ConfigureTableViewWidget : public ViewConfigureWidget
{
public:
- ConfigureTableViewWidget( KABC::AddressBook *ab, QWidget *parent, const char *name );
+ ConfigureTableViewWidget( KABC::AddressBook *ab, TQWidget *parent, const char *name );
virtual ~ConfigureTableViewWidget();
virtual void restoreSettings( KConfig* );
@@ -65,7 +65,7 @@ class LookAndFeelPage : public QWidget
Q_OBJECT
public:
- LookAndFeelPage( QWidget *parent, const char *name = 0 );
+ LookAndFeelPage( TQWidget *parent, const char *name = 0 );
~LookAndFeelPage() {}
void restoreSettings( KConfig* );
@@ -77,13 +77,13 @@ class LookAndFeelPage : public QWidget
private:
void initGUI();
- QRadioButton *mAlternateButton;
- QRadioButton *mLineButton;
- QRadioButton *mNoneButton;
- QCheckBox *mToolTipBox;
+ TQRadioButton *mAlternateButton;
+ TQRadioButton *mLineButton;
+ TQRadioButton *mNoneButton;
+ TQCheckBox *mToolTipBox;
KURLRequester *mBackgroundName;
- QCheckBox *mBackgroundBox;
- QCheckBox *mIMPresenceBox;
+ TQCheckBox *mBackgroundBox;
+ TQCheckBox *mIMPresenceBox;
};
#endif
diff --git a/kaddressbook/views/contactlistview.cpp b/kaddressbook/views/contactlistview.cpp
index 90941ff56..0bc7c041d 100644
--- a/kaddressbook/views/contactlistview.cpp
+++ b/kaddressbook/views/contactlistview.cpp
@@ -21,14 +21,14 @@
without including the source code for Qt in the source distribution.
*/
-#include <qheader.h>
-#include <qiconset.h>
-#include <qimage.h>
-#include <qdragobject.h>
-#include <qcombobox.h>
-#include <qpainter.h>
-#include <qbrush.h>
-#include <qevent.h>
+#include <tqheader.h>
+#include <tqiconset.h>
+#include <tqimage.h>
+#include <tqdragobject.h>
+#include <tqcombobox.h>
+#include <tqpainter.h>
+#include <tqbrush.h>
+#include <tqevent.h>
#include <klocale.h>
#include <kglobalsettings.h>
@@ -48,11 +48,11 @@
// DynamicTip Methods
DynamicTip::DynamicTip( ContactListView *parent)
- : QToolTip( parent )
+ : TQToolTip( parent )
{
}
-void DynamicTip::maybeTip( const QPoint &pos )
+void DynamicTip::maybeTip( const TQPoint &pos )
{
if (!parentWidget()->inherits( "ContactListView" ))
return;
@@ -61,9 +61,9 @@ void DynamicTip::maybeTip( const QPoint &pos )
if (!plv->tooltips())
return;
- QPoint posVp = plv->viewport()->pos();
+ TQPoint posVp = plv->viewport()->pos();
- QListViewItem *lvi = plv->itemAt( pos - posVp );
+ TQListViewItem *lvi = plv->itemAt( pos - posVp );
if (!lvi)
return;
@@ -71,8 +71,8 @@ void DynamicTip::maybeTip( const QPoint &pos )
if (!plvi)
return;
- QString s;
- QRect r = plv->itemRect( lvi );
+ TQString s;
+ TQRect r = plv->itemRect( lvi );
r.moveBy( posVp.x(), posVp.y() );
//kdDebug(5720) << "Tip rec: " << r.x() << "," << r.y() << "," << r.width()
@@ -89,13 +89,13 @@ void DynamicTip::maybeTip( const QPoint &pos )
s += i18n("label: value", "%1: %2").arg(a.organizationLabel())
.arg(a.organization());
- QString notes = a.note().stripWhiteSpace();
+ TQString notes = a.note().stripWhiteSpace();
if ( !notes.isEmpty() ) {
notes += '\n';
s += '\n' + i18n("label: value", "%1: \n").arg(a.noteLabel());
- QFontMetrics fm( font() );
+ TQFontMetrics fm( font() );
- // Begin word wrap code based on QMultiLineEdit code
+ // Begin word wrap code based on TQMultiLineEdit code
int i = 0;
bool doBreak = false;
int linew = 0;
@@ -161,11 +161,11 @@ ContactListViewItem::ContactListViewItem(const KABC::Addressee &a,
refresh();
}
-QString ContactListViewItem::key(int column, bool ascending) const
+TQString ContactListViewItem::key(int column, bool ascending) const
{
- // Preserve behaviour of QListViewItem::key(), otherwise we cause a crash if the column does not exist
+ // Preserve behaviour of TQListViewItem::key(), otherwise we cause a crash if the column does not exist
if ( column >= parentListView->columns() )
- return QString::null;
+ return TQString::null;
#if KDE_VERSION >= 319
Q_UNUSED( ascending )
@@ -176,7 +176,7 @@ QString ContactListViewItem::key(int column, bool ascending) const
// 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.
- QString key = QString::number( 5 - ( mIMProxy->presenceNumeric( mAddressee.uid() ) + 1 ) );
+ TQString key = TQString::number( 5 - ( mIMProxy->presenceNumeric( mAddressee.uid() ) + 1 ) );
return key;
}
else {
@@ -186,12 +186,12 @@ QString ContactListViewItem::key(int column, bool ascending) const
else
return mFields[ column ]->sortKey( mAddressee );
#else
- return QListViewItem::key( column, ascending ).lower();
+ return TQListViewItem::key( column, ascending ).lower();
#endif
}
-void ContactListViewItem::paintCell(QPainter * p,
- const QColorGroup & cg,
+void ContactListViewItem::paintCell(TQPainter * p,
+ const TQColorGroup & cg,
int column,
int width,
int align)
@@ -232,13 +232,13 @@ void ContactListViewItem::refresh()
if ( mIMProxy->presenceNumeric( mAddressee.uid() ) > 0 )
setPixmap( parentListView->imColumn(), mIMProxy->presenceIcon( mAddressee.uid() ) );
else
- setPixmap( parentListView->imColumn(), QPixmap() );
+ setPixmap( parentListView->imColumn(), TQPixmap() );
}
KABC::Field::List::ConstIterator it;
for ( it = mFields.begin(); it != mFields.end(); ++it ) {
if ( (*it)->label() == KABC::Addressee::birthdayLabel() ) {
- QDate date = mAddressee.birthday().date();
+ TQDate date = mAddressee.birthday().date();
if ( date.isValid() )
setText( i++, KGlobal::locale()->formatDate( date, true ) );
else
@@ -258,7 +258,7 @@ void ContactListViewItem::setHasIM( bool hasIM )
ContactListView::ContactListView(KAddressBookTableView *view,
KABC::AddressBook* /* doc */,
- QWidget *parent,
+ TQWidget *parent,
const char *name )
: KListView( parent, name ),
pabWidget( view ),
@@ -278,15 +278,15 @@ ContactListView::ContactListView(KAddressBookTableView *view,
setSelectionModeExt( KListView::Extended );
setDropVisualizer(false);
- connect(this, SIGNAL(dropped(QDropEvent*)),
- this, SLOT(itemDropped(QDropEvent*)));
+ connect(this, TQT_SIGNAL(dropped(TQDropEvent*)),
+ this, TQT_SLOT(itemDropped(TQDropEvent*)));
new DynamicTip( this );
}
-void ContactListView::paintEmptyArea( QPainter * p, const QRect & rect )
+void ContactListView::paintEmptyArea( TQPainter * p, const TQRect & rect )
{
- QBrush b = palette().brush(QPalette::Active, QColorGroup::Base);
+ TQBrush b = palette().brush(TQPalette::Active, TQColorGroup::Base);
// Get the brush, which will have the background pixmap if there is one.
if (b.pixmap())
@@ -304,7 +304,7 @@ void ContactListView::paintEmptyArea( QPainter * p, const QRect & rect )
}
}
-void ContactListView::contentsMousePressEvent(QMouseEvent* e)
+void ContactListView::contentsMousePressEvent(TQMouseEvent* e)
{
presspos = e->pos();
KListView::contentsMousePressEvent(e);
@@ -312,7 +312,7 @@ void ContactListView::contentsMousePressEvent(QMouseEvent* e)
// To initiate a drag operation
-void ContactListView::contentsMouseMoveEvent( QMouseEvent *e )
+void ContactListView::contentsMouseMoveEvent( TQMouseEvent *e )
{
if ((e->state() & LeftButton) && (e->pos() - presspos).manhattanLength() > 4 ) {
emit startAddresseeDrag();
@@ -321,17 +321,17 @@ void ContactListView::contentsMouseMoveEvent( QMouseEvent *e )
KListView::contentsMouseMoveEvent( e );
}
-bool ContactListView::acceptDrag(QDropEvent *e) const
+bool ContactListView::acceptDrag(TQDropEvent *e) const
{
- return QTextDrag::canDecode(e);
+ return TQTextDrag::canDecode(e);
}
-void ContactListView::itemDropped(QDropEvent *e)
+void ContactListView::itemDropped(TQDropEvent *e)
{
contentsDropEvent(e);
}
-void ContactListView::contentsDropEvent( QDropEvent *e )
+void ContactListView::contentsDropEvent( TQDropEvent *e )
{
emit addresseeDropped(e);
}
@@ -346,11 +346,11 @@ void ContactListView::setAlternateBackgroundEnabled(bool enabled)
}
else
{
- setAlternateBackground(QColor());
+ setAlternateBackground(TQColor());
}
}
-void ContactListView::setBackgroundPixmap(const QString &filename)
+void ContactListView::setBackgroundPixmap(const TQString &filename)
{
if (filename.isEmpty())
{
@@ -358,7 +358,7 @@ void ContactListView::setBackgroundPixmap(const QString &filename)
}
else
{
- setPaletteBackgroundPixmap(QPixmap(filename));
+ setPaletteBackgroundPixmap(TQPixmap(filename));
}
}
diff --git a/kaddressbook/views/contactlistview.h b/kaddressbook/views/contactlistview.h
index c018e4c2b..ff09dbe35 100644
--- a/kaddressbook/views/contactlistview.h
+++ b/kaddressbook/views/contactlistview.h
@@ -24,10 +24,10 @@
#ifndef CONTACTLISTVIEW_H
#define CONTACTLISTVIEW_H
-#include <qcolor.h>
-#include <qpixmap.h>
-#include <qtooltip.h>
-#include <qstring.h>
+#include <tqcolor.h>
+#include <tqpixmap.h>
+#include <tqtooltip.h>
+#include <tqstring.h>
#include <klistview.h>
@@ -47,7 +47,7 @@ class DynamicTip : public QToolTip
DynamicTip( ContactListView * parent );
protected:
- void maybeTip( const QPoint & );
+ void maybeTip( const TQPoint & );
private:
};
@@ -61,12 +61,12 @@ public:
const KABC::Addressee &addressee() const { return mAddressee; }
virtual void refresh();
virtual ContactListView* parent();
- virtual QString key ( int, bool ) const;
+ virtual TQString key ( int, bool ) const;
void setHasIM( bool hasIM );
/** Adds the border around the cell if the user wants it.
* This is how the single line config option is implemented.
*/
- virtual void paintCell(QPainter * p, const QColorGroup & cg,
+ virtual void paintCell(TQPainter * p, const TQColorGroup & cg,
int column, int width, int align );
private:
@@ -89,7 +89,7 @@ class ContactListView : public KListView
public:
ContactListView(KAddressBookTableView *view,
KABC::AddressBook *doc,
- QWidget *parent,
+ TQWidget *parent,
const char *name = 0L );
virtual ~ContactListView() {}
//void resort();
@@ -105,13 +105,13 @@ public:
bool singleLine() const { return mSingleLine; }
void setSingleLineEnabled(bool enabled) { mSingleLine = enabled; }
- const QColor &alternateColor() const { return mAlternateColor; }
+ const TQColor &alternateColor() const { return mAlternateColor; }
/** Sets the background pixmap to <i>filename</i>. If the
- * QString is empty (QString::isEmpty()), then the background
+ * TQString is empty (TQString::isEmpty()), then the background
* pixmap will be disabled.
*/
- void setBackgroundPixmap(const QString &filename);
+ void setBackgroundPixmap(const TQString &filename);
/**
* Sets whether instant messaging presence should be shown in the first column
@@ -140,20 +140,20 @@ protected:
/** Paints the background pixmap in the empty area. This method is needed
* since Qt::FixedPixmap will not scroll with the list view.
*/
- virtual void paintEmptyArea( QPainter * p, const QRect & rect );
- virtual void contentsMousePressEvent(QMouseEvent*);
- void contentsMouseMoveEvent( QMouseEvent *e );
- void contentsDropEvent( QDropEvent *e );
- virtual bool acceptDrag(QDropEvent *e) const;
+ virtual void paintEmptyArea( TQPainter * p, const TQRect & rect );
+ virtual void contentsMousePressEvent(TQMouseEvent*);
+ void contentsMouseMoveEvent( TQMouseEvent *e );
+ void contentsDropEvent( TQDropEvent *e );
+ virtual bool acceptDrag(TQDropEvent *e) const;
protected slots:
- void itemDropped(QDropEvent *e);
+ void itemDropped(TQDropEvent *e);
public slots:
signals:
void startAddresseeDrag();
- void addresseeDropped(QDropEvent *);
+ void addresseeDropped(TQDropEvent *);
private:
KAddressBookTableView *pabWidget;
@@ -166,9 +166,9 @@ private:
bool mToolTips;
bool mShowIM;
- QColor mAlternateColor;
+ TQColor mAlternateColor;
- QPoint presspos;
+ TQPoint presspos;
int mInstantMsgColumn;
};
diff --git a/kaddressbook/views/kaddressbookcardview.cpp b/kaddressbook/views/kaddressbookcardview.cpp
index d65c4d71f..7ba89a0ed 100644
--- a/kaddressbook/views/kaddressbookcardview.cpp
+++ b/kaddressbook/views/kaddressbookcardview.cpp
@@ -21,12 +21,12 @@
without including the source code for Qt in the source distribution.
*/
-#include <qapplication.h>
-#include <qdragobject.h>
-#include <qevent.h>
-#include <qiconview.h>
-#include <qlayout.h>
-#include <qstringlist.h>
+#include <tqapplication.h>
+#include <tqdragobject.h>
+#include <tqevent.h>
+#include <tqiconview.h>
+#include <tqlayout.h>
+#include <tqstringlist.h>
#include <kabc/addressbook.h>
#include <kabc/addressee.h>
@@ -43,16 +43,16 @@
class CardViewFactory : public ViewFactory
{
public:
- KAddressBookView *view( KAB::Core *core, QWidget *parent, const char *name )
+ KAddressBookView *view( KAB::Core *core, TQWidget *parent, const char *name )
{
return new KAddressBookCardView( core, parent, name );
}
- QString type() const { return I18N_NOOP("Card"); }
+ TQString type() const { return I18N_NOOP("Card"); }
- QString description() const { return i18n( "Rolodex style cards represent contacts." ); }
+ TQString description() const { return i18n( "Rolodex style cards represent contacts." ); }
- ViewConfigureWidget *configureWidget( KABC::AddressBook *ab, QWidget *parent,
+ ViewConfigureWidget *configureWidget( KABC::AddressBook *ab, TQWidget *parent,
const char *name = 0 )
{
return new ConfigureCardViewWidget( ab, parent, name );
@@ -116,7 +116,7 @@ class AddresseeCardViewItem : public CardViewItem
};
-AddresseeCardView::AddresseeCardView( QWidget *parent, const char *name )
+AddresseeCardView::AddresseeCardView( TQWidget *parent, const char *name )
: CardView( parent, name )
{
setAcceptDrops( true );
@@ -126,13 +126,13 @@ AddresseeCardView::~AddresseeCardView()
{
}
-void AddresseeCardView::dragEnterEvent( QDragEnterEvent *event )
+void AddresseeCardView::dragEnterEvent( TQDragEnterEvent *event )
{
- if ( QTextDrag::canDecode( event ) )
+ if ( TQTextDrag::canDecode( event ) )
event->accept();
}
-void AddresseeCardView::dropEvent( QDropEvent *event )
+void AddresseeCardView::dropEvent( TQDropEvent *event )
{
emit addresseeDropped( event );
}
@@ -144,28 +144,28 @@ void AddresseeCardView::startDrag()
KAddressBookCardView::KAddressBookCardView( KAB::Core *core,
- QWidget *parent, const char *name )
+ TQWidget *parent, const char *name )
: KAddressBookView( core, parent, name )
{
mShowEmptyFields = false;
- QVBoxLayout *layout = new QVBoxLayout( viewWidget() );
+ TQVBoxLayout *layout = new TQVBoxLayout( viewWidget() );
mCardView = new AddresseeCardView( viewWidget(), "mCardView" );
mCardView->setSelectionMode( CardView::Extended );
layout->addWidget( mCardView );
// Connect up the signals
- connect( mCardView, SIGNAL( executed( CardViewItem* ) ),
- this, SLOT( addresseeExecuted( CardViewItem* ) ) );
- connect( mCardView, SIGNAL( selectionChanged() ),
- this, SLOT( addresseeSelected() ) );
- connect( mCardView, SIGNAL( addresseeDropped( QDropEvent* ) ),
- this, SIGNAL( dropped( QDropEvent* ) ) );
- connect( mCardView, SIGNAL( startAddresseeDrag() ),
- this, SIGNAL( startDrag() ) );
- connect( mCardView, SIGNAL( contextMenuRequested( CardViewItem*, const QPoint& ) ),
- this, SLOT( rmbClicked( CardViewItem*, const QPoint& ) ) );
+ connect( mCardView, TQT_SIGNAL( executed( CardViewItem* ) ),
+ this, TQT_SLOT( addresseeExecuted( CardViewItem* ) ) );
+ connect( mCardView, TQT_SIGNAL( selectionChanged() ),
+ this, TQT_SLOT( addresseeSelected() ) );
+ connect( mCardView, TQT_SIGNAL( addresseeDropped( TQDropEvent* ) ),
+ this, TQT_SIGNAL( dropped( TQDropEvent* ) ) );
+ connect( mCardView, TQT_SIGNAL( startAddresseeDrag() ),
+ this, TQT_SIGNAL( startDrag() ) );
+ connect( mCardView, TQT_SIGNAL( contextMenuRequested( CardViewItem*, const TQPoint& ) ),
+ this, TQT_SLOT( rmbClicked( CardViewItem*, const TQPoint& ) ) );
}
KAddressBookCardView::~KAddressBookCardView()
@@ -184,19 +184,19 @@ void KAddressBookCardView::readConfig( KConfig *config )
// costum colors?
if ( config->readBoolEntry( "EnableCustomColors", false ) ) {
- QPalette p( mCardView->palette() );
- QColor c = p.color( QPalette::Normal, QColorGroup::Base );
- p.setColor( QPalette::Normal, QColorGroup::Base, config->readColorEntry( "BackgroundColor", &c ) );
- c = p.color( QPalette::Normal, QColorGroup::Text );
- p.setColor( QPalette::Normal, QColorGroup::Text, config->readColorEntry( "TextColor", &c ) );
- c = p.color( QPalette::Normal, QColorGroup::Button );
- p.setColor( QPalette::Normal, QColorGroup::Button, config->readColorEntry( "HeaderColor", &c ) );
- c = p.color( QPalette::Normal, QColorGroup::ButtonText );
- p.setColor( QPalette::Normal, QColorGroup::ButtonText, config->readColorEntry( "HeaderTextColor", &c ) );
- c = p.color( QPalette::Normal, QColorGroup::Highlight );
- p.setColor( QPalette::Normal, QColorGroup::Highlight, config->readColorEntry( "HighlightColor", &c ) );
- c = p.color( QPalette::Normal, QColorGroup::HighlightedText );
- p.setColor( QPalette::Normal, QColorGroup::HighlightedText, config->readColorEntry( "HighlightedTextColor", &c ) );
+ TQPalette p( mCardView->palette() );
+ TQColor c = p.color( TQPalette::Normal, TQColorGroup::Base );
+ p.setColor( TQPalette::Normal, TQColorGroup::Base, config->readColorEntry( "BackgroundColor", &c ) );
+ c = p.color( TQPalette::Normal, TQColorGroup::Text );
+ p.setColor( TQPalette::Normal, TQColorGroup::Text, config->readColorEntry( "TextColor", &c ) );
+ c = p.color( TQPalette::Normal, TQColorGroup::Button );
+ p.setColor( TQPalette::Normal, TQColorGroup::Button, config->readColorEntry( "HeaderColor", &c ) );
+ c = p.color( TQPalette::Normal, TQColorGroup::ButtonText );
+ p.setColor( TQPalette::Normal, TQColorGroup::ButtonText, config->readColorEntry( "HeaderTextColor", &c ) );
+ c = p.color( TQPalette::Normal, TQColorGroup::Highlight );
+ p.setColor( TQPalette::Normal, TQColorGroup::Highlight, config->readColorEntry( "HighlightColor", &c ) );
+ c = p.color( TQPalette::Normal, TQColorGroup::HighlightedText );
+ p.setColor( TQPalette::Normal, TQColorGroup::HighlightedText, config->readColorEntry( "HighlightedTextColor", &c ) );
mCardView->viewport()->setPalette( p );
} else {
// needed if turned off during a session.
@@ -204,7 +204,7 @@ void KAddressBookCardView::readConfig( KConfig *config )
}
//custom fonts?
- QFont f( font() );
+ TQFont f( font() );
if ( config->readBoolEntry( "EnableCustomFonts", false ) ) {
mCardView->setFont( config->readFontEntry( "TextFont", &f ) );
f.setBold( true );
@@ -227,15 +227,15 @@ void KAddressBookCardView::readConfig( KConfig *config )
mCardView->setItemSpacing( config->readNumEntry( "ItemSpacing", 10 ) );
mCardView->setSeparatorWidth( config->readNumEntry( "SeparatorWidth", 2 ) );
- disconnect( mCardView, SIGNAL( executed( CardViewItem* ) ),
- this, SLOT( addresseeExecuted( CardViewItem* ) ) );
+ disconnect( mCardView, TQT_SIGNAL( executed( CardViewItem* ) ),
+ this, TQT_SLOT( addresseeExecuted( CardViewItem* ) ) );
if ( KABPrefs::instance()->honorSingleClick() )
- connect( mCardView, SIGNAL( executed( CardViewItem* ) ),
- this, SLOT( addresseeExecuted( CardViewItem* ) ) );
+ connect( mCardView, TQT_SIGNAL( executed( CardViewItem* ) ),
+ this, TQT_SLOT( addresseeExecuted( CardViewItem* ) ) );
else
- connect( mCardView, SIGNAL( doubleClicked( CardViewItem* ) ),
- this, SLOT( addresseeExecuted( CardViewItem* ) ) );
+ connect( mCardView, TQT_SIGNAL( doubleClicked( CardViewItem* ) ),
+ this, TQT_SLOT( addresseeExecuted( CardViewItem* ) ) );
}
void KAddressBookCardView::writeConfig( KConfig *config )
@@ -244,9 +244,9 @@ void KAddressBookCardView::writeConfig( KConfig *config )
KAddressBookView::writeConfig( config );
}
-QStringList KAddressBookCardView::selectedUids()
+TQStringList KAddressBookCardView::selectedUids()
{
- QStringList uidList;
+ TQStringList uidList;
CardViewItem *item;
AddresseeCardViewItem *aItem;
@@ -261,7 +261,7 @@ QStringList KAddressBookCardView::selectedUids()
return uidList;
}
-void KAddressBookCardView::refresh( const QString &uid )
+void KAddressBookCardView::refresh( const TQString &uid )
{
CardViewItem *item;
AddresseeCardViewItem *aItem;
@@ -282,7 +282,7 @@ void KAddressBookCardView::refresh( const QString &uid )
mCardView->viewport()->update();
// by default nothing is selected
- emit selected( QString::null );
+ emit selected( TQString::null );
} else {
// Try to find the one to refresh
bool found = false;
@@ -296,7 +296,7 @@ void KAddressBookCardView::refresh( const QString &uid )
}
}
-void KAddressBookCardView::setSelected( const QString &uid, bool selected )
+void KAddressBookCardView::setSelected( const TQString &uid, bool selected )
{
CardViewItem *item;
AddresseeCardViewItem *aItem;
@@ -349,22 +349,22 @@ void KAddressBookCardView::addresseeSelected()
}
if ( !found )
- emit selected( QString::null );
+ emit selected( TQString::null );
}
-void KAddressBookCardView::rmbClicked( CardViewItem*, const QPoint &point )
+void KAddressBookCardView::rmbClicked( CardViewItem*, const TQPoint &point )
{
popup( point );
}
void KAddressBookCardView::scrollUp()
{
- QApplication::postEvent( mCardView, new QKeyEvent( QEvent::KeyPress, Qt::Key_Up, 0, 0 ) );
+ TQApplication::postEvent( mCardView, new TQKeyEvent( TQEvent::KeyPress, Qt::Key_Up, 0, 0 ) );
}
void KAddressBookCardView::scrollDown()
{
- QApplication::postEvent( mCardView, new QKeyEvent( QEvent::KeyPress, Qt::Key_Down, 0, 0 ) );
+ TQApplication::postEvent( mCardView, new TQKeyEvent( TQEvent::KeyPress, Qt::Key_Down, 0, 0 ) );
}
#include "kaddressbookcardview.moc"
diff --git a/kaddressbook/views/kaddressbookcardview.h b/kaddressbook/views/kaddressbookcardview.h
index 68e2a13f3..de0120a09 100644
--- a/kaddressbook/views/kaddressbookcardview.h
+++ b/kaddressbook/views/kaddressbookcardview.h
@@ -24,7 +24,7 @@
without including the source code for Qt in the source distribution.
*/
-#include <qstring.h>
+#include <tqstring.h>
#include <kiconview.h>
#include "cardview.h"
@@ -45,12 +45,12 @@ class KAddressBookCardView : public KAddressBookView
Q_OBJECT
public:
- KAddressBookCardView( KAB::Core *core, QWidget *parent,
+ KAddressBookCardView( KAB::Core *core, TQWidget *parent,
const char *name = 0 );
virtual ~KAddressBookCardView();
- virtual QStringList selectedUids();
- virtual QString type() const { return "Card"; }
+ virtual TQStringList selectedUids();
+ virtual TQString type() const { return "Card"; }
virtual KABC::Field *sortField() const;
virtual void readConfig( KConfig *config );
@@ -60,14 +60,14 @@ class KAddressBookCardView : public KAddressBookView
void scrollDown();
public slots:
- void refresh( const QString &uid = QString() );
- void setSelected( const QString &uid = QString(), bool selected = true );
+ void refresh( const TQString &uid = TQString() );
+ void setSelected( const TQString &uid = TQString(), bool selected = true );
virtual void setFirstSelected( bool selected = true );
protected slots:
void addresseeExecuted( CardViewItem* );
void addresseeSelected();
- void rmbClicked( CardViewItem*, const QPoint& );
+ void rmbClicked( CardViewItem*, const TQPoint& );
private:
AddresseeCardView *mCardView;
@@ -78,16 +78,16 @@ class AddresseeCardView : public CardView
{
Q_OBJECT
public:
- AddresseeCardView( QWidget *parent, const char *name = 0 );
+ AddresseeCardView( TQWidget *parent, const char *name = 0 );
~AddresseeCardView();
signals:
void startAddresseeDrag();
- void addresseeDropped( QDropEvent* );
+ void addresseeDropped( TQDropEvent* );
protected:
- virtual void dragEnterEvent( QDragEnterEvent* );
- virtual void dropEvent( QDropEvent* );
+ virtual void dragEnterEvent( TQDragEnterEvent* );
+ virtual void dropEvent( TQDropEvent* );
virtual void startDrag();
};
diff --git a/kaddressbook/views/kaddressbookiconview.cpp b/kaddressbook/views/kaddressbookiconview.cpp
index b5d706cad..6d02acf73 100644
--- a/kaddressbook/views/kaddressbookiconview.cpp
+++ b/kaddressbook/views/kaddressbookiconview.cpp
@@ -21,10 +21,10 @@
without including the source code for Qt in the source distribution.
*/
-#include <qapplication.h>
-#include <qiconview.h>
-#include <qlayout.h>
-#include <qstringlist.h>
+#include <tqapplication.h>
+#include <tqiconview.h>
+#include <tqlayout.h>
+#include <tqstringlist.h>
#include <kabc/addressbook.h>
#include <kabc/addressee.h>
@@ -42,14 +42,14 @@
class IconViewFactory : public ViewFactory
{
public:
- KAddressBookView *view( KAB::Core *core, QWidget *parent, const char *name )
+ KAddressBookView *view( KAB::Core *core, TQWidget *parent, const char *name )
{
return new KAddressBookIconView( core, parent, name );
}
- QString type() const { return I18N_NOOP( "Icon" ); }
+ TQString type() const { return I18N_NOOP( "Icon" ); }
- QString description() const { return i18n( "Icons represent contacts. Very simple view." ); }
+ TQString description() const { return i18n( "Icons represent contacts. Very simple view." ); }
};
extern "C" {
@@ -59,31 +59,31 @@ extern "C" {
}
}
-AddresseeIconView::AddresseeIconView( QWidget *parent, const char *name )
+AddresseeIconView::AddresseeIconView( TQWidget *parent, const char *name )
: KIconView( parent, name )
{
- setSelectionMode( QIconView::Extended );
- setResizeMode( QIconView::Adjust );
+ setSelectionMode( TQIconView::Extended );
+ setResizeMode( TQIconView::Adjust );
setWordWrapIconText( true );
setGridX( 100 );
setItemsMovable( false );
setSorting( true, true );
setMode( KIconView::Select );
- connect( this, SIGNAL( dropped( QDropEvent*, const QValueList<QIconDragItem>& ) ),
- this, SLOT( itemDropped( QDropEvent*, const QValueList<QIconDragItem>& ) ) );
+ connect( this, TQT_SIGNAL( dropped( TQDropEvent*, const TQValueList<TQIconDragItem>& ) ),
+ this, TQT_SLOT( itemDropped( TQDropEvent*, const TQValueList<TQIconDragItem>& ) ) );
}
AddresseeIconView::~AddresseeIconView()
{
}
-void AddresseeIconView::itemDropped( QDropEvent *event, const QValueList<QIconDragItem>& )
+void AddresseeIconView::itemDropped( TQDropEvent *event, const TQValueList<TQIconDragItem>& )
{
emit addresseeDropped( event );
}
-QDragObject *AddresseeIconView::dragObject()
+TQDragObject *AddresseeIconView::dragObject()
{
emit startAddresseeDrag();
@@ -96,7 +96,7 @@ class AddresseeIconViewItem : public KIconViewItem
{
public:
AddresseeIconViewItem( const KABC::Field::List&, KABC::AddressBook *doc,
- const KABC::Addressee &addr, QIconView *parent )
+ const KABC::Addressee &addr, TQIconView *parent )
: KIconViewItem( parent ), mDocument( doc ), mAddressee( addr )
{
refresh();
@@ -111,14 +111,14 @@ class AddresseeIconViewItem : public KIconViewItem
if ( !mAddressee.isEmpty() )
setText( mAddressee.givenName() + " " + mAddressee.familyName() );
- QPixmap icon;
- QPixmap defaultIcon( KGlobal::iconLoader()->loadIcon( "vcard", KIcon::Desktop ) );
+ TQPixmap icon;
+ TQPixmap defaultIcon( KGlobal::iconLoader()->loadIcon( "vcard", KIcon::Desktop ) );
KABC::Picture pic = mAddressee.photo();
if ( pic.data().isNull() )
pic = mAddressee.logo();
if ( pic.isIntern() && !pic.data().isNull() ) {
- QImage img = pic.data();
+ TQImage img = pic.data();
if ( img.width() > img.height() )
icon = img.scaleWidth( 32 );
else
@@ -136,25 +136,25 @@ class AddresseeIconViewItem : public KIconViewItem
KAddressBookIconView::KAddressBookIconView( KAB::Core *core,
- QWidget *parent, const char *name)
+ TQWidget *parent, const char *name)
: KAddressBookView( core, parent, name )
{
- QVBoxLayout *layout = new QVBoxLayout( viewWidget() );
+ TQVBoxLayout *layout = new TQVBoxLayout( viewWidget() );
mIconView = new AddresseeIconView( viewWidget(), "mIconView" );
layout->addWidget( mIconView );
// Connect up the signals
- connect( mIconView, SIGNAL( executed( QIconViewItem* ) ),
- this, SLOT( addresseeExecuted( QIconViewItem* ) ) );
- connect( mIconView, SIGNAL( selectionChanged() ),
- this, SLOT( addresseeSelected() ) );
- connect( mIconView, SIGNAL( addresseeDropped( QDropEvent* ) ),
- this, SIGNAL( dropped( QDropEvent* ) ) );
- connect( mIconView, SIGNAL( startAddresseeDrag() ),
- this, SIGNAL( startDrag() ) );
- connect( mIconView, SIGNAL( contextMenuRequested( QIconViewItem*, const QPoint& ) ),
- this, SLOT( rmbClicked( QIconViewItem*, const QPoint& ) ) );
+ connect( mIconView, TQT_SIGNAL( executed( TQIconViewItem* ) ),
+ this, TQT_SLOT( addresseeExecuted( TQIconViewItem* ) ) );
+ connect( mIconView, TQT_SIGNAL( selectionChanged() ),
+ this, TQT_SLOT( addresseeSelected() ) );
+ connect( mIconView, TQT_SIGNAL( addresseeDropped( TQDropEvent* ) ),
+ this, TQT_SIGNAL( dropped( TQDropEvent* ) ) );
+ connect( mIconView, TQT_SIGNAL( startAddresseeDrag() ),
+ this, TQT_SIGNAL( startDrag() ) );
+ connect( mIconView, TQT_SIGNAL( contextMenuRequested( TQIconViewItem*, const TQPoint& ) ),
+ this, TQT_SLOT( rmbClicked( TQIconViewItem*, const TQPoint& ) ) );
}
KAddressBookIconView::~KAddressBookIconView()
@@ -171,21 +171,21 @@ void KAddressBookIconView::readConfig( KConfig *config )
{
KAddressBookView::readConfig( config );
- disconnect( mIconView, SIGNAL( executed( QIconViewItem* ) ),
- this, SLOT( addresseeExecuted( QIconViewItem* ) ) );
+ disconnect( mIconView, TQT_SIGNAL( executed( TQIconViewItem* ) ),
+ this, TQT_SLOT( addresseeExecuted( TQIconViewItem* ) ) );
if ( KABPrefs::instance()->honorSingleClick() )
- connect( mIconView, SIGNAL( executed( QIconViewItem* ) ),
- this, SLOT( addresseeExecuted( QIconViewItem* ) ) );
+ connect( mIconView, TQT_SIGNAL( executed( TQIconViewItem* ) ),
+ this, TQT_SLOT( addresseeExecuted( TQIconViewItem* ) ) );
else
- connect( mIconView, SIGNAL( doubleClicked( QIconViewItem* ) ),
- this, SLOT( addresseeExecuted( QIconViewItem* ) ) );
+ connect( mIconView, TQT_SIGNAL( doubleClicked( TQIconViewItem* ) ),
+ this, TQT_SLOT( addresseeExecuted( TQIconViewItem* ) ) );
}
-QStringList KAddressBookIconView::selectedUids()
+TQStringList KAddressBookIconView::selectedUids()
{
- QStringList uidList;
- QIconViewItem *item;
+ TQStringList uidList;
+ TQIconViewItem *item;
AddresseeIconViewItem *aItem;
for ( item = mIconView->firstItem(); item; item = item->nextItem() ) {
@@ -199,9 +199,9 @@ QStringList KAddressBookIconView::selectedUids()
return uidList;
}
-void KAddressBookIconView::refresh( const QString &uid )
+void KAddressBookIconView::refresh( const TQString &uid )
{
- QIconViewItem *item;
+ TQIconViewItem *item;
AddresseeIconViewItem *aItem;
if ( uid.isEmpty() ) {
@@ -233,13 +233,13 @@ void KAddressBookIconView::refresh( const QString &uid )
}
}
- refresh( QString::null );
+ refresh( TQString::null );
}
}
-void KAddressBookIconView::setSelected( const QString &uid, bool selected )
+void KAddressBookIconView::setSelected( const TQString &uid, bool selected )
{
- QIconViewItem *item;
+ TQIconViewItem *item;
AddresseeIconViewItem *aItem;
if ( uid.isEmpty() ) {
@@ -266,7 +266,7 @@ void KAddressBookIconView::setFirstSelected( bool selected )
}
}
-void KAddressBookIconView::addresseeExecuted( QIconViewItem *item )
+void KAddressBookIconView::addresseeExecuted( TQIconViewItem *item )
{
AddresseeIconViewItem *aItem = dynamic_cast<AddresseeIconViewItem*>( item );
@@ -276,7 +276,7 @@ void KAddressBookIconView::addresseeExecuted( QIconViewItem *item )
void KAddressBookIconView::addresseeSelected()
{
- QIconViewItem *item;
+ TQIconViewItem *item;
AddresseeIconViewItem *aItem;
bool found = false;
@@ -291,22 +291,22 @@ void KAddressBookIconView::addresseeSelected()
}
if ( !found )
- emit selected( QString::null );
+ emit selected( TQString::null );
}
-void KAddressBookIconView::rmbClicked( QIconViewItem*, const QPoint &point )
+void KAddressBookIconView::rmbClicked( TQIconViewItem*, const TQPoint &point )
{
popup( point );
}
void KAddressBookIconView::scrollUp()
{
- QApplication::postEvent( mIconView, new QKeyEvent( QEvent::KeyPress, Qt::Key_Up, 0, 0 ) );
+ TQApplication::postEvent( mIconView, new TQKeyEvent( TQEvent::KeyPress, Qt::Key_Up, 0, 0 ) );
}
void KAddressBookIconView::scrollDown()
{
- QApplication::postEvent( mIconView, new QKeyEvent( QEvent::KeyPress, Qt::Key_Down, 0, 0 ) );
+ TQApplication::postEvent( mIconView, new TQKeyEvent( TQEvent::KeyPress, Qt::Key_Down, 0, 0 ) );
}
#include "kaddressbookiconview.moc"
diff --git a/kaddressbook/views/kaddressbookiconview.h b/kaddressbook/views/kaddressbookiconview.h
index f11e7b8a1..21d9bac8e 100644
--- a/kaddressbook/views/kaddressbookiconview.h
+++ b/kaddressbook/views/kaddressbookiconview.h
@@ -24,7 +24,7 @@
#ifndef KADDRESSBOOKICONVIEW_H
#define KADDRESSBOOKICONVIEW_H
-#include <qstring.h>
+#include <tqstring.h>
#include <kiconview.h>
#include "kaddressbookview.h"
@@ -44,12 +44,12 @@ class KAddressBookIconView : public KAddressBookView
Q_OBJECT
public:
- KAddressBookIconView( KAB::Core *core, QWidget *parent,
+ KAddressBookIconView( KAB::Core *core, TQWidget *parent,
const char *name = 0 );
virtual ~KAddressBookIconView();
- virtual QStringList selectedUids();
- virtual QString type() const { return "Icon"; }
+ virtual TQStringList selectedUids();
+ virtual TQString type() const { return "Icon"; }
virtual KABC::Field *sortField() const;
virtual void readConfig( KConfig *config );
@@ -57,18 +57,18 @@ class KAddressBookIconView : public KAddressBookView
void scrollDown();
public slots:
- void refresh( const QString &uid = QString() );
- void setSelected( const QString &uid = QString(), bool selected = true );
+ void refresh( const TQString &uid = TQString() );
+ void setSelected( const TQString &uid = TQString(), bool selected = true );
virtual void setFirstSelected( bool selected = true );
protected slots:
- void addresseeExecuted( QIconViewItem *item );
+ void addresseeExecuted( TQIconViewItem *item );
void addresseeSelected();
- void rmbClicked( QIconViewItem*, const QPoint& );
+ void rmbClicked( TQIconViewItem*, const TQPoint& );
private:
AddresseeIconView *mIconView;
- QPtrList<AddresseeIconViewItem> mIconList;
+ TQPtrList<AddresseeIconViewItem> mIconList;
};
@@ -77,17 +77,17 @@ class AddresseeIconView : public KIconView
Q_OBJECT
public:
- AddresseeIconView( QWidget *parent, const char *name = 0 );
+ AddresseeIconView( TQWidget *parent, const char *name = 0 );
~AddresseeIconView();
signals:
- void addresseeDropped( QDropEvent* );
+ void addresseeDropped( TQDropEvent* );
void startAddresseeDrag();
protected:
- virtual QDragObject *dragObject();
+ virtual TQDragObject *dragObject();
protected slots:
- void itemDropped( QDropEvent*, const QValueList<QIconDragItem>& );
+ void itemDropped( TQDropEvent*, const TQValueList<TQIconDragItem>& );
};
#endif
diff --git a/kaddressbook/views/kaddressbooktableview.cpp b/kaddressbook/views/kaddressbooktableview.cpp
index e0ac61093..7f822ae4d 100644
--- a/kaddressbook/views/kaddressbooktableview.cpp
+++ b/kaddressbook/views/kaddressbooktableview.cpp
@@ -21,20 +21,20 @@
without including the source code for Qt in the source distribution.
*/
-#include <qapplication.h>
-#include <qlayout.h>
-#include <qheader.h>
-#include <qvbox.h>
-#include <qlistbox.h>
-#include <qwidget.h>
-#include <qfile.h>
-#include <qimage.h>
-#include <qcombobox.h>
-#include <qapplication.h>
-#include <qdragobject.h>
-#include <qevent.h>
-#include <qurl.h>
-#include <qpixmap.h>
+#include <tqapplication.h>
+#include <tqlayout.h>
+#include <tqheader.h>
+#include <tqvbox.h>
+#include <tqlistbox.h>
+#include <tqwidget.h>
+#include <tqfile.h>
+#include <tqimage.h>
+#include <tqcombobox.h>
+#include <tqapplication.h>
+#include <tqdragobject.h>
+#include <tqevent.h>
+#include <tqurl.h>
+#include <tqpixmap.h>
#include <kabc/addressbook.h>
#include <kapplication.h>
@@ -61,17 +61,17 @@
class TableViewFactory : public ViewFactory
{
public:
- KAddressBookView *view( KAB::Core *core, QWidget *parent, const char *name )
+ KAddressBookView *view( KAB::Core *core, TQWidget *parent, const char *name )
{
return new KAddressBookTableView( core, parent, name );
}
- QString type() const { return I18N_NOOP( "Table" ); }
+ TQString type() const { return I18N_NOOP( "Table" ); }
- QString description() const { return i18n( "A listing of contacts in a table. Each cell of "
+ TQString description() const { return i18n( "A listing of contacts in a table. Each cell of "
"the table holds a field of the contact." ); }
- ViewConfigureWidget *configureWidget( KABC::AddressBook *ab, QWidget *parent,
+ ViewConfigureWidget *configureWidget( KABC::AddressBook *ab, TQWidget *parent,
const char *name = 0 )
{
return new ConfigureTableViewWidget( ab, parent, name );
@@ -86,10 +86,10 @@ extern "C" {
}
KAddressBookTableView::KAddressBookTableView( KAB::Core *core,
- QWidget *parent, const char *name )
+ TQWidget *parent, const char *name )
: KAddressBookView( core, parent, name )
{
- mMainLayout = new QVBoxLayout( viewWidget(), 2 );
+ mMainLayout = new TQVBoxLayout( viewWidget(), 2 );
// The list view will be created when the config is read.
mListView = 0;
@@ -103,16 +103,16 @@ KAddressBookTableView::~KAddressBookTableView()
void KAddressBookTableView::reconstructListView()
{
if ( mListView ) {
- disconnect( mListView, SIGNAL( selectionChanged() ),
- this, SLOT( addresseeSelected() ) );
- disconnect( mListView, SIGNAL( executed( QListViewItem* ) ),
- this, SLOT( addresseeExecuted( QListViewItem* ) ) );
- disconnect( mListView, SIGNAL( doubleClicked( QListViewItem* ) ),
- this, SLOT( addresseeExecuted( QListViewItem* ) ) );
- disconnect( mListView, SIGNAL( startAddresseeDrag() ),
- this, SIGNAL( startDrag() ) );
- disconnect( mListView, SIGNAL( addresseeDropped( QDropEvent* ) ),
- this, SIGNAL( dropped( QDropEvent* ) ) );
+ disconnect( mListView, TQT_SIGNAL( selectionChanged() ),
+ this, TQT_SLOT( addresseeSelected() ) );
+ disconnect( mListView, TQT_SIGNAL( executed( TQListViewItem* ) ),
+ this, TQT_SLOT( addresseeExecuted( TQListViewItem* ) ) );
+ disconnect( mListView, TQT_SIGNAL( doubleClicked( TQListViewItem* ) ),
+ this, TQT_SLOT( addresseeExecuted( TQListViewItem* ) ) );
+ disconnect( mListView, TQT_SIGNAL( startAddresseeDrag() ),
+ this, TQT_SIGNAL( startDrag() ) );
+ disconnect( mListView, TQT_SIGNAL( addresseeDropped( TQDropEvent* ) ),
+ this, TQT_SIGNAL( dropped( TQDropEvent* ) ) );
delete mListView;
}
@@ -127,7 +127,7 @@ void KAddressBookTableView::reconstructListView()
int c = 0;
for ( it = fieldList.begin(); it != fieldList.end(); ++it ) {
mListView->addColumn( (*it)->label() );
- mListView->setColumnWidthMode( c++, QListView::Manual );
+ mListView->setColumnWidthMode( c++, TQListView::Manual );
}
if ( mListView->showIM() ) {
@@ -141,23 +141,23 @@ void KAddressBookTableView::reconstructListView()
mListView->setFullWidth( true );
- connect( mListView, SIGNAL( selectionChanged() ),
- this, SLOT( addresseeSelected() ) );
- connect( mListView, SIGNAL( startAddresseeDrag() ),
- this, SIGNAL( startDrag() ) );
- connect( mListView, SIGNAL( addresseeDropped( QDropEvent* ) ),
- this, SIGNAL( dropped( QDropEvent* ) ) );
- connect( mListView, SIGNAL( contextMenu( KListView*, QListViewItem*, const QPoint& ) ),
- this, SLOT( rmbClicked( KListView*, QListViewItem*, const QPoint& ) ) );
- connect( mListView->header(), SIGNAL( clicked( int ) ),
- this, SIGNAL( sortFieldChanged() ) );
+ connect( mListView, TQT_SIGNAL( selectionChanged() ),
+ this, TQT_SLOT( addresseeSelected() ) );
+ connect( mListView, TQT_SIGNAL( startAddresseeDrag() ),
+ this, TQT_SIGNAL( startDrag() ) );
+ connect( mListView, TQT_SIGNAL( addresseeDropped( TQDropEvent* ) ),
+ this, TQT_SIGNAL( dropped( TQDropEvent* ) ) );
+ connect( mListView, TQT_SIGNAL( contextMenu( KListView*, TQListViewItem*, const TQPoint& ) ),
+ this, TQT_SLOT( rmbClicked( KListView*, TQListViewItem*, const TQPoint& ) ) );
+ connect( mListView->header(), TQT_SIGNAL( clicked( int ) ),
+ this, TQT_SIGNAL( sortFieldChanged() ) );
if ( KABPrefs::instance()->honorSingleClick() )
- connect( mListView, SIGNAL( executed( QListViewItem* ) ),
- this, SLOT( addresseeExecuted( QListViewItem* ) ) );
+ connect( mListView, TQT_SIGNAL( executed( TQListViewItem* ) ),
+ this, TQT_SLOT( addresseeExecuted( TQListViewItem* ) ) );
else
- connect( mListView, SIGNAL( doubleClicked( QListViewItem* ) ),
- this, SLOT( addresseeExecuted( QListViewItem* ) ) );
+ connect( mListView, TQT_SIGNAL( doubleClicked( TQListViewItem* ) ),
+ this, TQT_SLOT( addresseeExecuted( TQListViewItem* ) ) );
refresh();
@@ -187,13 +187,13 @@ void KAddressBookTableView::readConfig( KConfig *config )
if ( config->readBoolEntry( "InstantMessagingPresence", false ) ) {
if ( !mIMProxy ) {
mIMProxy = KIMProxy::instance( kapp->dcopClient() );
- connect( mIMProxy, SIGNAL( sigContactPresenceChanged( const QString& ) ),
- this, SLOT( updatePresence( const QString& ) ) );
+ connect( mIMProxy, TQT_SIGNAL( sigContactPresenceChanged( const TQString& ) ),
+ this, TQT_SLOT( updatePresence( const TQString& ) ) );
}
} else {
if ( mIMProxy ) {
- disconnect( mIMProxy, SIGNAL( sigContactPresenceChanged( const QString& ) ),
- this, SLOT( updatePresence( const QString& ) ) );
+ disconnect( mIMProxy, TQT_SIGNAL( sigContactPresenceChanged( const TQString& ) ),
+ this, TQT_SLOT( updatePresence( const TQString& ) ) );
mIMProxy = 0;
}
}
@@ -214,11 +214,11 @@ void KAddressBookTableView::readConfig( KConfig *config )
mListView->restoreLayout( config, config->group() );
}
-void KAddressBookTableView::refresh( const QString &uid )
+void KAddressBookTableView::refresh( const TQString &uid )
{
if ( uid.isEmpty() ) {
// Clear the list view
- QString currentUID, nextUID;
+ TQString currentUID, nextUID;
ContactListViewItem *currentItem = dynamic_cast<ContactListViewItem*>( mListView->currentItem() );
if ( currentItem ) {
ContactListViewItem *nextItem = dynamic_cast<ContactListViewItem*>( currentItem->itemBelow() );
@@ -253,8 +253,8 @@ void KAddressBookTableView::refresh( const QString &uid )
} else {
// Only need to update on entry. Iterate through and try to find it
ContactListViewItem *ceItem;
- QPtrList<QListViewItem> selectedItems( mListView->selectedItems() );
- QListViewItem *it;
+ TQPtrList<TQListViewItem> selectedItems( mListView->selectedItems() );
+ TQListViewItem *it;
for ( it = selectedItems.first(); it; it = selectedItems.next() ) {
ceItem = dynamic_cast<ContactListViewItem*>( it );
if ( ceItem && ceItem->addressee().uid() == uid ) {
@@ -262,16 +262,16 @@ void KAddressBookTableView::refresh( const QString &uid )
return;
}
}
- refresh( QString::null );
+ refresh( TQString::null );
}
}
-QStringList KAddressBookTableView::selectedUids()
+TQStringList KAddressBookTableView::selectedUids()
{
- QStringList uidList;
+ TQStringList uidList;
ContactListViewItem *item;
- QListViewItemIterator it( mListView, QListViewItemIterator::Selected );
+ TQListViewItemIterator it( mListView, TQListViewItemIterator::Selected );
while ( it.current() ) {
item = dynamic_cast<ContactListViewItem*>( it.current() );
if ( item )
@@ -283,12 +283,12 @@ QStringList KAddressBookTableView::selectedUids()
return uidList;
}
-void KAddressBookTableView::setSelected( const QString &uid, bool selected )
+void KAddressBookTableView::setSelected( const TQString &uid, bool selected )
{
if ( uid.isEmpty() )
mListView->selectAll( selected );
else {
- QListViewItemIterator it( mListView );
+ TQListViewItemIterator it( mListView );
while ( it.current() ) {
ContactListViewItem *item = dynamic_cast<ContactListViewItem*>( it.current() );
if ( item && (item->addressee().uid() == uid) ) {
@@ -314,12 +314,12 @@ void KAddressBookTableView::setFirstSelected( bool selected )
void KAddressBookTableView::addresseeSelected()
{
// We need to try to find the first selected item. This might not be the
- // last selected item, but when QListView is in multiselection mode,
+ // last selected item, but when TQListView is in multiselection mode,
// there is no way to figure out which one was
// selected last.
bool found =false;
- QListViewItemIterator it( mListView, QListViewItemIterator::Selected );
+ TQListViewItemIterator it( mListView, TQListViewItemIterator::Selected );
while ( it.current() && !found ) {
found = true;
ContactListViewItem *item = dynamic_cast<ContactListViewItem*>( it.current() );
@@ -330,10 +330,10 @@ void KAddressBookTableView::addresseeSelected()
}
if ( !found )
- emit selected( QString::null );
+ emit selected( TQString::null );
}
-void KAddressBookTableView::addresseeExecuted( QListViewItem *item )
+void KAddressBookTableView::addresseeExecuted( TQListViewItem *item )
{
if ( item ) {
ContactListViewItem *ceItem = dynamic_cast<ContactListViewItem*>( item );
@@ -341,21 +341,21 @@ void KAddressBookTableView::addresseeExecuted( QListViewItem *item )
if ( ceItem )
emit executed( ceItem->addressee().uid() );
else
- emit executed( QString::null );
+ emit executed( TQString::null );
} else {
- emit executed( QString::null );
+ emit executed( TQString::null );
}
}
-void KAddressBookTableView::rmbClicked( KListView*, QListViewItem*, const QPoint &point )
+void KAddressBookTableView::rmbClicked( KListView*, TQListViewItem*, const TQPoint &point )
{
popup( point );
}
-void KAddressBookTableView::updatePresence( const QString &uid )
+void KAddressBookTableView::updatePresence( const TQString &uid )
{
// find the LVI to update and refresh() it
- QListViewItem *item;
+ TQListViewItem *item;
ContactListViewItem *ceItem;
for ( item = mListView->firstChild(); item; item = item->itemBelow() ) {
ceItem = dynamic_cast<ContactListViewItem*>( item );
@@ -372,12 +372,12 @@ void KAddressBookTableView::updatePresence( const QString &uid )
void KAddressBookTableView::scrollUp()
{
- QApplication::postEvent( mListView, new QKeyEvent( QEvent::KeyPress, Qt::Key_Up, 0, 0 ) );
+ TQApplication::postEvent( mListView, new TQKeyEvent( TQEvent::KeyPress, Qt::Key_Up, 0, 0 ) );
}
void KAddressBookTableView::scrollDown()
{
- QApplication::postEvent( mListView, new QKeyEvent( QEvent::KeyPress, Qt::Key_Down, 0, 0 ) );
+ TQApplication::postEvent( mListView, new TQKeyEvent( TQEvent::KeyPress, Qt::Key_Down, 0, 0 ) );
}
diff --git a/kaddressbook/views/kaddressbooktableview.h b/kaddressbook/views/kaddressbooktableview.h
index 0d328ce86..ac0515e9e 100644
--- a/kaddressbook/views/kaddressbooktableview.h
+++ b/kaddressbook/views/kaddressbooktableview.h
@@ -28,13 +28,13 @@
#include <config.h>
#endif
-#include <qwidget.h>
-#include <qlistview.h>
-#include <qstring.h>
-#include <qdialog.h>
-#include <qtabdialog.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
+#include <tqwidget.h>
+#include <tqlistview.h>
+#include <tqstring.h>
+#include <tqdialog.h>
+#include <tqtabdialog.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
#include "kaddressbookview.h"
@@ -64,19 +64,19 @@ friend class ContactListView;
Q_OBJECT
public:
- KAddressBookTableView( KAB::Core *core, QWidget *parent,
+ KAddressBookTableView( KAB::Core *core, TQWidget *parent,
const char *name = 0 );
virtual ~KAddressBookTableView();
- virtual void refresh( const QString &uid = QString() );
- virtual QStringList selectedUids();
- virtual void setSelected( const QString &uid = QString(), bool selected = false );
+ virtual void refresh( const TQString &uid = TQString() );
+ virtual TQStringList selectedUids();
+ virtual void setSelected( const TQString &uid = TQString(), bool selected = false );
virtual void setFirstSelected( bool selected = true );
virtual KABC::Field *sortField() const;
virtual void readConfig( KConfig *config );
virtual void writeConfig( KConfig *config );
- virtual QString type() const { return "Table"; }
+ virtual TQString type() const { return "Table"; }
void scrollUp();
void scrollDown();
@@ -94,20 +94,20 @@ friend class ContactListView;
Called whenever the user executes an addressee. In terms of the
list view, this is probably a double click
*/
- void addresseeExecuted( QListViewItem* );
+ void addresseeExecuted( TQListViewItem* );
/**
RBM menu called.
*/
- void rmbClicked( KListView*, QListViewItem*, const QPoint& );
+ void rmbClicked( KListView*, TQListViewItem*, const TQPoint& );
/**
* Called to update the presence of a single item
*/
- void updatePresence( const QString &uid );
+ void updatePresence( const TQString &uid );
private:
- QVBoxLayout *mMainLayout;
+ TQVBoxLayout *mMainLayout;
ContactListView *mListView;
KIMProxy *mIMProxy;
};