diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-05 22:07:15 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-05 22:07:15 +0000 |
commit | 421b60af92c83b889f8903c2898f2bd07186fcd8 (patch) | |
tree | ad873a24c9438baed4942fda795430a4c3dc9a9a /src/kbfxplasmaindexitem.cpp | |
parent | 39e896bddf25bf34cbf8be814d959181e2c1d1dd (diff) | |
download | kbfx-421b60af92c83b889f8903c2898f2bd07186fcd8.tar.gz kbfx-421b60af92c83b889f8903c2898f2bd07186fcd8.zip |
TQt4 port kbfx
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kbfx@1230544 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/kbfxplasmaindexitem.cpp')
-rw-r--r-- | src/kbfxplasmaindexitem.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/src/kbfxplasmaindexitem.cpp b/src/kbfxplasmaindexitem.cpp index cbbfe91..3c08d3c 100644 --- a/src/kbfxplasmaindexitem.cpp +++ b/src/kbfxplasmaindexitem.cpp @@ -24,13 +24,13 @@ #include <kapplication.h> #include <kbfxconfig.h> -KbfxPlasmaIndexItem::KbfxPlasmaIndexItem ( QCanvasPixmapArray * a, QCanvas * canvas ) :KbfxPlasmaCanvasAbstractItem ( a,canvas ) +KbfxPlasmaIndexItem::KbfxPlasmaIndexItem ( TQCanvasPixmapArray * a, TQCanvas * canvas ) :KbfxPlasmaCanvasAbstractItem ( a,canvas ) { //this->setItemMode (1); setAnimated ( false ); setCurrent ( false ); m_isSelected = false; - QPixmap * _img = this->image ( 0 ); + TQPixmap * _img = this->image ( 0 ); m_height =_img->height(); m_width= _img->width(); @@ -42,7 +42,7 @@ KbfxPlasmaIndexItem::~KbfxPlasmaIndexItem() {} void -KbfxPlasmaIndexItem::setIcon ( QString str ) +KbfxPlasmaIndexItem::setIcon ( TQString str ) { KIconLoader *iconload = KGlobal::iconLoader (); m_iconPath = iconload->iconPath ( str, KIcon::Desktop, false ); @@ -51,7 +51,7 @@ KbfxPlasmaIndexItem::setIcon ( QString str ) } void -KbfxPlasmaIndexItem::setText ( QString text ) +KbfxPlasmaIndexItem::setText ( TQString text ) { m_text = text; } @@ -71,7 +71,7 @@ KbfxPlasmaIndexItem::selected() void -KbfxPlasmaIndexItem::drawContent ( QPainter * pe ) +KbfxPlasmaIndexItem::drawContent ( TQPainter * pe ) { if ( this->isCurrent() || m_isSelected ) @@ -83,17 +83,17 @@ KbfxPlasmaIndexItem::drawContent ( QPainter * pe ) this->setFrame ( 0 ); } - QCanvasPixmap *cp = this->image ( this->frame () ); + TQCanvasPixmap *cp = this->image ( this->frame () ); m_height = cp->height(); m_width = cp->width(); pe->drawPixmap ( this->boundingRect (), *cp ); - QRect r ( ( int ) x(), ( int ) y(), m_width, m_height ); - QRect textRect ( m_height+1, ( int ) y(), m_width,m_height ); + TQRect r ( ( int ) x(), ( int ) y(), m_width, m_height ); + TQRect textRect ( m_height+1, ( int ) y(), m_width,m_height ); - QFont * _font_plugin = new QFont ( ConfigInit().m_pluginNameFont ); - QFont * _font_index = new QFont ( ConfigInit().m_fontIndexFont ); + TQFont * _font_plugin = new TQFont ( ConfigInit().m_pluginNameFont ); + TQFont * _font_index = new TQFont ( ConfigInit().m_fontIndexFont ); if ( this->type() != KbfxPlasmaIndexItem::SEPARATOR ) { @@ -106,8 +106,8 @@ KbfxPlasmaIndexItem::drawContent ( QPainter * pe ) pe->setPen ( ConfigInit().m_pluginNameColor); } - pe->drawText ( textRect, Qt::AlignVCenter | Qt::AlignLeft ,QString ( m_text ), -1, &r,0 ); - pe->drawPixmap ( QRect ( ( int ) x() +5 , ( int ) y() +6,m_height-12,m_height-12 ),m_icon ); + pe->drawText ( textRect, TQt::AlignVCenter | TQt::AlignLeft ,TQString ( m_text ), -1, &r ); + pe->drawPixmap ( TQRect ( ( int ) x() +5 , ( int ) y() +6,m_height-12,m_height-12 ),m_icon ); delete _font_plugin; delete _font_index; @@ -128,17 +128,17 @@ KbfxPlasmaIndexItem::setId ( int id ) void -KbfxPlasmaIndexItem::draw ( QPainter & p ) +KbfxPlasmaIndexItem::draw ( TQPainter & p ) { drawContent ( &p ); } void -KbfxPlasmaIndexItem::setLabelText ( QString str ) +KbfxPlasmaIndexItem::setLabelText ( TQString str ) { - QFont * _font = new QFont(ConfigInit().m_fontIndexFont); + TQFont * _font = new TQFont(ConfigInit().m_fontIndexFont); - QFontMetrics fm ( *_font ); + TQFontMetrics fm ( *_font ); int _commentWidth = fm.width ( str+"..." ); int _strLen = str.length(); @@ -160,7 +160,7 @@ KbfxPlasmaIndexItem::setLabelText ( QString str ) } -QString +TQString KbfxPlasmaIndexItem::belongsTo() { @@ -168,13 +168,13 @@ KbfxPlasmaIndexItem::belongsTo() } void -KbfxPlasmaIndexItem::setBelongsTo ( QString parent ) +KbfxPlasmaIndexItem::setBelongsTo ( TQString tqparent ) { - m_parent = parent; + m_parent = tqparent; } -void KbfxPlasmaIndexItem::mousePressEvent ( QMouseEvent * e ) +void KbfxPlasmaIndexItem::mousePressEvent ( TQMouseEvent * e ) { e = e; } |