ui/uiengine/medialistwrapper/inc/glxmlwrapper.h
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.h*/
       
    19 
       
    20 #ifndef GLXMLWRAPPER_H
       
    21 #define GLXMLWRAPPER_H
       
    22 
       
    23 #include <QObject>
       
    24 #include <glxfiltergeneraldefs.h>
       
    25 #include <QtGlobal>
       
    26 #include <glxuistd.h>
       
    27 #include <QSize>
       
    28 #include <qdatetime.h>
       
    29 //forward declarations
       
    30 class GlxMLWrapperPrivate;
       
    31 class HbIcon;
       
    32 //constant declarations
       
    33 
       
    34 
       
    35 #ifdef BUILD_MLWRAPPER
       
    36 #define GLX_MLWRAPPER_EXPORT Q_DECL_EXPORT
       
    37 #else
       
    38 #define GLX_MLWRAPPER_EXPORT Q_DECL_IMPORT
       
    39 #endif
       
    40 
       
    41 
       
    42 class GLX_MLWRAPPER_EXPORT GlxMLWrapper : public QObject
       
    43 {
       
    44     Q_OBJECT
       
    45 public:
       
    46 	/**
       
    47 	*constructor
       
    48 	*/
       
    49     GlxMLWrapper(int aCollectionId, int aHierarchyId, TGlxFilterItemType aFilterType);
       
    50 	/**
       
    51 	*destructor
       
    52 	**/
       
    53 	~GlxMLWrapper();
       
    54     /**
       
    55      * for setting the attribute context mode will be used mainly for retreiving thumbnail of different sizes.
       
    56      */
       
    57     void setContextMode(GlxContextMode contextMode);
       
    58      /**
       
    59      * for retreiving the data Count.
       
    60      */
       
    61     int getItemCount();
       
    62 	/**
       
    63 	* retrieveItemIcon()
       
    64 	*/
       
    65 	HbIcon* retrieveItemIcon(int index, GlxTBContextType aTBContextType);
       
    66     void itemsAdded(int startIndex,int endIndex);
       
    67     void itemsRemoved(int startIndex,int endIndex);
       
    68     void handleReceivedIcon(int itemIndex, GlxTBContextType tbContextType);
       
    69     void handleIconCorrupt(int itemIndex);
       
    70     void handleGeneralError(int error);
       
    71 	void handleListItemAvailable(int itemIndex);
       
    72     int getFocusIndex() const;
       
    73     void setFocusIndex(int itemIndex);
       
    74     
       
    75     void setSelectedIndex(int aItemIndex);
       
    76 
       
    77 	QString retrieveListTitle(int index);
       
    78 	QString retrieveListSubTitle(int index);
       
    79     int getVisibleWindowIndex();
       
    80     void setVisibleWindowIndex(int itemIndex);
       
    81 	QString retrieveItemUri(int index);
       
    82 	QSize retrieveItemDimension(int index);
       
    83 	QDate retrieveItemDate(int index);
       
    84 	int retrieveItemFrameCount(int index);
       
    85 
       
    86 signals:
       
    87      void updateItem(int index, GlxTBContextType tbContextType);
       
    88 	 void insertItems(int startIndex,int endIndex);
       
    89 	 void removeItems(int startIndex,int endIndex);
       
    90 	 void itemCorrupted(int itemIndex);
       
    91 
       
    92 private:
       
    93 	GlxMLWrapperPrivate* mMLWrapperPrivate;
       
    94 
       
    95 };
       
    96 
       
    97 #endif //GLXMLWRAPPER_H