diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-01-19 18:22:05 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-01-19 18:22:05 +0000 |
commit | 57e10fedbcb8c3e8c6590ff0935dbf017ce5587f (patch) | |
tree | 3000a7649ca4e40e43f9e7feed963236a0b0f56b /kipi-plugins/ipodexport/ipodlistitem.cpp | |
download | kipi-plugins-57e10fedbcb8c3e8c6590ff0935dbf017ce5587f.tar.gz kipi-plugins-57e10fedbcb8c3e8c6590ff0935dbf017ce5587f.zip |
Import abandoned KDE3 version of kipi plugins
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/libraries/kipi-plugins@1077221 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kipi-plugins/ipodexport/ipodlistitem.cpp')
-rw-r--r-- | kipi-plugins/ipodexport/ipodlistitem.cpp | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/kipi-plugins/ipodexport/ipodlistitem.cpp b/kipi-plugins/ipodexport/ipodlistitem.cpp new file mode 100644 index 0000000..6c6d950 --- /dev/null +++ b/kipi-plugins/ipodexport/ipodlistitem.cpp @@ -0,0 +1,70 @@ +/*************************************************************************** + * copyright : (C) 2006 Seb Ruiz <me@sebruiz.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 "ipodlistitem.h" + +#include <klocale.h> + +using namespace IpodExport; + +//////////////////////////////////////////// +/// Class IpodAlbumItem +//////////////////////////////////////////// + +IpodAlbumItem::IpodAlbumItem( QListView *parent, QListViewItem *after, Itdb_PhotoAlbum *pa ) + : KListViewItem( parent, after ) + , m_photoAlbum( pa ) +{ + // don't use setName, as it writes to the ipod + m_name = pa->name; + if( m_name.isEmpty() ) + m_name = i18n( "Unnamed" ); + setText( 0, m_name ); +} + +void IpodAlbumItem::setPhotoAlbum( Itdb_PhotoAlbum *pa ) +{ + m_photoAlbum = pa; +} + +void IpodAlbumItem::setName( const QString & name ) +{ + if( name == m_name ) + return; + + if( m_photoAlbum ) + strcpy( m_photoAlbum->name, name.utf8() ); + + m_name = name; + setText( 0, m_name ); +} + + +//////////////////////////////////////////// +/// Class IpodPhotoItem +//////////////////////////////////////////// + +IpodPhotoItem::IpodPhotoItem( IpodAlbumItem *parent, IpodPhotoItem *after, + Itdb_Artwork *art ) + : KListViewItem( parent, after ) + , m_artwork( art ) +{ +} + +void IpodPhotoItem::setArtwork( Itdb_Artwork *art ) +{ + m_artwork = art; +} + + |