|
|
|
@ -27,8 +27,6 @@
|
|
|
|
|
#include <tqdatetime.h>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MagnatuneListViewArtistItem::MagnatuneListViewArtistItem( MagnatuneArtist artist, TDEListView * parent )
|
|
|
|
|
: TDEListViewItem( parent ), MagnatuneArtist( artist )
|
|
|
|
|
{
|
|
|
|
@ -45,7 +43,6 @@ MagnatuneListViewArtistItem::~ MagnatuneListViewArtistItem( )
|
|
|
|
|
|
|
|
|
|
void MagnatuneListViewArtistItem::setOpen( bool o )
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
if ( o && !childCount() ) {
|
|
|
|
|
listView()->setUpdatesEnabled( false );
|
|
|
|
|
|
|
|
|
@ -61,8 +58,6 @@ void MagnatuneListViewArtistItem::setOpen( bool o )
|
|
|
|
|
TDEListViewItem::setOpen( o );
|
|
|
|
|
invalidateHeight();
|
|
|
|
|
listView()->repaintContents();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -72,34 +67,19 @@ void MagnatuneListViewArtistItem::setup()
|
|
|
|
|
TDEListViewItem::setup();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MagnatuneListViewAlbumItem::MagnatuneListViewAlbumItem( MagnatuneAlbum album, TDEListViewItem * parent )
|
|
|
|
|
: TDEListViewItem( parent ), MagnatuneAlbum( album )
|
|
|
|
|
{
|
|
|
|
|
TDEListViewItem::setText( 0, album.getName() );
|
|
|
|
|
setDragEnabled( true );
|
|
|
|
|
|
|
|
|
|
//setPixmap(0, TDEGlobal::iconLoader()->loadIcon( "media-optical-cdrom", TDEIcon::Toolbar, TDEIcon::SizeSmall ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//setPixmap(0, TDEGlobal::iconLoader()->loadIcon( "media-optical-cdrom-unmounted", TDEIcon::Toolbar, TDEIcon::SizeSmall ) );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
MagnatuneListViewAlbumItem::~ MagnatuneListViewAlbumItem( )
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void MagnatuneListViewAlbumItem::setOpen( bool o )
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
@ -119,8 +99,6 @@ void MagnatuneListViewAlbumItem::setOpen( bool o )
|
|
|
|
|
TDEListViewItem::setOpen( o );
|
|
|
|
|
invalidateHeight();
|
|
|
|
|
listView()->repaintContents();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void MagnatuneListViewAlbumItem::setup( )
|
|
|
|
@ -129,29 +107,14 @@ void MagnatuneListViewAlbumItem::setup( )
|
|
|
|
|
TDEListViewItem::setup();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MagnatuneListViewTrackItem::MagnatuneListViewTrackItem( MagnatuneTrack track, TDEListViewItem * parent )
|
|
|
|
|
: TDEListViewItem( parent ), MagnatuneTrack( track )
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
int trackNumber = track.getTrackNumber();
|
|
|
|
|
TQString trackNumberString = TQString::number( trackNumber );
|
|
|
|
|
if (trackNumber < 10)
|
|
|
|
|
trackNumberString = '0' + trackNumberString;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TDEListViewItem::setText( 0, trackNumberString + " - " + track.getName() );
|
|
|
|
|
|
|
|
|
|
debug() << "track duration: " << TQString::number( track.getDuration() ) << endl;
|
|
|
|
@ -172,9 +135,3 @@ MagnatuneListViewTrackItem::MagnatuneListViewTrackItem( MagnatuneTrack track, TD
|
|
|
|
|
MagnatuneListViewTrackItem::~ MagnatuneListViewTrackItem( )
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|