summaryrefslogtreecommitdiffstats
path: root/kmail/colorlistbox.cpp
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 /kmail/colorlistbox.cpp
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 'kmail/colorlistbox.cpp')
-rw-r--r--kmail/colorlistbox.cpp42
1 files changed, 21 insertions, 21 deletions
diff --git a/kmail/colorlistbox.cpp b/kmail/colorlistbox.cpp
index 2c6887b3..0e6b3a40 100644
--- a/kmail/colorlistbox.cpp
+++ b/kmail/colorlistbox.cpp
@@ -22,17 +22,17 @@
#include <config.h>
#endif
-#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);
}
@@ -44,7 +44,7 @@ void ColorListBox::setEnabled( bool state )
return;
}
- QListBox::setEnabled( state );
+ TQListBox::setEnabled( state );
for( uint i=0; i<count(); i++ )
{
updateItem( i );
@@ -52,7 +52,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() )
{
@@ -64,7 +64,7 @@ void ColorListBox::setColor( uint index, const QColor &color )
}
-QColor ColorListBox::color( uint index ) const
+TQColor ColorListBox::color( uint index ) const
{
if( index < count() )
{
@@ -87,8 +87,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 );
}
@@ -96,7 +96,7 @@ void ColorListBox::newColor( int index )
}
-void ColorListBox::dragEnterEvent( QDragEnterEvent *e )
+void ColorListBox::dragEnterEvent( TQDragEnterEvent *e )
{
if( KColorDrag::canDecode(e) && isEnabled() )
{
@@ -111,7 +111,7 @@ void ColorListBox::dragEnterEvent( QDragEnterEvent *e )
}
-void ColorListBox::dragLeaveEvent( QDragLeaveEvent * )
+void ColorListBox::dragLeaveEvent( TQDragLeaveEvent * )
{
if( mCurrentOnDragEnter != -1 )
{
@@ -121,7 +121,7 @@ void ColorListBox::dragLeaveEvent( QDragLeaveEvent * )
}
-void ColorListBox::dragMoveEvent( QDragMoveEvent *e )
+void ColorListBox::dragMoveEvent( TQDragMoveEvent *e )
{
if( KColorDrag::canDecode(e) && isEnabled() )
{
@@ -134,9 +134,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();
@@ -152,28 +152,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() );
@@ -184,13 +184,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 );
}