From c3f8ee64e905cdb103b5bfa07525fb4e85c31120 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Wed, 24 Jul 2013 11:49:27 -0500 Subject: Initial import of kasablanca 0.4.0.2 --- src/kbdir.cpp | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100755 src/kbdir.cpp (limited to 'src/kbdir.cpp') diff --git a/src/kbdir.cpp b/src/kbdir.cpp new file mode 100755 index 0000000..bbb9716 --- /dev/null +++ b/src/kbdir.cpp @@ -0,0 +1,60 @@ +/*************************************************************************** + kbdir.cpp - description + ------------------- + begin : Sam Sep 20 2003 + copyright : (C) 2003 by mkulke + email : sikor_sxe@radicalapproach.de + ***************************************************************************/ + +/*************************************************************************** + * * + * 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. * + * * + ***************************************************************************/ + +// enable > 2gb support (LFS) + +#define _LARGEFILE_SOURCE +#define _LARGEFILE64_SOURCE + +#include +#include +#include "kbfileinfo.h" + +#include "kbdir.h" + +KbDir::KbDir(KbFileInfo kfi, QListView * parent, QListViewItem * after) : KbItem(kfi, parent, after) +{ + setPixmap(0, KGlobal::iconLoader()->loadIcon("folder",KIcon::Small)); + + if ((kfi.fileName() == ".") || (kfi.fileName() == "..")) delete this; +} + +KbDir::KbDir(QListView * parent, QListViewItem * after, QString file, QString path, QString date, off64_t size, unsigned int date_int) : KbItem(parent, after) +{ + setText(0,file); + + QString 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; +} -- cgit v1.2.1