Commit 20f60098 authored by Scott Wheeler's avatar Scott Wheeler

Renamed MPEGHeader to AudioData and renamed the source files accordingly.

Also I added the CacheItem and FileListItemData classes, which will be
implemented shortly.

All of this, plus the last commit, which updated the admin directory,
required letting KDevelop/Autoconf/Automake rebuild the "build" files.

svn path=/trunk/kdemultimedia/juk/; revision=144476
parent 5b439003
####### kdevelop will overwrite this part!!! (begin)##########
bin_PROGRAMS = juk
juk_SOURCES = genrelistreader.cpp genrelistlist.cpp genrelist.cpp genre.cpp player.cpp MPEGHeader.cpp filelistitem.cpp tag.cpp filelist.cpp customaction.cpp playlistwidget.cpp slideraction.cpp taggerwidget.cpp juk.cpp main.cpp
## INCLUDES were found outside kdevelop specific part
juk_SOURCES = audiodata.cpp cacheitem.cpp filelistitemdata.cpp genrelistreader.cpp genrelistlist.cpp genrelist.cpp genre.cpp player.cpp filelistitem.cpp tag.cpp filelist.cpp customaction.cpp playlistwidget.cpp slideraction.cpp taggerwidget.cpp juk.cpp main.cpp
juk_LDADD = -lid3 -lsoundserver_idl $(LIB_KFILE) $(LIB_KDEUI) $(LIB_KDECORE) $(LIB_QT) $(LIBSOCKET)
SUBDIRS = pics data
EXTRA_DIST = main.cpp juk.cpp juk.h juk.desktop jukui.rc taggerwidget.cpp taggerwidget.h slideraction.cpp slideraction.h playlistwidget.cpp playlistwidget.h customaction.h customaction.cpp filelist.cpp filelist.h tag.cpp tag.h filelistitem.cpp filelistitem.h MPEGHeader.cpp MPEGHeader.h player.cpp player.h genre.h genre.cpp hi16-app-juk.png hi32-app-juk.png hi48-app-juk.png genrelist.cpp genrelist.h genrelistlist.cpp genrelistlist.h genrelistreader.cpp genrelistreader.h
EXTRA_DIST = main.cpp juk.cpp juk.h juk.desktop jukui.rc taggerwidget.cpp taggerwidget.h slideraction.cpp slideraction.h playlistwidget.cpp playlistwidget.h customaction.h customaction.cpp filelist.cpp filelist.h tag.cpp tag.h filelistitem.cpp filelistitem.h player.cpp player.h genre.h genre.cpp hi16-app-juk.png hi32-app-juk.png hi48-app-juk.png genrelist.cpp genrelist.h genrelistlist.cpp genrelistlist.h genrelistreader.cpp genrelistreader.h filelistitemdata.cpp filelistitemdata.h cacheitem.cpp cacheitem.h audiodata.cpp audiodata.h
install-data-local:
$(mkinstalldirs) $(kde_appsdir)/Multimedia/
......
......@@ -84,6 +84,7 @@ DCOP_DEPENDENCIES = @DCOP_DEPENDENCIES@
DLLTOOL = @DLLTOOL@
DPMSINC = @DPMSINC@
DPMSLIB = @DPMSLIB@
ECHO = @ECHO@
EXEEXT = @EXEEXT@
GCJ = @GCJ@
GCJFLAGS = @GCJFLAGS@
......@@ -175,6 +176,7 @@ QTOPIA_INCLUDES = @QTOPIA_INCLUDES@
QT_INCLUDES = @QT_INCLUDES@
QT_LDFLAGS = @QT_LDFLAGS@
RANLIB = @RANLIB@
RC = @RC@
REPO = @REPO@
SETUIDFLAGS = @SETUIDFLAGS@
STRIP = @STRIP@
......@@ -227,12 +229,13 @@ x_includes = @x_includes@
x_libraries = @x_libraries@
bin_PROGRAMS = juk
juk_SOURCES = genrelistreader.cpp genrelistlist.cpp genrelist.cpp genre.cpp player.cpp MPEGHeader.cpp filelistitem.cpp tag.cpp filelist.cpp customaction.cpp playlistwidget.cpp slideraction.cpp taggerwidget.cpp juk.cpp main.cpp
juk_SOURCES = audiodata.cpp cacheitem.cpp filelistitemdata.cpp genrelistreader.cpp genrelistlist.cpp genrelist.cpp genre.cpp player.cpp filelistitem.cpp tag.cpp filelist.cpp customaction.cpp playlistwidget.cpp slideraction.cpp taggerwidget.cpp juk.cpp main.cpp
juk_LDADD = -lid3 -lsoundserver_idl $(LIB_KFILE) $(LIB_KDEUI) $(LIB_KDECORE) $(LIB_QT) $(LIBSOCKET)
SUBDIRS = pics data
EXTRA_DIST = main.cpp juk.cpp juk.h juk.desktop jukui.rc taggerwidget.cpp taggerwidget.h slideraction.cpp slideraction.h playlistwidget.cpp playlistwidget.h customaction.h customaction.cpp filelist.cpp filelist.h tag.cpp tag.h filelistitem.cpp filelistitem.h MPEGHeader.cpp MPEGHeader.h player.cpp player.h genre.h genre.cpp hi16-app-juk.png hi32-app-juk.png hi48-app-juk.png genrelist.cpp genrelist.h genrelistlist.cpp genrelistlist.h genrelistreader.cpp genrelistreader.h
EXTRA_DIST = main.cpp juk.cpp juk.h juk.desktop jukui.rc taggerwidget.cpp taggerwidget.h slideraction.cpp slideraction.h playlistwidget.cpp playlistwidget.h customaction.h customaction.cpp filelist.cpp filelist.h tag.cpp tag.h filelistitem.cpp filelistitem.h player.cpp player.h genre.h genre.cpp hi16-app-juk.png hi32-app-juk.png hi48-app-juk.png genrelist.cpp genrelist.h genrelistlist.cpp genrelistlist.h genrelistreader.cpp genrelistreader.h filelistitemdata.cpp filelistitemdata.h cacheitem.cpp cacheitem.h audiodata.cpp audiodata.h
####### kdevelop will overwrite this part!!! (end)############
......@@ -258,17 +261,19 @@ DEFS = @DEFS@ -I. -I$(srcdir) -I..
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
#>- juk_OBJECTS = genrelistreader.$(OBJEXT) genrelistlist.$(OBJEXT) \
#>- genrelist.$(OBJEXT) genre.$(OBJEXT) player.$(OBJEXT) \
#>- MPEGHeader.$(OBJEXT) filelistitem.$(OBJEXT) tag.$(OBJEXT) \
#>- juk_OBJECTS = audiodata.$(OBJEXT) cacheitem.$(OBJEXT) \
#>- filelistitemdata.$(OBJEXT) genrelistreader.$(OBJEXT) \
#>- genrelistlist.$(OBJEXT) genrelist.$(OBJEXT) genre.$(OBJEXT) \
#>- player.$(OBJEXT) filelistitem.$(OBJEXT) tag.$(OBJEXT) \
#>- filelist.$(OBJEXT) customaction.$(OBJEXT) playlistwidget.$(OBJEXT) \
#>- slideraction.$(OBJEXT) taggerwidget.$(OBJEXT) juk.$(OBJEXT) \
#>- main.$(OBJEXT)
#>+ 11
#>+ 12
juk_final_OBJECTS = juk.all_cpp.o
juk_nofinal_OBJECTS = genrelistreader.$(OBJEXT) genrelistlist.$(OBJEXT) \
genrelist.$(OBJEXT) genre.$(OBJEXT) player.$(OBJEXT) \
MPEGHeader.$(OBJEXT) filelistitem.$(OBJEXT) tag.$(OBJEXT) \
juk_nofinal_OBJECTS = audiodata.$(OBJEXT) cacheitem.$(OBJEXT) \
filelistitemdata.$(OBJEXT) genrelistreader.$(OBJEXT) \
genrelistlist.$(OBJEXT) genrelist.$(OBJEXT) genre.$(OBJEXT) \
player.$(OBJEXT) filelistitem.$(OBJEXT) tag.$(OBJEXT) \
filelist.$(OBJEXT) customaction.$(OBJEXT) playlistwidget.$(OBJEXT) \
slideraction.$(OBJEXT) taggerwidget.$(OBJEXT) juk.$(OBJEXT) \
main.$(OBJEXT)\
......@@ -293,31 +298,29 @@ DATA = $(rc_DATA)
DIST_COMMON = Makefile.am Makefile.in
#>- DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
#>+ 4
KDE_DIST=juk
DISTFILES= $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) $(KDE_DIST)
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = tar
GZIP_ENV = --best
#>- DEP_FILES = .deps/MPEGHeader.P .deps/customaction.P .deps/filelist.P \
#>- .deps/filelistitem.P .deps/genre.P .deps/genrelist.P \
#>- .deps/genrelistlist.P .deps/genrelistreader.P .deps/juk.P .deps/main.P \
#>- .deps/player.P .deps/playlistwidget.P .deps/slideraction.P .deps/tag.P \
#>- DEP_FILES = .deps/audiodata.P .deps/cacheitem.P .deps/customaction.P \
#>- .deps/filelist.P .deps/filelistitem.P .deps/filelistitemdata.P \
#>- .deps/genre.P .deps/genrelist.P .deps/genrelistlist.P \
#>- .deps/genrelistreader.P .deps/juk.P .deps/main.P .deps/player.P \
#>- .deps/playlistwidget.P .deps/slideraction.P .deps/tag.P \
#>- .deps/taggerwidget.P
#>+ 12
#>+ 14
@KDE_USE_FINAL_TRUE@DEP_FILES = $(DEPDIR)/slideraction.moc.P $(DEPDIR)/filelistitem.moc.P $(DEPDIR)/customaction.moc.P $(DEPDIR)/juk.moc.P $(DEPDIR)/taggerwidget.moc.P $(DEPDIR)/juk_meta_unload.P $(DEPDIR)/juk.all_cpp.P \
.deps/MPEGHeader.P .deps/customaction.P .deps/filelist.P \
.deps/filelistitem.P .deps/genre.P .deps/genrelist.P \
.deps/genrelistlist.P .deps/genrelistreader.P .deps/juk.P .deps/main.P \
.deps/player.P .deps/playlistwidget.P .deps/slideraction.P .deps/tag.P \
.deps/audiodata.P .deps/cacheitem.P .deps/customaction.P \
.deps/filelist.P .deps/filelistitem.P .deps/filelistitemdata.P \
.deps/genre.P .deps/genrelist.P .deps/genrelistlist.P \
.deps/genrelistreader.P .deps/juk.P .deps/main.P .deps/player.P \
.deps/playlistwidget.P .deps/slideraction.P .deps/tag.P \
.deps/taggerwidget.P
@KDE_USE_FINAL_FALSE@DEP_FILES = $(DEPDIR)/slideraction.moc.P $(DEPDIR)/filelistitem.moc.P $(DEPDIR)/customaction.moc.P $(DEPDIR)/juk.moc.P $(DEPDIR)/taggerwidget.moc.P $(DEPDIR)/juk_meta_unload.P .deps/MPEGHeader.P .deps/customaction.P .deps/filelist.P \
.deps/filelistitem.P .deps/genre.P .deps/genrelist.P \
.deps/genrelistlist.P .deps/genrelistreader.P .deps/juk.P .deps/main.P \
.deps/player.P .deps/playlistwidget.P .deps/slideraction.P .deps/tag.P \
@KDE_USE_FINAL_FALSE@DEP_FILES = $(DEPDIR)/slideraction.moc.P $(DEPDIR)/filelistitem.moc.P $(DEPDIR)/customaction.moc.P $(DEPDIR)/juk.moc.P $(DEPDIR)/taggerwidget.moc.P $(DEPDIR)/juk_meta_unload.P .deps/audiodata.P .deps/cacheitem.P .deps/customaction.P \
.deps/filelist.P .deps/filelistitem.P .deps/filelistitemdata.P \
.deps/genre.P .deps/genrelist.P .deps/genrelistlist.P \
.deps/genrelistreader.P .deps/juk.P .deps/main.P .deps/player.P \
.deps/playlistwidget.P .deps/slideraction.P .deps/tag.P \
.deps/taggerwidget.P
SOURCES = $(juk_SOURCES)
......@@ -779,11 +782,11 @@ clean-moc-classes:
-rm -f juk_meta_unload.cpp
#>+ 11
juk.all_cpp.cpp: $(srcdir)/Makefile.in $(srcdir)/genrelistreader.cpp $(srcdir)/genrelistlist.cpp $(srcdir)/genrelist.cpp $(srcdir)/genre.cpp $(srcdir)/player.cpp $(srcdir)/MPEGHeader.cpp $(srcdir)/filelistitem.cpp $(srcdir)/tag.cpp $(srcdir)/filelist.cpp $(srcdir)/customaction.cpp $(srcdir)/playlistwidget.cpp $(srcdir)/slideraction.cpp $(srcdir)/taggerwidget.cpp $(srcdir)/juk.cpp $(srcdir)/main.cpp $(srcdir)/juk_meta_unload.cpp slideraction.moc.cpp filelistitem.moc.cpp customaction.moc.cpp juk.moc.cpp taggerwidget.moc.cpp
juk.all_cpp.cpp: $(srcdir)/Makefile.in $(srcdir)/audiodata.cpp $(srcdir)/cacheitem.cpp $(srcdir)/filelistitemdata.cpp $(srcdir)/genrelistreader.cpp $(srcdir)/genrelistlist.cpp $(srcdir)/genrelist.cpp $(srcdir)/genre.cpp $(srcdir)/player.cpp $(srcdir)/filelistitem.cpp $(srcdir)/tag.cpp $(srcdir)/filelist.cpp $(srcdir)/customaction.cpp $(srcdir)/playlistwidget.cpp $(srcdir)/slideraction.cpp $(srcdir)/taggerwidget.cpp $(srcdir)/juk.cpp $(srcdir)/main.cpp juk_meta_unload.cpp slideraction.moc.cpp filelistitem.moc.cpp customaction.moc.cpp juk.moc.cpp taggerwidget.moc.cpp
@echo 'creating juk.all_cpp.cpp ...'; \
rm -f juk.all_cpp.files juk.all_cpp.final; \
echo "#define KDE_USE_FINAL 1" >> juk.all_cpp.final; \
for file in genrelistreader.cpp genrelistlist.cpp genrelist.cpp genre.cpp player.cpp MPEGHeader.cpp filelistitem.cpp tag.cpp filelist.cpp customaction.cpp playlistwidget.cpp slideraction.cpp taggerwidget.cpp juk.cpp main.cpp juk_meta_unload.cpp slideraction.moc.cpp filelistitem.moc.cpp customaction.moc.cpp juk.moc.cpp taggerwidget.moc.cpp; do \
for file in audiodata.cpp cacheitem.cpp filelistitemdata.cpp genrelistreader.cpp genrelistlist.cpp genrelist.cpp genre.cpp player.cpp filelistitem.cpp tag.cpp filelist.cpp customaction.cpp playlistwidget.cpp slideraction.cpp taggerwidget.cpp juk.cpp main.cpp juk_meta_unload.cpp slideraction.moc.cpp filelistitem.moc.cpp customaction.moc.cpp juk.moc.cpp taggerwidget.moc.cpp; do \
echo "#include \"$$file\"" >> juk.all_cpp.files; \
test ! -f $(srcdir)/$$file || egrep '^#pragma +implementation' $(srcdir)/$$file >> juk.all_cpp.final; \
done; \
......
/***************************************************************************
MPEGHeader.cpp is a modified version of fileinfo.cpp which is a part of
AudioData.cpp is a modified version of fileinfo.cpp which is a part of
Mp3Kult (C) 2001 by Stefano Brustia (hio@lombardiacom.it) which is
available at:
......@@ -17,7 +17,7 @@
* (at your option) any later version. *
***************************************************************************/
#include "MPEGHeader.h"
#include "audiodata.h"
#include <iostream.h>
#include <ctype.h>
......@@ -57,7 +57,7 @@ const char *version_nums[3] =
{"1", "2", "2.5"};
MPEGHeader::MPEGHeader(const char* filein)
AudioData::AudioData(const char* filein)
{
success = false;
fileglob = strdup(filein);
......@@ -77,14 +77,14 @@ MPEGHeader::MPEGHeader(const char* filein)
}
}
MPEGHeader::~MPEGHeader()
AudioData::~AudioData()
{
free(fileglob);
if(lengthchar)
free(lengthchar);
}
bool MPEGHeader::readLayerInfo (FILE* file)
bool AudioData::readLayerInfo (FILE* file)
{
unsigned char buf[4];
unsigned long head;
......@@ -143,7 +143,7 @@ bool MPEGHeader::readLayerInfo (FILE* file)
return true;
}
bool MPEGHeader::headCheck(unsigned long head)
bool AudioData::headCheck(unsigned long head)
{
if ((head & 0xffe00000) != 0xffe00000)
return false;
......@@ -164,24 +164,24 @@ bool MPEGHeader::headCheck(unsigned long head)
return true;
}
int MPEGHeader::getBitrate(){
int AudioData::getBitrate(){
return (bitrates[version][layer - 1][bitrate_index]);
}
int MPEGHeader::getSamplerate(){
int AudioData::getSamplerate(){
return (s_freq[version][sampling_frequency]);
}
const char* MPEGHeader::getMpegver(){
const char* AudioData::getMpegver(){
return (version_names[version]);
}
int MPEGHeader::getLayer() {
int AudioData::getLayer() {
return layer;
}
const char* MPEGHeader::getMode(int mode)
const char* AudioData::getMode(int mode)
{
if ((mode >= 0) && (mode < 5))
return (mode_names[mode]);
......@@ -189,16 +189,16 @@ const char* MPEGHeader::getMode(int mode)
return "Stereo";
}
int MPEGHeader::getMode()
int AudioData::getMode()
{
return mode;
}
int MPEGHeader::getLength() {
int AudioData::getLength() {
return length;
}
char* MPEGHeader::getLengthChar() {
char* AudioData::getLengthChar() {
int min, sec;
char buf[6];
......@@ -212,11 +212,11 @@ char* MPEGHeader::getLengthChar() {
return lengthchar;
}
int MPEGHeader::getSize() {
int AudioData::getSize() {
return filelen;
}
bool MPEGHeader::getResult()
bool AudioData::getResult()
{
return success;
}
/***************************************************************************
MPEGHeader.h is a modified version of fileinfo.h which is a part of
AudioData.h is a modified version of fileinfo.h which is a part of
Mp3Kult (C) 2001 by Stefano Brustia (hio@lombardiacom.it) which is
available at:
......@@ -17,20 +17,20 @@
* (at your option) any later version. *
***************************************************************************/
#ifndef MPEGHEADER_H
#define MPEGHEADER_H
#ifndef AUDIODATA_H
#define AUDIODATA_H
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>
class MPEGHeader
class AudioData
{
public:
MPEGHeader(const char* filein);
~MPEGHeader();
AudioData(const char* filein);
~AudioData();
int getBitrate();
int getSamplerate();
......
/***************************************************************************
cacheitem.cpp - description
-------------------
begin : Fri Mar 22 2002
copyright : (C) 2002 by Scott Wheeler
email : scott@slackorama.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 "cacheitem.h"
CacheItem::CacheItem()
{
}
CacheItem::~CacheItem()
{
}
/***************************************************************************
cacheitem.h - description
-------------------
begin : Fri Mar 22 2002
copyright : (C) 2002 by Scott Wheeler
email : scott@slackorama.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. *
* *
***************************************************************************/
#ifndef CACHEITEM_H
#define CACHEITEM_H
class CacheItem
{
public:
CacheItem();
~CacheItem();
};
#endif
......@@ -83,6 +83,7 @@ DCOP_DEPENDENCIES = @DCOP_DEPENDENCIES@
DLLTOOL = @DLLTOOL@
DPMSINC = @DPMSINC@
DPMSLIB = @DPMSLIB@
ECHO = @ECHO@
EXEEXT = @EXEEXT@
GCJ = @GCJ@
GCJFLAGS = @GCJFLAGS@
......@@ -174,6 +175,7 @@ QTOPIA_INCLUDES = @QTOPIA_INCLUDES@
QT_INCLUDES = @QT_INCLUDES@
QT_LDFLAGS = @QT_LDFLAGS@
RANLIB = @RANLIB@
RC = @RC@
REPO = @REPO@
SETUIDFLAGS = @SETUIDFLAGS@
STRIP = @STRIP@
......
......@@ -25,7 +25,7 @@
FileListItem::FileListItem(QFileInfo *file, KListView *parent) : QObject(parent), KListViewItem(parent), QFileInfo(*file)
{
header = 0;
audioData = 0;
tag = new Tag(filePath());
refresh();
......@@ -37,7 +37,7 @@ FileListItem::FileListItem(FileListItem *item, KListView *parent) : QObject(pare
if(item) {
tag = item->getTag();
header = item->getHeader();
audioData = item->getAudioData();
connect(item, SIGNAL(destroyed(FileListItem *)), this, SLOT(parentDestroyed(FileListItem *)));
addSibling(item);
......@@ -50,8 +50,8 @@ FileListItem::~FileListItem()
if(tag)
delete(tag);
if(header)
delete(header);
if(audioData)
delete(audioData);
emit(destroyed(this));
}
......@@ -63,21 +63,21 @@ Tag *FileListItem::getTag()
return(tag);
}
MPEGHeader *FileListItem::getHeader()
AudioData *FileListItem::getAudioData()
{
if(!header) {
header = new MPEGHeader(filePath());
if(!audioData) {
audioData = new AudioData(filePath());
}
return(header);
return(audioData);
}
void FileListItem::setFile(QString fileName)
{
setFile(fileName);
if(header) {
delete(header);
(void) getHeader();
if(audioData) {
delete(audioData);
(void) getAudioData();
}
if(tag) {
delete(tag);
......@@ -93,7 +93,7 @@ void FileListItem::refresh()
setText(TrackNumberColumn, getTag()->getTrackNumberString());
setText(GenreColumn, getTag()->getGenre());
setText(YearColumn, getTag()->getYearString());
setText(LengthColumn, getHeader()->getLengthChar());
setText(LengthColumn, getAudioData()->getLengthChar());
setText(FileNameColumn, filePath());
emit(refreshed());
......@@ -160,9 +160,9 @@ int FileListItem::compare(FileListItem *firstItem, FileListItem *secondItem, int
return(0);
}
else if(column == LengthColumn) {
if(firstItem->getHeader()->getLength() > secondItem->getHeader()->getLength())
if(firstItem->getAudioData()->getLength() > secondItem->getAudioData()->getLength())
return(1);
else if(firstItem->getHeader()->getLength() < secondItem->getHeader()->getLength())
else if(firstItem->getAudioData()->getLength() < secondItem->getAudioData()->getLength())
return(-1);
else
return(0);
......@@ -178,7 +178,7 @@ int FileListItem::compare(FileListItem *firstItem, FileListItem *secondItem, int
void FileListItem::parentDestroyed(FileListItem *parent)
{
header = 0;
audioData = 0;
tag = 0;
disconnect(parent, SIGNAL(destroyed(FileListItem *)), this, SLOT(parentDestroyed(FileListItem *)));
}
......@@ -24,7 +24,7 @@
#include <qobject.h>
#include "tag.h"
#include "MPEGHeader.h"
#include "audiodata.h"
class FileListItem : public QObject, public KListViewItem, public QFileInfo {
Q_OBJECT
......@@ -37,7 +37,7 @@ public:
~FileListItem();
Tag *getTag();
MPEGHeader *getHeader();
AudioData *getAudioData();
void setFile(QString fileName);
......@@ -56,7 +56,7 @@ private:
QFileInfo *fileInfo;
Tag *tag;
MPEGHeader *header;
AudioData *audioData;
private slots:
void parentDestroyed(FileListItem *parent);
......
/***************************************************************************
filelistitemdata.cpp - description
-------------------
begin : Fri Mar 22 2002
copyright : (C) 2002 by Scott Wheeler
email : scott@slackorama.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 "filelistitemdata.h"
FileListItemData::FileListItemData(){
}
FileListItemData::~FileListItemData(){
}
/***************************************************************************
filelistitemdata.h - description
-------------------
begin : Fri Mar 22 2002
copyright : (C) 2002 by Scott Wheeler
email : scott@slackorama.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. *
* *
***************************************************************************/
#ifndef FILELISTITEMDATA_H
#define FILELISTITEMDATA_H
#include <qfileinfo.h>
#include "tag.h"
#include "cacheitem.h"
class FileListItemData : public QFileInfo
{
public:
FileListItemData();
~FileListItemData();
private:
CacheItem *cache;
Tag *tag;
};
#endif
......@@ -84,6 +84,7 @@ DCOP_DEPENDENCIES = @DCOP_DEPENDENCIES@
DLLTOOL = @DLLTOOL@
DPMSINC = @DPMSINC@
DPMSLIB = @DPMSLIB@
ECHO = @ECHO@
EXEEXT = @EXEEXT@
GCJ = @GCJ@
GCJFLAGS = @GCJFLAGS@
......@@ -175,6 +176,7 @@ QTOPIA_INCLUDES = @QTOPIA_INCLUDES@
QT_INCLUDES = @QT_INCLUDES@
QT_LDFLAGS = @QT_LDFLAGS@
RANLIB = @RANLIB@
RC = @RC@
REPO = @REPO@
SETUIDFLAGS = @SETUIDFLAGS@
STRIP = @STRIP@
......
......@@ -297,7 +297,7 @@ void TaggerWidget::updateBoxes() // this needs to be updated to properly work wi
if(item) {
Tag *tag = item->getTag();
MPEGHeader *header = item->getHeader();
AudioData *audioData = item->getAudioData();
artistNameBox->setEditText(tag->getArtist());
trackNameBox->setText(tag->getTrack());
......@@ -314,9 +314,9 @@ void TaggerWidget::updateBoxes() // this needs to be updated to properly work wi
trackSpin->setValue(tag->getTrackNumber());
yearSpin->setValue(tag->getYear());
if(header->getResult()) {
lengthBox->setText(header->getLengthChar());
bitrateBox->setText(QString::number(header->getBitrate()));
if(audioData->getResult()) {
lengthBox->setText(audioData->getLengthChar());
bitrateBox->setText(QString::number(audioData->getBitrate()));
}
commentBox->setText(tag->getComment());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment