Logo Search packages:      
Sourcecode: kbfx version File versions  Download package

kbfxlistviewitem.cpp

#include <qpainter.h>
#include "kbfxlistviewitem.h"
#include <qrect.h>

KbfxListViewItem::KbfxListViewItem( QListView *parent)
    : QListViewItem( parent )
{

      ApplicationName  = "";
}


void KbfxListViewItem::paintCell( QPainter *painter, const QColorGroup &cg,
                                 int column, int width, int alignment )
{
  
  QColorGroup _cg ( cg );
  QColor c = _cg.text();

//AKTODO: user can set the text color give interface here .
        _cg.setColor( QColorGroup::Text, Qt::red );

      column = 0;
    QListViewItem::paintCell( painter, _cg, column, width, alignment );

}


void KbfxListViewItem::paintFocus( QPainter *painter , const QColorGroup & cg , const QRect & r2)
{

    QRect r ( r2);
    painter->eraseRect( r );
//   painter->fillRect( 5, 5, 50,20, Qt::red);
    
 //painter->fillRect( 0, 0, 50 , 20, Qt::red );

  QImage tileimg(test);
 QPixmap tilepixmap(tileimg);

//  bitBlt ( &dest, 6, 6 , &UserImage , 0, 0, UserImage.width(), UserImage.height(), 1);
 
     
  painter->drawPixmap(r,tilepixmap);      
  painter->drawText(r.x(),r.y(),100,30, Qt::SingleLine,text(0));
  //paintFocus(painter,cg,r);  


}


Generated by  Doxygen 1.6.0   Back to index