ui/uiengine/medialistwrapper/src/glxmlwrapper.cpp
changeset 23 74c9f037fd5d
child 26 c499df2dbb33
equal deleted inserted replaced
5:f7f0874bfe7d 23:74c9f037fd5d
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *
       
    16 */
       
    17 
       
    18 /*glxmlwrapper.cpp*/
       
    19 
       
    20 //internal includes 
       
    21 #include "glxmlwrapper.h"
       
    22 #include "glxmlwrapper_p.h"
       
    23 
       
    24 // ======== MEMBER FUNCTIONS ========
       
    25 
       
    26 // ---------------------------------------------------------------------------
       
    27 // constructor.
       
    28 // ---------------------------------------------------------------------------
       
    29 //
       
    30 GlxMLWrapper::GlxMLWrapper(int aCollectionId, int aHierarchyId, TGlxFilterItemType aFilterType)
       
    31 {
       
    32     mMLWrapperPrivate = GlxMLWrapperPrivate::Instance(this, aCollectionId, aHierarchyId, aFilterType);
       
    33 }
       
    34 
       
    35 // ---------------------------------------------------------------------------
       
    36 // destructor.
       
    37 // ---------------------------------------------------------------------------
       
    38 //
       
    39 GlxMLWrapper::~GlxMLWrapper()
       
    40 {
       
    41 	delete mMLWrapperPrivate;
       
    42 }
       
    43 
       
    44 // ---------------------------------------------------------------------------
       
    45 // setContextMode.
       
    46 // ---------------------------------------------------------------------------
       
    47 //
       
    48 void GlxMLWrapper::setContextMode(GlxContextMode contextMode)
       
    49 {
       
    50 	mMLWrapperPrivate->SetContextMode(contextMode);
       
    51 }
       
    52 
       
    53 // ---------------------------------------------------------------------------
       
    54 // getItemCount.
       
    55 // ---------------------------------------------------------------------------
       
    56 //
       
    57 int GlxMLWrapper::getItemCount()
       
    58 {
       
    59 	return (mMLWrapperPrivate->GetItemCount());
       
    60 }
       
    61 
       
    62 // ---------------------------------------------------------------------------
       
    63 // retrieveItemIcon.
       
    64 // ---------------------------------------------------------------------------
       
    65 //
       
    66 HbIcon* GlxMLWrapper::retrieveItemIcon(int index, GlxTBContextType aTBContextType)
       
    67 {
       
    68 	return (mMLWrapperPrivate->RetrieveItemIcon(index,aTBContextType));
       
    69 
       
    70 }
       
    71 
       
    72 // ---------------------------------------------------------------------------
       
    73 // retrieveItemIcon.
       
    74 // ---------------------------------------------------------------------------
       
    75 //
       
    76 QString GlxMLWrapper::retrieveListTitle(int index)
       
    77 {
       
    78 	return (mMLWrapperPrivate->RetrieveListTitle(index));
       
    79 }
       
    80 
       
    81 // ---------------------------------------------------------------------------
       
    82 // retrieveItemIcon.
       
    83 // ---------------------------------------------------------------------------
       
    84 //
       
    85 QString GlxMLWrapper::retrieveListSubTitle(int index)
       
    86 {
       
    87 	return (mMLWrapperPrivate->RetrieveListSubTitle(index));
       
    88 }
       
    89 // ---------------------------------------------------------------------------
       
    90 // retrieveItemUri.
       
    91 // ---------------------------------------------------------------------------
       
    92 //
       
    93 QString GlxMLWrapper::retrieveItemUri(int index)
       
    94 {
       
    95 	return (mMLWrapperPrivate->RetrieveItemUri(index));
       
    96 }
       
    97 // ---------------------------------------------------------------------------
       
    98 // retrieveItemDimension.
       
    99 // ---------------------------------------------------------------------------
       
   100 //
       
   101 QSize GlxMLWrapper::retrieveItemDimension(int index)
       
   102 {
       
   103 	return (mMLWrapperPrivate->RetrieveItemDimension(index));
       
   104 }
       
   105 
       
   106 QDate GlxMLWrapper::retrieveItemDate(int index)
       
   107 {
       
   108 	return (mMLWrapperPrivate->RetrieveItemDate(index));
       
   109 }
       
   110 
       
   111 int GlxMLWrapper::retrieveItemFrameCount(int index)
       
   112     {
       
   113     return (mMLWrapperPrivate->RetrieveItemFrameCount(index));
       
   114     }
       
   115 // ---------------------------------------------------------------------------
       
   116 // getFocusIndex.
       
   117 // ---------------------------------------------------------------------------
       
   118 //
       
   119 int GlxMLWrapper::getFocusIndex() const
       
   120 {
       
   121     return (mMLWrapperPrivate->GetFocusIndex());
       
   122 }
       
   123 
       
   124 // ---------------------------------------------------------------------------
       
   125 // setFocusIndex.
       
   126 // ---------------------------------------------------------------------------
       
   127 //
       
   128 void GlxMLWrapper::setFocusIndex(int itemIndex)
       
   129 {
       
   130     mMLWrapperPrivate->SetFocusIndex(itemIndex);
       
   131 }
       
   132 
       
   133 // ---------------------------------------------------------------------------
       
   134 // SetSelectedIndex.
       
   135 // ---------------------------------------------------------------------------
       
   136 //
       
   137 void GlxMLWrapper::setSelectedIndex(int itemIndex)
       
   138 {
       
   139     mMLWrapperPrivate->SetSelectedIndex(itemIndex);
       
   140 }
       
   141 
       
   142 // ---------------------------------------------------------------------------
       
   143 // getVisibleWindowIndex.
       
   144 // ---------------------------------------------------------------------------
       
   145 //
       
   146 int GlxMLWrapper::getVisibleWindowIndex()
       
   147 {
       
   148     return (mMLWrapperPrivate->GetVisibleWindowIndex());
       
   149 }
       
   150 
       
   151 // ---------------------------------------------------------------------------
       
   152 // setVisibleWindowIndex.
       
   153 // ---------------------------------------------------------------------------
       
   154 //
       
   155 void GlxMLWrapper::setVisibleWindowIndex(int itemIndex)
       
   156 {
       
   157     mMLWrapperPrivate->SetVisibleWindowIndex(itemIndex);
       
   158 }
       
   159 
       
   160 
       
   161 // ---------------------------------------------------------------------------
       
   162 // itemsAdded.
       
   163 // ---------------------------------------------------------------------------
       
   164 //
       
   165 void GlxMLWrapper::itemsAdded(int startIndex,int endIndex)
       
   166 {
       
   167 	emit insertItems(startIndex,endIndex);
       
   168 }
       
   169 
       
   170 // ---------------------------------------------------------------------------
       
   171 // itemsRemoved.
       
   172 // ---------------------------------------------------------------------------
       
   173 //
       
   174 void GlxMLWrapper::itemsRemoved(int startIndex,int endIndex)
       
   175 {
       
   176 	emit removeItems(startIndex,endIndex);
       
   177 }
       
   178 
       
   179 // ---------------------------------------------------------------------------
       
   180 // handleReceivedIcon.
       
   181 // ---------------------------------------------------------------------------
       
   182 //
       
   183 void GlxMLWrapper::handleReceivedIcon(int itemIndex, GlxTBContextType tbContextType)
       
   184 {
       
   185 	emit updateItem(itemIndex, tbContextType);
       
   186 }
       
   187 
       
   188 
       
   189 // ---------------------------------------------------------------------------
       
   190 // handleIconCorrupt.
       
   191 // ---------------------------------------------------------------------------
       
   192 //
       
   193 void GlxMLWrapper::handleIconCorrupt(int itemIndex)
       
   194 {
       
   195 	emit itemCorrupted(itemIndex);
       
   196 }
       
   197 
       
   198 // ---------------------------------------------------------------------------
       
   199 // handleListItemAvailable.
       
   200 // ---------------------------------------------------------------------------
       
   201 //
       
   202 void GlxMLWrapper::handleListItemAvailable(int itemIndex)
       
   203 {
       
   204 	emit updateItem(itemIndex, GlxTBContextNone);
       
   205 }
       
   206 
       
   207 
       
   208 // ---------------------------------------------------------------------------
       
   209 // handleGeneralError.
       
   210 // ---------------------------------------------------------------------------
       
   211 //
       
   212 void GlxMLWrapper::handleGeneralError(int aError)
       
   213 {
       
   214 	Q_UNUSED(aError);
       
   215 }
       
   216 
       
   217