radioapp/radiouiengine/src/radiostation.cpp
changeset 33 11b6825f0862
parent 32 189d20c34778
child 37 451b2e1545b2
child 41 3a6b55c6390c
--- a/radioapp/radiouiengine/src/radiostation.cpp	Wed Jun 23 18:12:57 2010 +0300
+++ b/radioapp/radiouiengine/src/radiostation.cpp	Tue Jul 06 14:16:27 2010 +0300
@@ -25,11 +25,8 @@
 #include "radio_global.h"
 
 // Constants
-const QString TAG_ARTIST = "artist";
-const QString TAG_TITLE = "title";
-const QString HTML_ARTIST = "<a href=\"" + TAG_ARTIST + "\">";
-const QString HTML_TITLE = "<a href=\"" + TAG_TITLE + "\">";
-const QString HTML_CLOSE = "</a>";
+const QLatin1String HTML_TAG_START( "<font color='cyan'><u>" );
+const QLatin1String HTML_TAG_END( "</u></font>" );
 
 const uint LAST_CALLSIGN_CHAR_CODE = 25;
 const uint THREE_LETTER_CALLSIGN_COUNT = 72;
@@ -205,7 +202,8 @@
 
         //TODO: This is a temporary thing to see some URL. Remove this
         if ( !mData->mName.isEmpty() ) {
-            mData->mUrl = "<a href=\"buu\">www." + mData->mName.toLower() + ".fi</a>";
+            QString url = mData->mName.toLower().remove( " " );
+            mData->mUrl = "www." + url + ".fi";
         } else {
             mData->mUrl = "";
         }
@@ -317,13 +315,7 @@
             return;
         }
 
-        QString replacement = "";
-        if ( rtPlusClass == RtPlus::Artist ) {
-            replacement = HTML_ARTIST;
-        } else if ( rtPlusClass == RtPlus::Title ) {
-            replacement = HTML_TITLE;
-        }
-        replacement += rtPlusItem + HTML_CLOSE;
+        const QString replacement = HTML_TAG_START + rtPlusItem + HTML_TAG_END;
 
         mData->mRadioText.replace( rtPlusItem, replacement );
         mData->mChangeFlags |= RadioStation::RadioTextChanged;
@@ -443,21 +435,9 @@
 /*!
  *
  */
-bool RadioStation::hasPiCode() const
+int RadioStation::piCode() const
 {
-    return mData->mPiCode != -1;
-}
-
-/*!
- *
- */
-bool RadioStation::hasRds() const
-{
-    return hasPiCode() ||
-        mData->mGenre != -1 ||
-        !mData->mDynamicPsText.isEmpty() ||
-        !mData->mRadioText.isEmpty() ||
-        ( !mData->mName.isEmpty() && !isRenamed() );
+    return mData->mPiCode;
 }
 
 /*!