radioapp/radiowidgets/src/radiocarouselitem.cpp
changeset 54 a8ba0c289b44
parent 51 bbebb0235466
child 57 21be958eb3ce
--- a/radioapp/radiowidgets/src/radiocarouselitem.cpp	Mon Sep 20 18:04:48 2010 +0300
+++ b/radioapp/radiowidgets/src/radiocarouselitem.cpp	Tue Oct 05 09:31:22 2010 +0300
@@ -39,9 +39,9 @@
 const QLatin1String RT_LABEL             ( "rt_label" );
 const QLatin1String URL_LABEL            ( "url_label" );
 
-const QLatin1String SEEKING_TEXT        ( "txt_rad_list_tuning" );
-const QLatin1String CONNECT_HEADSET_TEXT( "txt_rad_list_connect_wireless_antenna_headset_with" );
-const uint CAROUSEL_LENGTH = 11;
+const QLatin1String SEEKING_TEXT         ( "txt_rad_list_tuning" );
+const QLatin1String CONNECT_HEADSET_TEXT ( "txt_rad_list_connect_wireless_antenna_headset_with" );
+const int PS_NAME_MAX_VISIBILE_LENGTH    = 11;
 
 /*!
  *
@@ -112,7 +112,11 @@
 
     mRadiotextItem = new HbRichTextItem( this );
     HbStyle::setItemName( mRadiotextItem, RT_LABEL );
-
+	
+    // TODO: Proper text wrapping mode can be set in style sheet once 
+    // TextWrapAtWordBoundaryOrAnywhere counterpart gets available
+    mRadiotextItem->setTextWrapping( Hb::TextWrapAtWordBoundaryOrAnywhere );
+    
     mUrlItem = new HbTextItem( this );
     HbStyle::setItemName( mUrlItem, URL_LABEL );
 
@@ -309,7 +313,7 @@
 
         const bool hasName = mStation->hasName();
         if ( hasName ) {
-            if ( mStation->name().length() > CAROUSEL_LENGTH ) {
+            if ( mStation->name().length() > PS_NAME_MAX_VISIBILE_LENGTH ) {
                 mNameItem->setAlignment( Qt::AlignLeft );
             } else {
                 mNameItem->setAlignment( Qt::AlignHCenter );
@@ -327,7 +331,7 @@
             if ( mStation->hasDynamicPs() ) {
                 mRadiotextItem->setText( mStation->dynamicPsText() );
             } else if ( hasName ) {
-                const QString loc = "%L1 Mhz"; //hbTrId( "txt_rad_list_l1_mhz_small" );
+                const QString loc = hbTrId( "txt_rad_list_l1_mhz_small" );
                 mRadiotextItem->setText( loc.arg( mStation->frequencyString() ) );
             } else {
                 mRadiotextItem->setText( "" );