summaryrefslogtreecommitdiffstats
path: root/src/kbdir.cpp
blob: 1d33c168898b67786293320f591476be1c0b8d6f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/***************************************************************************
                          kbdir.cpp  -  description
                             -------------------
    begin                : Sam Sep 20 2003
    copyright            : (C) 2003 by mkulke
    email                : [email protected]
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   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.                                   *
 *                                                                         *
 ***************************************************************************/
 
#include <tdeglobal.h>
#include <kiconloader.h>
#include "kbfileinfo.h"

#include "kbdir.h"

KbDir::KbDir(KbFileInfo kfi, TQListView * parent, TQListViewItem * after) : KbItem(kfi, parent, after)
{	
	setPixmap(0, TDEGlobal::iconLoader()->loadIcon("folder",TDEIcon::Small));	

	if ((kfi.fileName() == ".") || (kfi.fileName() == "..")) delete this;
}

KbDir::KbDir(TQListView * parent, TQListViewItem * after, TQString file, TQString path, TQString date, off64_t size, unsigned int date_int) : KbItem(parent, after)
{
	setText(0,file);

    TQString s;
    s.setNum(size);
    setText(1, s);

    setText(2, date);

    m_path = path;
    m_file = file;
    m_date = date;
    m_size = size;

	m_date_int = date_int;
}
KbDir::~KbDir()
{
}

int KbDir::rtti() const
{
	return KbItem::dir;
}