summaryrefslogtreecommitdiffstats
path: root/kaddressbook/views/colorlistbox.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kaddressbook/views/colorlistbox.cpp')
-rw-r--r--kaddressbook/views/colorlistbox.cpp42
1 files changed, 21 insertions, 21 deletions
diff --git a/kaddressbook/views/colorlistbox.cpp b/kaddressbook/views/colorlistbox.cpp
index 37a2ac1f..8043eacd 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 );
}