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

kbfxlistviewitem.cpp

/***************************************************************************
 *   Copyright (C) 2005 by Siraj Razick                                    *
 *   siraj@kdemail.net                                                     *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 ***************************************************************************/


#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