--- a/radioapp/radiouiengine/inc/radiostation.h Wed Jun 23 18:12:57 2010 +0300
+++ b/radioapp/radiouiengine/inc/radiostation.h Tue Jul 06 14:16:27 2010 +0300
@@ -160,13 +160,23 @@
QString url() const;
- bool hasPiCode() const;
- bool hasRds() const;
+ int piCode() const;
void setType( RadioStation::Type type );
void unsetType( RadioStation::Type type );
bool isType( RadioStation::Type type ) const;
+ // Convenience checkers
+
+ inline bool hasPiCode() const { return piCode() != -1; }
+ inline bool hasName() const { return !name().isEmpty(); }
+ inline bool hasUrl() const { return !url().isEmpty(); }
+ inline bool hasRadiotext() const { return !radioText().isEmpty(); }
+ inline bool hasDynamicPs() const { return !dynamicPsText().isEmpty(); }
+ inline bool hasGenre() const { return genre() != -1; }
+ inline bool hasRds() const { return hasPiCode() || hasGenre() || hasDynamicPs() ||
+ hasRadiotext() || hasUrl() || ( !hasName() && !isRenamed() ); }
+
// Getters for non-persistent data
PsType psType() const;