diff -r 74c9f037fd5d -r 99ad1390cd33 ui/uiengine/model/listmodel/src/glxalbummodel.cpp --- a/ui/uiengine/model/listmodel/src/glxalbummodel.cpp Fri Mar 19 09:28:59 2010 +0200 +++ b/ui/uiengine/model/listmodel/src/glxalbummodel.cpp Fri Apr 16 14:58:46 2010 +0300 @@ -20,6 +20,13 @@ #include #include #include +#include + +#include "glxicondefs.h" //Contains the icon names/Ids + +const QColor KListOddRowColor(211, 211, 211, 127); +const QColor KListEvenRowColor(255, 250, 250, 127); + GlxAlbumModel::GlxAlbumModel(GlxModelParm & modelParm):mContextMode(GlxContextInvalid) { @@ -32,7 +39,7 @@ mContextMode = GlxContextSelectionList; //todo get this Default icon from some generic path and not directly. - mDefaultIcon = new HbIcon(":/data/All_default.png"); + mDefaultIcon = new HbIcon(GLXICON_DEFAULT); int err = connect(mMLWrapper, SIGNAL(updateItem(int, GlxTBContextType)), this, SLOT(itemUpdated1(int, GlxTBContextType))); qDebug("updateItem() connection status %d", err); @@ -120,7 +127,18 @@ return *itemIcon; } } - + case Qt::BackgroundRole: + { + if (rowIndex % 2 == 0) + { + return QBrush(KListEvenRowColor); + } + else + { + return QBrush(KListOddRowColor); + } + } + case GlxFocusIndexRole : idx = getFocusIndex(); return idx.row(); @@ -147,7 +165,14 @@ return TRUE; } } - + + if ( GlxVisualWindowIndex == role ) { + if ( value.isValid() && value.canConvert () ) { + mMLWrapper->setVisibleWindowIndex( value.value () ); + return TRUE; + } + } + if ( GlxSelectedIndexRole == role ) { if ( value.isValid() && value.canConvert () ) { setSelectedIndex( index( value.value (), 0) );