#include <smartplaylistrules.h>
Public Member Functions | |
Q_UINT32 | getAction () const |
Q_UINT32 | getField () const |
const QString & | getString () const |
Q_UINT64 | getFromValue () const |
Q_UINT64 | getToValue () const |
Q_INT64 | getFromDate () const |
Q_INT64 | getToDate () const |
Q_UINT64 | getFromUnits () const |
Q_UINT64 | getToUnits () const |
Q_UINT64 | calculatedFrom () const |
Q_UINT64 | calculatedTo () const |
uint | writeToStream (QDataStream &outStream) const |
bool | isStringBasedRule () const |
virtual const QString | toString () const |
Protected Member Functions | |
SmartPlaylistRule (SPLStringField field, SPLStringAction action, const QString &testString) | |
SmartPlaylistRule (SPLUIntField field, SPLUIntAction action, Q_UINT64 fromValue, Q_UINT64 toValue, Q_INT64 fromDate, Q_INT64 toDate, Q_UINT64 fromUnits, Q_UINT64 toUnits) | |
Static Protected Member Functions | |
static QString | getActionString (uint action) |
static QString | getFieldString (uint field) |
static Q_UINT64 | calculateTestValue (Q_UINT64 value, Q_INT64 date, Q_UINT64 units) |
Friends | |
class | SmartPlaylistRuleSet |
itunesdb::SmartPlaylistRule::SmartPlaylistRule | ( | SPLStringField | field, | |
SPLStringAction | action, | |||
const QString & | testString | |||
) | [protected] |
Constructor to create a string based SmartplaylistRule
itunesdb::SmartPlaylistRule::SmartPlaylistRule | ( | SPLUIntField | field, | |
SPLUIntAction | action, | |||
Q_UINT64 | fromValue, | |||
Q_UINT64 | toValue, | |||
Q_INT64 | fromDate, | |||
Q_INT64 | toDate, | |||
Q_UINT64 | fromUnits, | |||
Q_UINT64 | toUnits | |||
) | [protected] |
Constructor to create an uint based SmartplaylistRule
Q_UINT32 itunesdb::SmartPlaylistRule::getAction | ( | ) | const [inline] |
Returns the action identifier for this rule
Q_UINT32 itunesdb::SmartPlaylistRule::getField | ( | ) | const [inline] |
Returns the field identifier for this rule
const QString& itunesdb::SmartPlaylistRule::getString | ( | ) | const [inline] |
Returns the String data for String based rules.
Q_UINT64 itunesdb::SmartPlaylistRule::getFromValue | ( | ) | const [inline] |
Returns the "from" value as set in the itunesdb rule definition. If you need the "from" value actually compared to the desired fields use the calculatedFrom()
method.
Q_UINT64 itunesdb::SmartPlaylistRule::getToValue | ( | ) | const [inline] |
Returns the "to" value as set in the itunesdb rule definition. If you need the "to" value actually compared to the desired fields use the calculatedTo()
method.
Q_INT64 itunesdb::SmartPlaylistRule::getFromDate | ( | ) | const [inline] |
Returns the "from date" as set in the itunesdb rule definition. If you need the "from" value actually compared to the desired fields use the calculatedFrom()
method.
Q_INT64 itunesdb::SmartPlaylistRule::getToDate | ( | ) | const [inline] |
Returns the "to date" as set in the itunesdb rule definition. If you need the "to" value actually compared to the desired fields use the calculatedTo()
method.
Q_UINT64 itunesdb::SmartPlaylistRule::getFromUnits | ( | ) | const [inline] |
Returns the "from units" as set in the itunesdb rule definition and defines the units the fromDate is measured in.
Q_UINT64 itunesdb::SmartPlaylistRule::getToUnits | ( | ) | const [inline] |
Returns the "to units" as set in the itunesdb rule definition and defines the units the toDate is measured in.
Q_UINT64 itunesdb::SmartPlaylistRule::calculatedFrom | ( | ) | const |
Returns the "from" value actually compared to the fields in question. The value is calculated via ( fromValue + fromDate * fromUnits ).
Q_UINT64 itunesdb::SmartPlaylistRule::calculatedTo | ( | ) | const |
Returns the "to" value actually compared to the fields in question. The value is calculated via ( toValue + toDate * toUnits ).
uint itunesdb::SmartPlaylistRule::writeToStream | ( | QDataStream & | outStream | ) | const |
Writes this SPL TrackPredicate as a SPL Rule to the given stream and returns the number of bytes written
bool itunesdb::SmartPlaylistRule::isStringBasedRule | ( | ) | const [inline] |
Returns true if the rule is a string based rule
const QString itunesdb::SmartPlaylistRule::toString | ( | ) | const [virtual] |
Returns a textual represenation of this rule (human readable)