#include <smartplaylistrules.h>
Inheritance diagram for itunesdb::SmartPlaylistRuleSet:

Public Member Functions | |
| virtual bool | addStringRule (SPLStringField field, SPLStringAction action, const QString &testString, int position=-1) |
| virtual bool | addUIntRule (SPLUIntField field, SPLUIntAction action, Q_UINT64 fromValue, Q_UINT64 toValue, Q_INT64 fromDate, Q_INT64 toDate, Q_UINT64 fromUnits, Q_UINT64 toUnits, int position=-1) |
| bool | addUIntRule (SPLUIntField field, SPLUIntAction action, Q_UINT64 fromValue, Q_UINT64 toValue, int position=-1) |
| bool | addInTheLastRule (SPLUIntField field, bool negateRule, Q_INT64 value, Q_UINT64 units, int position=-1) |
| const SmartPlaylistRule * | getRuleAt (uint position) |
| bool | removeRuleAt (uint position) |
| void | clear () |
| bool | isLiveUpdate () const |
| void | setLiveUpdateFlag (bool liveupdate) |
| bool | isCheckRules () const |
| void | setCheckRulesFlag (bool checkRules) |
| bool | isCheckLimits () const |
| virtual void | setLimits (SPLLimitSort limitSort, SPLLimitType limitType, Q_UINT32 limitValue) |
| void | enableLimits (bool enable) |
| SPLLimitSort | getLimitSort () const |
| SPLLimitType | getLimitType () const |
| bool | isMatchAny () const |
| void | setMatchAnyFlag (bool matchAny) |
| bool | checkedTracksOnly () const |
| void | setCheckedTracksOnlyFlag (bool checkedOnly) |
| const RuleList & | getRules () const |
| uint | getNumRules () const |
| QString | toString () const |
Protected Member Functions | |
| SmartPlaylistRuleSet (const SmartPlaylistRuleSet &src) | |
| uint | readRules (QDataStream &instream, uint length) |
| bool | readHeader (QDataStream &instream, uint length) |
| uint | writeRules (QDataStream &outstream) const |
| uint | writeHeader (QDataStream &outstream) const |
| virtual SmartPlaylistRule * | createStringRule (SPLStringField field, SPLStringAction action, const QString &testString) |
| virtual SmartPlaylistRule * | createUIntRule (SPLUIntField field, SPLUIntAction action, Q_UINT64 fromValue, Q_UINT64 toValue, Q_INT64 fromDate, Q_INT64 toDate, Q_UINT64 fromUnits, Q_UINT64 toUnits) |
Protected Attributes | |
| bool | mMatchAny |
| Q_UINT32 | unk5 |
| Q_UINT8 | mLiveUpdate |
| Q_UINT8 | mCheckLimits |
| Q_UINT8 | mCheckRules |
| Q_UINT8 | mCheckedOnly |
| Q_UINT8 | mReverseLimitSort |
| SPLLimitSort | mLimitSort |
| SPLLimitType | mLimitType |
| Q_UINT32 | mLimitValue |
| RuleList | mRules |
Friends | |
| class | Playlist |
// enable smart playlist behaviour and get the ruleset
SmartPlaylistRuleSet& ruleSet = a_playlist_ptr->enableSmartPlaylist();
// add the rule "last played in the last 2 weeks"
ruleSet.addInTheLastRule( FIELD_LASTPLAYED, false, -2, IN_THE_LAST_WEEKS );
// limit to the first 30 songs, sorted by last played date
ruleSet.setLimits( LIMIT_SORT_LASTPLAYED, LIMIT_TYPE_SONGS, 30 );
// match ANY rule (doesn't really matter since we only have one rule)
ruleSet.setMatchAnyFlag( true );
// enable live update (updates the playlist on the go)
ruleSet.setLiveUpdateFlag( true );
|
||||||||||||||||||||||||
|
Convenience method. This creates a UInt based "In The Last" rule with the given parameters
|
|
||||||||||||||||||||
|
Adds a string based rule to the rule set and returns true if successful.
Reimplemented in ITunesDBSPLRuleSet. |
|
||||||||||||||||||||||||
|
Convenience method. This creates a UInt based rule setting the from and to values as provided and using sane defaults for the rest.
|
|
||||||||||||||||||||||||||||||||||||||||
|
Adds a uint based rule to the rule set and returns true if successful.
Reimplemented in ITunesDBSPLRuleSet. |
|
|
Returns true if only "checked" tracks should be matched against the rules. |
|
|
Removes all the rule from this RuleSet |
|
|
enables or disables limit checking. |
|
|
returns the limit sort field |
|
|
Returns the limit type |
|
|
Returns the number of rules |
|
|
Returns the Rule at the specified position or NULL if no such rule exists.
|
|
|
Returns the rules making up this smart playlist rule set. |
|
|
Returns true if the limits will/need_to be checked |
|
|
Returns true if the smart playlist checks the rules |
|
|
Returns true if the playlist may be updated by the iPod itself. |
|
|
Returns true if only one rule needs to match. |
|
||||||||||||
|
reads the SPL Header from a type 50 MHOD and returns if the operation succeeded.
|
|
||||||||||||
|
read Rules from type 51 MHOD data, starting at SLst and returns the number of rules read
|
|
|
Removes the rule at the specified position. The list will be compacted, so all the rules after the rule to be removed will be moved one position towards the start of the list.
|
|
|
sets the checkedTracksOnlyFlag.
|
|
|
Set the checkRules flag. |
|
||||||||||||||||
|
Sets the limit for this smart playlist and enable limit checking |
|
|
Sets the live update flag. |
|
|
Sets the "match any" flag |
|
|
Returns a String representation of this rule set. |
|
|
Writes the header to the stream as a type 50 MHOD and returns the number of bytes written.
|
|
|
Writes the rules back to the stream and returns the number of bytes written.
|
1.4.6