summaryrefslogtreecommitdiffstats
path: root/korn/boxcontaineritem.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-13 00:46:47 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-13 00:46:47 +0000
commit67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7 (patch)
tree5f52a9eada2e9f3654fc327d7c14dfef570a6ecb /korn/boxcontaineritem.cpp
parent2ee4bf4fd5eff93b2fbef0ff8e8063edffc5da5c (diff)
downloadtdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.tar.gz
tdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.zip
Initial conversion of kdepim to TQt
This will probably require some tweaking before it will build under Qt4, however Qt3 builds are OK. Any alterations this commit makes to kdepim behaviour under Qt3 are unintentional and should be fixed. git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1227832 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'korn/boxcontaineritem.cpp')
-rw-r--r--korn/boxcontaineritem.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/korn/boxcontaineritem.cpp b/korn/boxcontaineritem.cpp
index c4976f232..c357fd4f4 100644
--- a/korn/boxcontaineritem.cpp
+++ b/korn/boxcontaineritem.cpp
@@ -47,8 +47,8 @@
#include <tqtooltip.h>
#include <tqvbox.h>
-BoxContainerItem::BoxContainerItem( TQObject * parent, const char * name )
- : AccountManager( parent, name ),
+BoxContainerItem::BoxContainerItem( TQObject * tqparent, const char * name )
+ : AccountManager( tqparent, name ),
DCOPObject(),
_command( new TQString )
{
@@ -168,14 +168,14 @@ void BoxContainerItem::runCommand( const TQString& cmd )
process->start();
}
-void BoxContainerItem::mouseButtonPressed( Qt::ButtonState state )
+void BoxContainerItem::mouseButtonPressed( TQt::ButtonState state )
{
int button;
- if( state & Qt::LeftButton )
+ if( state & TQt::LeftButton )
button = 0;
- else if( state & Qt::RightButton )
+ else if( state & TQt::RightButton )
button = 2;
- else if( state & Qt::MidButton )
+ else if( state & TQt::MidButton )
button = 1;
else
return; //Invalid mouse button
@@ -211,10 +211,10 @@ void BoxContainerItem::fillKPopupMenu( KPopupMenu* popupMenu, KActionCollection*
KStdAction::aboutApp( this, TQT_SLOT( about() ), actions )->plug( popupMenu );
}
-void BoxContainerItem::showPassivePopup( TQWidget* parent, TQPtrList< KornMailSubject >* list, int total,
+void BoxContainerItem::showPassivePopup( TQWidget* tqparent, TQPtrList< KornMailSubject >* list, int total,
const TQString &accountName, bool date )
{
- KPassivePopup *popup = new KPassivePopup( parent, "Passive popup" );
+ KPassivePopup *popup = new KPassivePopup( tqparent, "Passive popup" );
TQVBox *mainvtqlayout = popup->standardView( i18n( "KOrn - %1/%2 (total: %3)" ).arg( objId() ).arg( accountName )
.arg( total ), "", TQPixmap(), 0 );
@@ -288,7 +288,7 @@ void BoxContainerItem::drawLabel( TQLabel *label, const int count, const bool ne
if( hasBg )
{
label->setPixmap( calcComplexPixmap( pixmap, *_fgColour[ index ], _fonts[ index ], count ) );
- label->setBackgroundMode( Qt::FixedColor );
+ label->setBackgroundMode( TQt::FixedColor );
label->setPaletteBackgroundColor( *_bgColour[ index ] );
} else
{
@@ -299,11 +299,11 @@ void BoxContainerItem::drawLabel( TQLabel *label, const int count, const bool ne
if( hasBg )
{
- label->setBackgroundMode( Qt::FixedColor );
+ label->setBackgroundMode( TQt::FixedColor );
label->setPaletteBackgroundColor( *_bgColour[ index ] );
} else
{
- label->setBackgroundMode( Qt::X11ParentRelative );
+ label->setBackgroundMode( TQt::X11ParentRelative );
}
if( hasIcon )
@@ -316,7 +316,7 @@ void BoxContainerItem::drawLabel( TQLabel *label, const int count, const bool ne
if( _fonts[ index ] )
label->setFont( *_fonts[ index ] );
label->setPaletteForegroundColor( *_fgColour[ index ] );
- label->tqsetAlignment( Qt::AlignHCenter | Qt::AlignVCenter );
+ label->tqsetAlignment( TQt::AlignHCenter | TQt::AlignVCenter );
label->setText( TQString::number( count ) );
}
@@ -333,17 +333,17 @@ TQPixmap BoxContainerItem::calcComplexPixmap( const TQPixmap &icon, const TQColo
TQPixmap numberPixmap( icon.size() );
TQImage iconImage( icon.convertToImage() );
TQImage numberImage;
- QRgb *rgbline;
+ TQRgb *rgbline;
TQPainter p;
//Make a transparent number; first make a white number on a black background.
//This pixmap also is the base alpha-channel, the foreground colour is added later.
- numberPixmap.fill( Qt::black );
+ numberPixmap.fill( TQt::black );
p.begin( &numberPixmap, false );
- p.setPen( Qt::white );
+ p.setPen( TQt::white );
if( font )
p.setFont( *font );
- p.drawText( icon.rect(), Qt::AlignCenter, TQString::number( count ) );
+ p.drawText( icon.rect(), TQt::AlignCenter, TQString::number( count ) );
p.end();
//Convert to image and add the alpha channel.
@@ -353,7 +353,7 @@ TQPixmap BoxContainerItem::calcComplexPixmap( const TQPixmap &icon, const TQColo
numberImage.setAlphaBuffer( true ); //Enable alpha channel
for( int xx = 0; xx < numberImage.height(); ++xx )
{
- rgbline = (QRgb*)numberImage.scanLine( xx );
+ rgbline = (TQRgb*)numberImage.scanLine( xx );
for( int yy = 0; yy < numberImage.width(); ++yy )
{
@@ -371,7 +371,7 @@ TQPixmap BoxContainerItem::calcComplexPixmap( const TQPixmap &icon, const TQColo
void BoxContainerItem::setAnimIcon( TQLabel* label, const TQString& anim )
{
- label->tqsetAlignment( Qt::AlignHCenter | Qt::AlignVCenter );
+ label->tqsetAlignment( TQt::AlignHCenter | TQt::AlignVCenter );
label->setMovie( TQMovie( anim ) );
label->show();
}