#include <track.h>
Public Member Functions | |
| TrackPtrList () | |
| void | setComparator (const TrackComparatorPtr &comparator) |
| const TrackComparatorPtr & | getComparator () const |
| void | setComparator (TrackComparator *comparator) |
| virtual int | compareItems (QPtrCollection::Item s1, QPtrCollection::Item s2) |
| bool | hasDirtyTracks () |
| bool | hasRecentlyPlayedTracks () |
| bool | removeAllRefs (itunesdb::Track *track) |
| TrackPtrList * | getTracksBy (TrackPredicate &predicate, itunesdb::TrackPtrList &buffer) const |
| Track * | findFirstTrackBy (TrackPredicate &predicate) const |
| template<class JavaLikeTrackIterator> | |
| void | addAll (JavaLikeTrackIterator trackIter) |
| itunesdb::TrackPtrList::TrackPtrList | ( | ) |
Default constructor.
| void itunesdb::TrackPtrList::setComparator | ( | const TrackComparatorPtr & | comparator | ) |
This method sets the comparator that compares two tracks for sorting. TrackPtrList owns the given pointer so it may be deallocated at any time.
| comparator | the comparator to set. If NULL is given the DefaultComparator will be used. |
| const TrackComparatorPtr & itunesdb::TrackPtrList::getComparator | ( | ) | const |
Returns the currently used comparator for sorting.
| void itunesdb::TrackPtrList::setComparator | ( | TrackComparator * | comparator | ) |
This method sets the comparator that compares two tracks for sorting. TrackPtrList owns the given pointer so it may be deallocated at any time.
| comparator | the comparator to set. If NULL is given the DefaultComparator will be used. |
| int itunesdb::TrackPtrList::compareItems | ( | QPtrCollection::Item | s1, | |
| QPtrCollection::Item | s2 | |||
| ) | [virtual] |
Compares two tracks by the comparator set by setComparator().
| bool itunesdb::TrackPtrList::hasDirtyTracks | ( | ) |
Returns true if this list contains tracks not in sync with the database.
| bool itunesdb::TrackPtrList::hasRecentlyPlayedTracks | ( | ) |
Returns true if this list contains tracks being played after the last sync.
| bool itunesdb::TrackPtrList::removeAllRefs | ( | itunesdb::Track * | track | ) |
removes all references to the given track.
| TrackPtrList * itunesdb::TrackPtrList::getTracksBy | ( | TrackPredicate & | predicate, | |
| itunesdb::TrackPtrList & | buffer | |||
| ) | const |
Returns all the Tracks where the given predicate returned true
| itunesdb::Track * itunesdb::TrackPtrList::findFirstTrackBy | ( | TrackPredicate & | predicate | ) | const |
Returns the first Track where the given predicate returned true The given trackpredicate needs to contain a method that gets a track, and returns a bool if it's the desired track
| void itunesdb::TrackPtrList::addAll | ( | JavaLikeTrackIterator | trackIter | ) | [inline] |
Adds all tracks delivered by the given Iterator.
1.5.1