/***************************************************************************
                          AudioItem.cpp  -  description
                             -------------------
    begin                : Fri Nov 16 2001
    copyright            : (C) 2001 by Alex Podolsky
    email                : alexpod@users.sf.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.                                   *
 *                                                                         *
 ***************************************************************************/
#include <iostream.h>

#include <qlistview.h>

#include <qdir.h>
#include <qstringlist.h>
#include <qapp.h>
#include <qdatetime.h>
#include <qfileinfo.h>

// QT includes
#include <kurl.h>
#include <kiconloader.h>
#include <klocale.h>
#include <kmimemagic.h>
#include <kmimetype.h>
#include <kfilemetainfo.h>

#include "AudioItem.h"
#include "CdboFileItem.h"

AudioItem::AudioItem(QListView * parent, QString path) : CdboFileItem(parent, path){
	
	sizeField = 3;
	nameField = 1;
	locationField = 5;
	modifiedField = 12;
	ownerField = 11;
	
}

//==============================================
AudioItem::AudioItem(CdboFileItem * parent, QString path):CdboFileItem(parent, path){
	sizeField = 3;
	nameField = 1;
	locationField = 5;
	modifiedField = 12;
	ownerField = 11;
}
//=======================================
AudioItem::~AudioItem(){
}
//=======================================
void AudioItem::setFileName(QString n) {
	name = n;
	setText(nameField,n);
}
//=======================================
void AudioItem::setFilePath(QString p) {
	path = p;
	setText(locationField,p);
}
//=======================================
void AudioItem::setLength(QString l) {
	setText(sizeField,l);
}
//=======================================
QString AudioItem::getLength() {
	return text(sizeField);
}
//=======================================
void AudioItem::setType(QString t) {
	setText(4,t);
}
//=======================================
QString AudioItem::getType() {
	return text(4);
}
//=======================================
void AudioItem::setTrackPos(int trackPos){
	this->trackPos = trackPos;
	if(trackPos > 9)
		setText(0,QString::number(trackPos));
	else
		setText(0,"0" + QString::number(trackPos));
}
