1
// vim: set tabstop=4 shiftwidth=4 noexpandtab
2
/* This file is based on kfiledetailview.cpp from the KDE libs. Original
5
/* This file is part of the KDE libraries
6
Copyright (C) 1997 Stephan Kulow <coolo@kde.org>
7
2000, 2001 Carsten Pfeiffer <pfeiffer@kde.org>
9
This library is free software; you can redistribute it and/or
10
modify it under the terms of the GNU Library General Public
11
License as published by the Free Software Foundation; either
12
version 2 of the License, or (at your option) any later version.
14
This library is distributed in the hope that it will be useful,
15
but WITHOUT ANY WARRANTY; without even the implied warranty of
16
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17
Library General Public License for more details.
19
You should have received a copy of the GNU Library General Public License
20
along with this library; see the file COPYING.LIB. If not, write to
21
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
22
Boston, MA 02111-1307, USA.
30
#include "gvfiledetailview.h"
31
#include "gvfiledetailviewitem.h"
34
void GVFileDetailViewItem::init()
36
setPixmap( COL_NAME, inf->pixmap(KIcon::SizeSmall));
38
setText( COL_NAME, inf->text() );
39
setText( COL_SIZE, KGlobal::locale()->formatNumber( inf->size(), 0));
40
setText( COL_DATE, inf->timeString() );
41
setText( COL_PERM, inf->permissionsString() );
42
setText( COL_OWNER, inf->user() );
43
setText( COL_GROUP, inf->group() );
46
void GVFileDetailViewItem::paintCell(QPainter* p,const QColorGroup & cg,int column,int width,int align)
49
GVFileDetailView* view=static_cast<GVFileDetailView*>(listView());
50
GVFileDetailViewItem* viewedItem=view->viewItem(view->shownFileItem());
51
if (viewedItem==this) {
52
myCG.setColor(QColorGroup::Text, view->shownFileItemColor());
53
myCG.setColor(QColorGroup::HighlightedText, view->shownFileItemColor());
55
KListViewItem::paintCell(p,myCG,column,width,align);